Skip to content

Commit 5c6236a

Browse files
authored
Update ESLint to v9.4.0 and regenerate package-lock.json (twbs#2012)
1 parent 9b63eb5 commit 5c6236a

5 files changed

+291
-283
lines changed

.eslintignore

-4
This file was deleted.

.eslintrc.json

-34
This file was deleted.

eslint.config.mjs

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
4+
/** @type {import('eslint').Linter.FlatConfig[]} */
5+
export default [
6+
// global ignores
7+
{
8+
ignores: [
9+
'**/*.min.js',
10+
'**/dist/**',
11+
'**/vendor/**',
12+
'_site/**',
13+
'node_modules/**',
14+
'resources/**',
15+
'**/.fantasticonrc.js'
16+
],
17+
},
18+
{
19+
languageOptions: {
20+
ecmaVersion: 2020,
21+
sourceType: 'module',
22+
globals: {
23+
...globals.nodeBuiltin
24+
}
25+
},
26+
linterOptions: {
27+
reportUnusedDisableDirectives: 'error'
28+
}
29+
},
30+
js.configs.recommended,
31+
{
32+
files: [
33+
'**/*.js',
34+
'**/*.mjs'
35+
],
36+
rules: {
37+
'no-return-await': 'error',
38+
'object-curly-spacing': [
39+
'error',
40+
'always'
41+
],
42+
'prefer-template': 'error',
43+
semi: [
44+
'error',
45+
'never'
46+
],
47+
strict: 'error'
48+
}
49+
},
50+
{
51+
files: [
52+
'docs/assets/js/**'
53+
],
54+
languageOptions: {
55+
globals: {
56+
...globals.browser
57+
}
58+
}
59+
}
60+
]

0 commit comments

Comments
 (0)