mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
- Fix markdown-it-highlightjs configuration for Hexo 7.0+ - Create custom highlight.js instance to handle unknown languages gracefully - Eliminate 'Could not find language' warning messages - Upgrade ESLint to v9 with flat config format - Update Fuse.js from 6.4.6 to 7.1.0 - Update multiple dependencies to latest versions Technical changes: - Set syntax_highlighter to empty in _config.yml - Add langPrefix: 'hljs language-' configuration - Migrate ESLint to eslint.config.js (flat config) - Update Service Worker for new Fuse.js version
66 lines
1.1 KiB
JavaScript
66 lines
1.1 KiB
JavaScript
const js = require('@eslint/js');
|
|
const globals = require('globals');
|
|
|
|
module.exports = [
|
|
js.configs.recommended,
|
|
{
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node
|
|
}
|
|
},
|
|
rules: {
|
|
'no-unused-vars': 'warn',
|
|
'no-console': 'off'
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.js'],
|
|
languageOptions: {
|
|
sourceType: 'script',
|
|
globals: {
|
|
...globals.node,
|
|
...globals.browser
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['source/sw.js'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.serviceworker
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['themes/coo/scripts/**/*.js'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
hexo: 'readonly'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['themes/coo/source/js/main.js'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
Fuse: 'readonly'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
ignores: [
|
|
'node_modules/**',
|
|
'public/**',
|
|
'db.json',
|
|
'.deploy_git/**',
|
|
'themes/coo/source/js/fuse_*.js'
|
|
]
|
|
}
|
|
];
|