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:
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user