Skip to content

Commit 3db051b

Browse files
authored
Merge pull request #226 from appfeel/dev/bump-eslint
Upgrade to eslint 9
2 parents a569f57 + f8965bc commit 3db051b

File tree

12 files changed

+344
-8784
lines changed

12 files changed

+344
-8784
lines changed

.eslintrc

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

.github/workflows/ci.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: [14.x, 16.x, 18.x, 20.x]
11+
node-version: [18.x, 20.x, 22.x, 24.x]
1212

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

eslint.config.mjs

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import js from '@eslint/js';
2+
import importPlugin from 'eslint-plugin-import';
3+
import prettier from 'eslint-plugin-prettier/recommended';
4+
5+
export default [
6+
{
7+
ignores: ['node_modules/', 'lib/', 'coverage/'],
8+
},
9+
js.configs.recommended,
10+
{
11+
files: ['src/**/*.js'],
12+
plugins: {
13+
import: importPlugin,
14+
},
15+
languageOptions: {
16+
ecmaVersion: 2021,
17+
sourceType: 'commonjs',
18+
globals: {
19+
console: 'readonly',
20+
process: 'readonly',
21+
Buffer: 'readonly',
22+
__dirname: 'readonly',
23+
__filename: 'readonly',
24+
},
25+
},
26+
rules: {
27+
'no-console': 'off',
28+
'no-use-before-define': ['error', { functions: false }],
29+
'import/no-extraneous-dependencies': 'error',
30+
'import/no-unresolved': 'error',
31+
},
32+
},
33+
{
34+
files: ['test/**/*.js'],
35+
plugins: {
36+
import: importPlugin,
37+
},
38+
languageOptions: {
39+
ecmaVersion: 2021,
40+
sourceType: 'module',
41+
globals: {
42+
console: 'readonly',
43+
process: 'readonly',
44+
Buffer: 'readonly',
45+
__dirname: 'readonly',
46+
__filename: 'readonly',
47+
describe: 'readonly',
48+
it: 'readonly',
49+
before: 'readonly',
50+
after: 'readonly',
51+
beforeEach: 'readonly',
52+
afterEach: 'readonly',
53+
},
54+
},
55+
rules: {
56+
'no-console': 'off',
57+
'global-require': 'off',
58+
'import/no-extraneous-dependencies': 'off',
59+
'import/no-dynamic-require': 'off',
60+
},
61+
},
62+
prettier,
63+
];

0 commit comments

Comments
 (0)