Skip to content

Commit bb859a8

Browse files
authored
Update ESLint to v9.x (#269)
1 parent 55e07a0 commit bb859a8

File tree

4 files changed

+186
-235
lines changed

4 files changed

+186
-235
lines changed

.eslintrc.json

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

eslint.config.mjs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
4+
/** @type {import('eslint').Linter.RulesRecord} */
5+
const RULES = {
6+
'comma-dangle': [
7+
'error',
8+
'never'
9+
],
10+
'quotes': [
11+
'error',
12+
'single'
13+
],
14+
'quote-props': [
15+
'error',
16+
'always'
17+
]
18+
};
19+
20+
/** @type {import('eslint').Linter.FlatConfig[]} */
21+
export default [
22+
// global ignores
23+
{
24+
'ignores': [
25+
'bootstrap',
26+
'node_modules/**'
27+
]
28+
},
29+
{
30+
'languageOptions': {
31+
'ecmaVersion': 2022,
32+
'sourceType': 'script',
33+
'globals': {
34+
...globals.node
35+
}
36+
},
37+
'linterOptions': {
38+
'reportUnusedDisableDirectives': 'error'
39+
}
40+
},
41+
js.configs.recommended,
42+
{
43+
'files': [
44+
'**/*.js'
45+
],
46+
'rules': {
47+
...RULES
48+
}
49+
},
50+
{
51+
'files': [
52+
'**/*.mjs'
53+
],
54+
'languageOptions': {
55+
'sourceType': 'module',
56+
'globals': {
57+
...globals.nodeBuiltin
58+
}
59+
},
60+
'rules': {
61+
...RULES
62+
}
63+
}
64+
]

0 commit comments

Comments
 (0)