Skip to content

Commit 4b052d1

Browse files
authored
Upgrade to ESLint 9 (solana-program#76)
1 parent 1beccf3 commit 4b052d1

File tree

4 files changed

+47
-43
lines changed

4 files changed

+47
-43
lines changed

type-length-value/js/.eslintignore

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

type-length-value/js/.eslintrc

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import importExtensions from 'eslint-plugin-import-extensions';
5+
import { globalIgnores } from 'eslint/config';
6+
import tseslint from 'typescript-eslint';
7+
8+
export default tseslint.config(
9+
globalIgnores([
10+
'**/docs',
11+
'**/lib',
12+
'**/test-ledger',
13+
'**/package-lock.json',
14+
]),
15+
eslint.configs.recommended,
16+
tseslint.configs.recommended,
17+
{
18+
plugins: {
19+
'import-extensions': importExtensions,
20+
},
21+
rules: {
22+
'import-extensions/require-extensions': 'error',
23+
},
24+
},
25+
{
26+
rules: {
27+
'@typescript-eslint/ban-ts-comment': 'off',
28+
'@typescript-eslint/no-explicit-any': 'off',
29+
'@typescript-eslint/no-unused-vars': 'off',
30+
'@typescript-eslint/no-empty-interface': 'off',
31+
'@typescript-eslint/consistent-type-imports': 'error',
32+
},
33+
},
34+
{
35+
files: ['examples/**/*', 'test/**/*'],
36+
rules: {
37+
'import-extensions/require-extensions': 'off',
38+
},
39+
}
40+
);

type-length-value/js/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,22 @@
4949
"buffer": "^6.0.3"
5050
},
5151
"devDependencies": {
52+
"@eslint/eslintrc": "^3.3.1",
53+
"@eslint/js": "^9.24.0",
5254
"@solana/prettier-config-solana": "^0.0.5",
5355
"@types/chai": "^5.0.1",
5456
"@types/mocha": "^10.0.10",
5557
"@types/node": "^22.10.2",
56-
"@typescript-eslint/eslint-plugin": "^8.4.0",
57-
"@typescript-eslint/parser": "^8.4.0",
5858
"chai": "^5.1.2",
59-
"eslint": "^8.57.0",
60-
"eslint-plugin-require-extensions": "^0.1.1",
61-
"prettier": "^3.4.2",
59+
"eslint": "^9.24.0",
60+
"eslint-plugin-import-extensions": "^0.1.5",
6261
"gh-pages": "^6.2.0",
6362
"mocha": "^11.0.1",
63+
"prettier": "^3.4.2",
6464
"shx": "^0.3.4",
6565
"ts-node": "^10.9.2",
6666
"typedoc": "^0.27.4",
67-
"typescript": "^5.7.2"
67+
"typescript": "^5.8.3",
68+
"typescript-eslint": "^8.30.0"
6869
}
6970
}

0 commit comments

Comments
 (0)