48 lines
1001 B
JavaScript
48 lines
1001 B
JavaScript
|
|
import js from '@eslint/js';
|
||
|
|
import html from 'eslint-plugin-html';
|
||
|
|
import prettier from 'eslint-config-prettier';
|
||
|
|
|
||
|
|
export default [
|
||
|
|
js.configs.recommended,
|
||
|
|
prettier,
|
||
|
|
{
|
||
|
|
files: ['**/*.js', '**/*.html'],
|
||
|
|
plugins: {
|
||
|
|
html,
|
||
|
|
},
|
||
|
|
languageOptions: {
|
||
|
|
ecmaVersion: 'latest',
|
||
|
|
sourceType: 'module',
|
||
|
|
globals: {
|
||
|
|
console: 'readonly',
|
||
|
|
window: 'readonly',
|
||
|
|
document: 'readonly',
|
||
|
|
navigator: 'readonly',
|
||
|
|
requestAnimationFrame: 'readonly',
|
||
|
|
setTimeout: 'readonly',
|
||
|
|
setInterval: 'readonly',
|
||
|
|
clearInterval: 'readonly',
|
||
|
|
IntersectionObserver: 'readonly',
|
||
|
|
__dirname: 'readonly',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
rules: {
|
||
|
|
'no-unused-vars': 'warn',
|
||
|
|
'no-console': 'off',
|
||
|
|
'prefer-const': 'warn',
|
||
|
|
'no-var': 'warn',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
{
|
||
|
|
ignores: [
|
||
|
|
'node_modules/**',
|
||
|
|
'dist/**',
|
||
|
|
'build/**',
|
||
|
|
'*.min.js',
|
||
|
|
'*.min.css',
|
||
|
|
'script.js',
|
||
|
|
'styles.css',
|
||
|
|
],
|
||
|
|
},
|
||
|
|
];
|