Skip to content

Commit 3d1ed59

Browse files
authored
Merge pull request #1137 from wantedly/chloe463/build/eslint-v9
feat: Support ESLint v9
2 parents d8ec230 + ee89e1f commit 3d1ed59

File tree

70 files changed

+11143
-5132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+11143
-5132
lines changed

.changeset/five-masks-flash.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"eslint-config-wantedly-typescript": major
3+
"eslint-plugin-use-macros": major
4+
"eslint-config-wantedly": major
5+
"eslint-plugin-wantedly": major
6+
"frolint": major
7+
---
8+
9+
Support ESLint v9

.eslintrc

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

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [16.x, 18.x, 20.x]
11+
node-version: [18.x, 20.x]
1212

1313
steps:
1414
- uses: actions/checkout@v4.1.1

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { base as eslintConfigWantedly } from "eslint-config-wantedly";
2+
import { base as eslintConfigWantedlyTs } from "eslint-config-wantedly-typescript";
3+
4+
/** @type{import('eslint').Linter.Config[]} */
5+
export default [
6+
...eslintConfigWantedly,
7+
...eslintConfigWantedlyTs,
8+
{
9+
ignores: ["packages/**/lib/*.js"],
10+
},
11+
{
12+
files: ["**/*.ts", "**/*.tsx"],
13+
rules: {
14+
"no-console": "off",
15+
"@typescript-eslint/no-require-imports": "off",
16+
"@typescript-eslint/consistent-type-imports": [
17+
"error",
18+
{
19+
prefer: "type-imports",
20+
disallowTypeAnnotations: true,
21+
},
22+
],
23+
"import/order": [
24+
"error",
25+
{
26+
"newlines-between": "always",
27+
groups: ["builtin", "external", "parent", "sibling", "index"],
28+
alphabetize: {
29+
order: "asc",
30+
},
31+
},
32+
],
33+
},
34+
},
35+
];

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"devDependencies": {
77
"@changesets/changelog-github": "^0.5.0",
88
"@changesets/cli": "^2.27.1",
9-
"@types/eslint": "^8.44.8",
10-
"@types/estree": "^1.0.5",
9+
"@types/estree": "^1.0.6",
1110
"@types/graphql": "^14.5.0",
1211
"@types/jest": "^27.4.0",
1312
"jest": "^29.7.0",

packages/eslint-config-wantedly-typescript/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22

33
ESLint config for Wantedly. It focuses the TypeScript linting.
44

5+
## Version Compatibilities
6+
7+
If you're using ESLint v8 and under, please use eslint-config-wantedly-typescript version 3.x. As of eslint-config-wantedly-typescript version 4.0, it has started exporting ESLint's flat config format.
8+
9+
### Usage (version 4.0 and above)
10+
11+
It exports configurations as "Flat config".
12+
13+
```js
14+
import { base as configWantedlyTS } from "eslint-config-wantedly-typescript";
15+
16+
export default [
17+
...configWantedlyTS,
18+
{
19+
rules: {
20+
// Your rules go here.
21+
}
22+
}
23+
];
24+
```
25+
26+
### Usage (version 3.x and under)
27+
28+
It exports configurations as "Legacy" format.
29+
30+
```json
31+
{
32+
"extends": ["wantedly-typescript"],
33+
"rules": {
34+
// Your rules go here.
35+
}
36+
}
37+
```
38+
39+
## Configuration details
40+
541
### Parser
642

743
Using `@typescript-eslint/parser`

0 commit comments

Comments
 (0)