47 lines
1.0 KiB
JavaScript
47 lines
1.0 KiB
JavaScript
import js from '@eslint/js';
|
|
import vue from 'eslint-plugin-vue';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
export default [
|
|
{
|
|
ignores: [
|
|
'node_modules/**',
|
|
'src/.vuepress/.cache/**',
|
|
'src/.vuepress/.temp/**',
|
|
'src/.vuepress/dist/**',
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...vue.configs['flat/recommended'],
|
|
{
|
|
files: ['**/*.{ts,vue}'],
|
|
languageOptions: {
|
|
globals: {
|
|
clearTimeout: 'readonly',
|
|
console: 'readonly',
|
|
document: 'readonly',
|
|
fetch: 'readonly',
|
|
setTimeout: 'readonly',
|
|
window: 'readonly',
|
|
},
|
|
parserOptions: {
|
|
parser: tseslint.parser,
|
|
extraFileExtensions: ['.vue'],
|
|
},
|
|
},
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/html-indent': ['error', 2],
|
|
'vue/max-attributes-per-line': 'off',
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['src/.vuepress/**/*.ts'],
|
|
rules: {
|
|
'no-console': 'off',
|
|
},
|
|
},
|
|
];
|