init
This commit is contained in:
69
client/eslint.config.js
Normal file
69
client/eslint.config.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import pluginVuePug from 'eslint-plugin-vue-pug';
|
||||
import pluginJsonc from 'eslint-plugin-jsonc';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
'**/node_modules/**',
|
||||
'**/dist/**',
|
||||
'**/android/**',
|
||||
'**/coverage/**',
|
||||
'**/*.min.js'
|
||||
]
|
||||
},
|
||||
|
||||
js.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.es2021
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': 'warn',
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
|
||||
}
|
||||
},
|
||||
|
||||
...pluginVue.configs['flat/recommended'],
|
||||
{
|
||||
files: ['*.vue', '**/*.vue'],
|
||||
plugins: {
|
||||
'vue-pug': pluginVuePug
|
||||
},
|
||||
languageOptions: {
|
||||
parser: pluginVue.parser,
|
||||
parserOptions: {
|
||||
parser: js.configs.recommended.parser,
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/html-indent': ['error', 2],
|
||||
'no-unused-vars': 'off',
|
||||
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
||||
registeredComponentsOnly: true,
|
||||
ignores: []
|
||||
}]
|
||||
}
|
||||
},
|
||||
|
||||
...pluginJsonc.configs['flat/recommended-with-jsonc'],
|
||||
{
|
||||
files: ['*.json', '**/*.json'],
|
||||
rules: {
|
||||
'jsonc/sort-keys': 'off',
|
||||
}
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user