Skip to content

Commit 36e2ca9

Browse files
authored
feat: support typescript-eslint 6 (#322)
1 parent 4464168 commit 36e2ca9

File tree

13 files changed

+3391
-3766
lines changed

13 files changed

+3391
-3766
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.17.0
1+
18.16.1

.yarn/releases/yarn-3.2.3.cjs

Lines changed: 0 additions & 783 deletions
This file was deleted.

.yarn/releases/yarn-3.6.1.cjs

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: node-modules
22

3-
yarnPath: .yarn/releases/yarn-3.2.3.cjs
3+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ yarn add @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript -
172172
```js
173173
module.exports = {
174174
extends: ['algolia', 'algolia/typescript']
175+
176+
parserOptions: {
177+
project: '<path-to-tsconfig.json>',
178+
},
175179
};
176180
```
177181

@@ -186,6 +190,8 @@ module.exports = {
186190
}
187191
```
188192

193+
You also need to make sure that all the files you want to lint are also included in `tsconfig.json` with the `include` property.
194+
189195
### TypeScript with React
190196

191197
**terminal**

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
]
1818
},
1919
"devDependencies": {
20-
"conventional-changelog-cli": "2.2.2",
21-
"doctoc": "2.2.0",
20+
"conventional-changelog-cli": "3.0.0",
21+
"doctoc": "2.2.1",
2222
"json": "11.0.0",
2323
"renovate-config-algolia": "2.1.10"
2424
},
2525
"workspaces": [
2626
"packages/*"
2727
],
28-
"packageManager": "yarn@3.2.3"
28+
"packageManager": "yarn@3.6.1"
2929
}

packages/eslint-config-algolia/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
node: true,
77
},
88
parserOptions: {
9-
ecmaVersion: 2018,
9+
ecmaVersion: 'latest',
1010
sourceType: 'module',
1111
experimentalObjectRestSpread: true,
1212
ecmaFeatures: {

packages/eslint-config-algolia/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
},
2222
"homepage": "https://github.com/algolia/eslint-config-algolia",
2323
"devDependencies": {
24-
"@babel/core": "7.18.13",
25-
"@babel/eslint-parser": "7.18.9",
26-
"eslint": "8.3.0",
27-
"eslint-config-prettier": "8.5.0",
24+
"@babel/core": "7.22.8",
25+
"@babel/eslint-parser": "7.22.7",
26+
"eslint": "8.44.0",
27+
"eslint-config-prettier": "8.8.0",
2828
"eslint-plugin-eslint-comments": "3.2.0",
29-
"eslint-plugin-import": "2.26.0",
30-
"eslint-plugin-jest": "26.8.7",
31-
"eslint-plugin-jsdoc": "43.1.1",
32-
"eslint-plugin-jsx-a11y": "6.6.1",
33-
"eslint-plugin-prettier": "4.2.1",
34-
"eslint-plugin-react": "7.31.1",
29+
"eslint-plugin-import": "2.27.5",
30+
"eslint-plugin-jest": "27.2.2",
31+
"eslint-plugin-jsdoc": "46.4.3",
32+
"eslint-plugin-jsx-a11y": "6.7.1",
33+
"eslint-plugin-prettier": "5.0.0",
34+
"eslint-plugin-react": "7.32.2",
3535
"eslint-plugin-react-hooks": "4.6.0",
36-
"prettier": "2.7.1"
36+
"prettier": "3.0.0"
3737
},
3838
"peerDependencies": {
3939
"eslint": "^5.16.0 || ^6.8.0 || ^7.2.0 || ^8.0.0",

packages/eslint-config-algolia/rules/typescript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ module.exports = {
162162
'@typescript-eslint/prefer-namespace-keyword': ['error'],
163163
'@typescript-eslint/prefer-optional-chain': ['error'],
164164
'@typescript-eslint/prefer-ts-expect-error': ['error'],
165-
'@typescript-eslint/sort-type-union-intersection-members': ['error'],
165+
'@typescript-eslint/sort-type-constituents': ['error'],
166166
'@typescript-eslint/type-annotation-spacing': ['error'],
167167
'@typescript-eslint/unified-signatures': ['error'],
168168
'@typescript-eslint/no-redeclare': ['error'],

packages/test/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// eslint-disable-next-line import/no-commonjs
22
module.exports = {
33
extends: ['algolia', 'algolia/react', 'algolia/typescript', 'algolia/jest'],
4+
5+
parserOptions: {
6+
project: 'tsconfig.json',
7+
},
48
};

0 commit comments

Comments
 (0)