Skip to content

Commit 05038ec

Browse files
authored
Use TS and JSX shared configs from eslint-config-hypothesis (#9028)
1 parent 6b25ab3 commit 05038ec

File tree

4 files changed

+86
-80
lines changed

4 files changed

+86
-80
lines changed

eslint.config.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import hypothesis from 'eslint-config-hypothesis';
2-
import jsxA11y from 'eslint-plugin-jsx-a11y';
1+
import hypothesisBase from 'eslint-config-hypothesis/base';
2+
import hypothesisJSX from 'eslint-config-hypothesis/jsx';
3+
import hypothesisTS from 'eslint-config-hypothesis/ts';
34
import globals from 'globals';
4-
import tseslint from 'typescript-eslint';
55

6-
export default tseslint.config(
6+
export default [
77
{
88
ignores: [
99
'.tox/**/*',
@@ -15,15 +15,10 @@ export default tseslint.config(
1515
'docs/_build/*',
1616
],
1717
},
18-
...hypothesis,
19-
...tseslint.configs.recommended,
20-
jsxA11y.flatConfigs.recommended,
21-
{
22-
rules: {
23-
'prefer-arrow-callback': 'error',
24-
'prefer-const': ['error', { destructuring: 'all' }],
25-
},
26-
},
18+
19+
...hypothesisBase,
20+
...hypothesisJSX,
21+
...hypothesisTS,
2722

2823
{
2924
files: ['*.js'],
@@ -34,4 +29,4 @@ export default tseslint.config(
3429
},
3530
},
3631
},
37-
);
32+
];

h/static/scripts/controllers/create-group-form-controller.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export function CreateGroupFormController(element) {
22
// Create Group form handling
3-
// eslint-disable-next-line @typescript-eslint/no-this-alias
43
const self = this;
54
this._submitBtn = element.querySelector('.js-create-group-create-btn');
65
this._groupNameInput = element.querySelector('.js-group-name-input');

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"enzyme": "^3.11.0",
5252
"enzyme-adapter-preact-pure": "^4.1.0",
5353
"eslint": "^9.12.0",
54-
"eslint-config-hypothesis": "^3.0.0",
54+
"eslint-config-hypothesis": "^3.1.0",
5555
"eslint-plugin-jsx-a11y": "^6.10.0",
5656
"eslint-plugin-mocha": "^10.5.0",
5757
"eslint-plugin-react": "^7.37.1",
@@ -67,7 +67,7 @@
6767
"sinon": "^18.0.0",
6868
"syn": "^0.2.2",
6969
"typescript": "^5.6.2",
70-
"typescript-eslint": "^8.9.0"
70+
"typescript-eslint": "^8.10.0"
7171
},
7272
"engines": {
7373
"node": ">=6"

yarn.lock

Lines changed: 75 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,15 +2662,15 @@ __metadata:
26622662
languageName: node
26632663
linkType: hard
26642664

2665-
"@typescript-eslint/eslint-plugin@npm:8.9.0":
2666-
version: 8.9.0
2667-
resolution: "@typescript-eslint/eslint-plugin@npm:8.9.0"
2665+
"@typescript-eslint/eslint-plugin@npm:8.10.0":
2666+
version: 8.10.0
2667+
resolution: "@typescript-eslint/eslint-plugin@npm:8.10.0"
26682668
dependencies:
26692669
"@eslint-community/regexpp": ^4.10.0
2670-
"@typescript-eslint/scope-manager": 8.9.0
2671-
"@typescript-eslint/type-utils": 8.9.0
2672-
"@typescript-eslint/utils": 8.9.0
2673-
"@typescript-eslint/visitor-keys": 8.9.0
2670+
"@typescript-eslint/scope-manager": 8.10.0
2671+
"@typescript-eslint/type-utils": 8.10.0
2672+
"@typescript-eslint/utils": 8.10.0
2673+
"@typescript-eslint/visitor-keys": 8.10.0
26742674
graphemer: ^1.4.0
26752675
ignore: ^5.3.1
26762676
natural-compare: ^1.4.0
@@ -2681,66 +2681,66 @@ __metadata:
26812681
peerDependenciesMeta:
26822682
typescript:
26832683
optional: true
2684-
checksum: d72bda52eb26d184286e67ceaebff17d177bf021cfcf1c31d316385f4965c60620fd3ec7178c30092faa3f30d81c4cf54ef2563c4bb0fd361e9967d2e6e64d22
2684+
checksum: 2bb311eb9a882d530fc94f790f3e1f4745cd4e3523fd8d62ee0ed14d65c4230dc0c797c490c3421c1456fd71349e9bfa146c0b78f63860b75aae6e2a32a6c27c
26852685
languageName: node
26862686
linkType: hard
26872687

2688-
"@typescript-eslint/parser@npm:8.9.0":
2689-
version: 8.9.0
2690-
resolution: "@typescript-eslint/parser@npm:8.9.0"
2688+
"@typescript-eslint/parser@npm:8.10.0":
2689+
version: 8.10.0
2690+
resolution: "@typescript-eslint/parser@npm:8.10.0"
26912691
dependencies:
2692-
"@typescript-eslint/scope-manager": 8.9.0
2693-
"@typescript-eslint/types": 8.9.0
2694-
"@typescript-eslint/typescript-estree": 8.9.0
2695-
"@typescript-eslint/visitor-keys": 8.9.0
2692+
"@typescript-eslint/scope-manager": 8.10.0
2693+
"@typescript-eslint/types": 8.10.0
2694+
"@typescript-eslint/typescript-estree": 8.10.0
2695+
"@typescript-eslint/visitor-keys": 8.10.0
26962696
debug: ^4.3.4
26972697
peerDependencies:
26982698
eslint: ^8.57.0 || ^9.0.0
26992699
peerDependenciesMeta:
27002700
typescript:
27012701
optional: true
2702-
checksum: b7d899cca2834ab030c672693e9bdbc442b8026710af0e06cb89c162d81c43a5c777f90568cd9ea3ac5b689bbf161c8f7fcecd58989e0238bb45aec10567c26a
2702+
checksum: 2e38f34d9d044e251450116cc081a8f84ba13183e9c3e1dda919ddc00eebe634a37d4dfd785998f259b64cdd770e863ecc6c5cf7c8f422baf3d2bc2a0f9241cf
27032703
languageName: node
27042704
linkType: hard
27052705

2706-
"@typescript-eslint/scope-manager@npm:8.9.0":
2707-
version: 8.9.0
2708-
resolution: "@typescript-eslint/scope-manager@npm:8.9.0"
2706+
"@typescript-eslint/scope-manager@npm:8.10.0":
2707+
version: 8.10.0
2708+
resolution: "@typescript-eslint/scope-manager@npm:8.10.0"
27092709
dependencies:
2710-
"@typescript-eslint/types": 8.9.0
2711-
"@typescript-eslint/visitor-keys": 8.9.0
2712-
checksum: 56b71993f3b8da3fe6947710d1ead8afb128d194994e0d82052799c2b05a017735649d4dcf897d2ea63b28c8633336342d3efd269c2910d6d06e2784f248a22c
2710+
"@typescript-eslint/types": 8.10.0
2711+
"@typescript-eslint/visitor-keys": 8.10.0
2712+
checksum: 3df8df342e227b80514dcc9151774dea9a71bc649204f702d5b4a1b76a54b4814c5d5a970a6a9213462dd4df0d42342796fab35549e8663d4c0e5d84bd902bba
27132713
languageName: node
27142714
linkType: hard
27152715

2716-
"@typescript-eslint/type-utils@npm:8.9.0":
2717-
version: 8.9.0
2718-
resolution: "@typescript-eslint/type-utils@npm:8.9.0"
2716+
"@typescript-eslint/type-utils@npm:8.10.0":
2717+
version: 8.10.0
2718+
resolution: "@typescript-eslint/type-utils@npm:8.10.0"
27192719
dependencies:
2720-
"@typescript-eslint/typescript-estree": 8.9.0
2721-
"@typescript-eslint/utils": 8.9.0
2720+
"@typescript-eslint/typescript-estree": 8.10.0
2721+
"@typescript-eslint/utils": 8.10.0
27222722
debug: ^4.3.4
27232723
ts-api-utils: ^1.3.0
27242724
peerDependenciesMeta:
27252725
typescript:
27262726
optional: true
2727-
checksum: e4422ad2da0e73c1d503fd5cc72f873b20329c4fa55e4a88f201b7d02a6946b08a62d3a2ce53f6020d52db76c321b927b8e06a68e44b2a4f50b26967c75a27ff
2727+
checksum: 8b0cec8cff1926a08c2bd675b24b2ccff36e59a8d9169eed38343f70c4e3bba18796fc39f30a9307ded3f345881aded80dbd6dc1d78b9ae76cff04fbe8708788
27282728
languageName: node
27292729
linkType: hard
27302730

2731-
"@typescript-eslint/types@npm:8.9.0":
2732-
version: 8.9.0
2733-
resolution: "@typescript-eslint/types@npm:8.9.0"
2734-
checksum: bb79e8774b2c521d738d76efe6c61f5aa7f700765cf025410a5c37ca0449ed436c500a5c8cd3a4343edd5257301d4b0cfcd56275cc9bca992585e9dac76612bf
2731+
"@typescript-eslint/types@npm:8.10.0":
2732+
version: 8.10.0
2733+
resolution: "@typescript-eslint/types@npm:8.10.0"
2734+
checksum: 3839fd43b0f21b432a9f6090a39d5b2254ee48c1eecf14f8f66bea0cbaba9f2f33a7fc78aea37dfe8841442332d0a8f99cc65cd2d01ca43db99550d30d6f7fe8
27352735
languageName: node
27362736
linkType: hard
27372737

2738-
"@typescript-eslint/typescript-estree@npm:8.9.0":
2739-
version: 8.9.0
2740-
resolution: "@typescript-eslint/typescript-estree@npm:8.9.0"
2738+
"@typescript-eslint/typescript-estree@npm:8.10.0":
2739+
version: 8.10.0
2740+
resolution: "@typescript-eslint/typescript-estree@npm:8.10.0"
27412741
dependencies:
2742-
"@typescript-eslint/types": 8.9.0
2743-
"@typescript-eslint/visitor-keys": 8.9.0
2742+
"@typescript-eslint/types": 8.10.0
2743+
"@typescript-eslint/visitor-keys": 8.10.0
27442744
debug: ^4.3.4
27452745
fast-glob: ^3.3.2
27462746
is-glob: ^4.0.3
@@ -2750,31 +2750,31 @@ __metadata:
27502750
peerDependenciesMeta:
27512751
typescript:
27522752
optional: true
2753-
checksum: 307b317c2ac45b83cbf2e5f45b6fd3615279c7ad8b105fa09004d6e415187d9ad1647ec205fcee017fdf2985192c469f9bad738f70cc754da4ba807d8d0d90ae
2753+
checksum: 3fc774f51d0a891a5e09bc77f5544b6aa268abec9c01cd9ec831f92dde9c9d61a5c818ca2800c124fb5d61d40ce7ac34740b347c21ba3493e756c052084afd65
27542754
languageName: node
27552755
linkType: hard
27562756

2757-
"@typescript-eslint/utils@npm:8.9.0":
2758-
version: 8.9.0
2759-
resolution: "@typescript-eslint/utils@npm:8.9.0"
2757+
"@typescript-eslint/utils@npm:8.10.0":
2758+
version: 8.10.0
2759+
resolution: "@typescript-eslint/utils@npm:8.10.0"
27602760
dependencies:
27612761
"@eslint-community/eslint-utils": ^4.4.0
2762-
"@typescript-eslint/scope-manager": 8.9.0
2763-
"@typescript-eslint/types": 8.9.0
2764-
"@typescript-eslint/typescript-estree": 8.9.0
2762+
"@typescript-eslint/scope-manager": 8.10.0
2763+
"@typescript-eslint/types": 8.10.0
2764+
"@typescript-eslint/typescript-estree": 8.10.0
27652765
peerDependencies:
27662766
eslint: ^8.57.0 || ^9.0.0
2767-
checksum: 23bb2a054fcad2e5a3bb2ab9173614b2257f42a5a704434de3d81e478ca5444f1989e317a8044d6e39ef000a938316c7bc175286d595e17933e35e573a430f4c
2767+
checksum: db67603baacba9cccbbc625801a44e5320bc558be846646ff9962818c64a9ab07edcfdcad98b15a3f8954d3e398e3a41f085c1ec458f7169a1ce7b3674032d59
27682768
languageName: node
27692769
linkType: hard
27702770

2771-
"@typescript-eslint/visitor-keys@npm:8.9.0":
2772-
version: 8.9.0
2773-
resolution: "@typescript-eslint/visitor-keys@npm:8.9.0"
2771+
"@typescript-eslint/visitor-keys@npm:8.10.0":
2772+
version: 8.10.0
2773+
resolution: "@typescript-eslint/visitor-keys@npm:8.10.0"
27742774
dependencies:
2775-
"@typescript-eslint/types": 8.9.0
2775+
"@typescript-eslint/types": 8.10.0
27762776
eslint-visitor-keys: ^3.4.3
2777-
checksum: 9afb7eabfc6d279e714b80e283e062f0c2a90e2adbde1c2d2fbc6cecd6444c6e76867599f6a781b847981d02f7956748bd3ecb7abc4770ab7e77c6709693b530
2777+
checksum: 0b3060a036dd3b6acacc32b1d81b3ada1ac5523cc2d16a369ecffd3ab5b389cd98802b248bf65ee8a266a166125a9e38acd7e917d4dd26044bdf2c805537b7e3
27782778
languageName: node
27792779
linkType: hard
27802780

@@ -5062,14 +5062,26 @@ __metadata:
50625062
languageName: node
50635063
linkType: hard
50645064

5065-
"eslint-config-hypothesis@npm:^3.0.0":
5066-
version: 3.0.0
5067-
resolution: "eslint-config-hypothesis@npm:3.0.0"
5065+
"eslint-config-hypothesis@npm:^3.1.0":
5066+
version: 3.1.0
5067+
resolution: "eslint-config-hypothesis@npm:3.1.0"
50685068
peerDependencies:
5069+
eslint-plugin-jsx-a11y: ">=6.10.0"
50695070
eslint-plugin-mocha: ">=10.4.0"
50705071
eslint-plugin-react: ">=7.34.0"
50715072
eslint-plugin-react-hooks: ">=5.0.0"
5072-
checksum: 1194156f2d043ed866afe9ccd88d7364cdf8635cb9d762d24beffb03ee02a25d44081b58d95c5b1a658e686053948d8b2493e65f4de540e14d72ae83c35c31fe
5073+
globals: ">=15.11.0"
5074+
typescript-eslint: ">=8.10.0"
5075+
peerDependenciesMeta:
5076+
eslint-plugin-jsx-a11y:
5077+
optional: true
5078+
eslint-plugin-react:
5079+
optional: true
5080+
eslint-plugin-react-hooks:
5081+
optional: true
5082+
typescript-eslint:
5083+
optional: true
5084+
checksum: 12e17da643a306fec1c8121bf5f172f2132f816d85b2b6f626dc16d353f5cbac8bee0cce080a9df829c5eab3e4bcc007bb611ec6f5d9deebd627e530802c05f6
50735085
languageName: node
50745086
linkType: hard
50755087

@@ -6167,7 +6179,7 @@ __metadata:
61676179
enzyme-adapter-preact-pure: ^4.1.0
61686180
escape-html: ^1.0.3
61696181
eslint: ^9.12.0
6170-
eslint-config-hypothesis: ^3.0.0
6182+
eslint-config-hypothesis: ^3.1.0
61716183
eslint-plugin-jsx-a11y: ^6.10.0
61726184
eslint-plugin-mocha: ^10.5.0
61736185
eslint-plugin-react: ^7.37.1
@@ -6197,7 +6209,7 @@ __metadata:
61976209
syn: ^0.2.2
61986210
tailwindcss: ^3.4.13
61996211
typescript: ^5.6.2
6200-
typescript-eslint: ^8.9.0
6212+
typescript-eslint: ^8.10.0
62016213
languageName: unknown
62026214
linkType: soft
62036215

@@ -10322,17 +10334,17 @@ __metadata:
1032210334
languageName: node
1032310335
linkType: hard
1032410336

10325-
"typescript-eslint@npm:^8.9.0":
10326-
version: 8.9.0
10327-
resolution: "typescript-eslint@npm:8.9.0"
10337+
"typescript-eslint@npm:^8.10.0":
10338+
version: 8.10.0
10339+
resolution: "typescript-eslint@npm:8.10.0"
1032810340
dependencies:
10329-
"@typescript-eslint/eslint-plugin": 8.9.0
10330-
"@typescript-eslint/parser": 8.9.0
10331-
"@typescript-eslint/utils": 8.9.0
10341+
"@typescript-eslint/eslint-plugin": 8.10.0
10342+
"@typescript-eslint/parser": 8.10.0
10343+
"@typescript-eslint/utils": 8.10.0
1033210344
peerDependenciesMeta:
1033310345
typescript:
1033410346
optional: true
10335-
checksum: 6c54e7360e51fdbf1bc0d00f592949bb72e9c85d1b93145e9e7ad4e8259bf11784ebe035210c8f0a29e4f137ad268e22714d09bf82db1917258626d526a117a9
10347+
checksum: cf0ead50af444a887097f2ed6cf854c318082e5cebde92c218b7616086b844af0a8e80e8b9e946de7f582ed8ed96934c91d27a816130611217c1e9d34d59f20d
1033610348
languageName: node
1033710349
linkType: hard
1033810350

0 commit comments

Comments
 (0)