Skip to content

Commit 4ee7997

Browse files
committed
chore: migrate to eslint9
1 parent c5aab4c commit 4ee7997

File tree

5 files changed

+2212
-5148
lines changed

5 files changed

+2212
-5148
lines changed
File renamed without changes.

eslint.config.mjs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import tsdoc from "eslint-plugin-tsdoc";
2+
import typescriptParser from "@typescript-eslint/parser";
3+
import scwTypescript from '@scaleway/eslint-config-react/typescript';
4+
5+
export default [
6+
...scwTypescript,
7+
{
8+
ignores: [
9+
"**/node_modules/",
10+
"**/dist/",
11+
"**/examples/",
12+
"**/vite.config.ts"
13+
],
14+
},
15+
{
16+
languageOptions: {
17+
ecmaVersion: 5,
18+
sourceType: "script",
19+
parser: typescriptParser,
20+
parserOptions: {
21+
project: ["tsconfig.json"],
22+
},
23+
},
24+
plugins: {
25+
tsdoc,
26+
},
27+
rules: {
28+
"tsdoc/syntax": "warn",
29+
"@typescript-eslint/naming-convention": [
30+
"error",
31+
{
32+
selector: "enumMember",
33+
format: ["PascalCase"],
34+
},
35+
],
36+
"import/prefer-default-export": "off",
37+
"import/no-default-export": "error",
38+
"no-await-in-loop": "off",
39+
"@typescript-eslint/no-namespace": "off",
40+
},
41+
},
42+
{
43+
files: [
44+
"./packages/clients/src/scw/**/*.ts",
45+
"./packages/clients/src/internal/**/*.ts",
46+
],
47+
rules: {
48+
"@typescript-eslint/consistent-type-definitions": "off",
49+
},
50+
},
51+
{
52+
files: ["**/*.test.ts", "__tests__/**/*.ts", "**/vite.config.ts"],
53+
rules: {
54+
"import/no-extraneous-dependencies": "off",
55+
},
56+
},
57+
{
58+
files: ["packages/clients/src/api/dedibox/v1/*.ts"],
59+
rules: {
60+
"no-use-before-define": "off",
61+
"@typescript-eslint/no-use-before-define": "off",
62+
},
63+
}
64+
];

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"commit": "npx git-cz -a",
1616
"doc": "typedoc",
1717
"format": "prettier --write '**/*.ts'",
18-
"lint": "eslint --cache --ext ts .",
18+
"lint": "eslint --cache .",
1919
"prepare": "husky",
2020
"test": "vitest run",
2121
"test:coverage": "vitest run --coverage",
@@ -24,7 +24,7 @@
2424
"lint-staged": {
2525
"*.ts": [
2626
"prettier --write",
27-
"eslint --fix --ext ts"
27+
"eslint --fix ."
2828
],
2929
"*.yaml": [
3030
"prettier --write"
@@ -46,7 +46,7 @@
4646
"devDependencies": {
4747
"@commitlint/cli": "19.5.0",
4848
"@commitlint/config-conventional": "19.5.0",
49-
"@scaleway/eslint-config-react": "3.18.4",
49+
"@scaleway/eslint-config-react": "4.0.8",
5050
"@vitest/coverage-istanbul": "2.0.5",
5151
"@vitest/coverage-v8": "2.0.5",
5252
"@vitest/ui": "2.0.5",
@@ -56,7 +56,7 @@
5656
"cross-fetch": "4.0.0",
5757
"cz-conventional-changelog": "3.3.0",
5858
"esbuild-plugin-browserslist": "0.14.0",
59-
"eslint": "8.57.0",
59+
"eslint": "9.4.0",
6060
"eslint-plugin-tsdoc": "0.3.0",
6161
"husky": "9.1.6",
6262
"jsdom": "25.0.0",

0 commit comments

Comments
 (0)