1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-01-06 15:03:39 +00:00

chore: complete ESLint v9 configuration

This commit is contained in:
Cotes Chung
2025-07-26 20:49:56 +08:00
parent 8bf72fc234
commit 49519d13e5
3 changed files with 41 additions and 6 deletions

View File

@@ -1,5 +1,35 @@
export default [
import { defineConfig, globalIgnores } from 'eslint/config';
import js from '@eslint/js';
import globals from 'globals';
export default defineConfig([
globalIgnores(['assets/*', 'node_modules/*', '_site/*']),
js.configs.recommended,
{
files: ['_javascript/**/*.js']
rules: {
semi: ['error', 'always'],
quotes: ['error', 'single']
},
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['_javascript/**/*.js'],
languageOptions: {
globals: {
ClipboardJS: 'readonly',
GLightbox: 'readonly',
Theme: 'readonly',
dayjs: 'readonly',
mermaid: 'readonly',
tocbot: 'readonly',
importScripts: 'readonly',
swconf: 'readonly'
}
}
}
];
]);