Skip to content

Commit 3bb0ae0

Browse files
committed
chore: complete ESLint v9 configuration
1 parent 8bf72fc commit 3bb0ae0

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

eslint.config.js

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
1-
export default [
1+
import { defineConfig, globalIgnores } from 'eslint/config';
2+
import js from '@eslint/js';
3+
import globals from 'globals';
4+
5+
export default defineConfig([
6+
globalIgnores(['assets/*', 'node_modules/*', '_site/*']),
7+
js.configs.recommended,
28
{
3-
files: ['_javascript/**/*.js']
9+
rules: {
10+
semi: ['error', 'always'],
11+
quotes: ['error', 'single']
12+
},
13+
languageOptions: {
14+
globals: {
15+
...globals.browser,
16+
...globals.node
17+
}
18+
}
19+
},
20+
{
21+
files: ['_javascript/**/*.js'],
22+
languageOptions: {
23+
globals: {
24+
ClipboardJS: 'readonly',
25+
GLightbox: 'readonly',
26+
Theme: 'readonly',
27+
dayjs: 'readonly',
28+
mermaid: 'readonly',
29+
tocbot: 'readonly',
30+
importScripts: 'readonly',
31+
swconf: 'readonly'
32+
}
33+
}
434
}
5-
];
35+
]);

0 commit comments

Comments
 (0)