-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
42 lines (41 loc) · 1.23 KB
/
eslint.config.js
File metadata and controls
42 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import eslintJs from '@eslint/js';
import eslintPluginPackageJson from 'eslint-plugin-package-json';
import eslintPluginVue from 'eslint-plugin-vue';
import globals from 'globals';
export default [
{
ignores: ['node_modules/', 'dist/', 'tests/']
},
eslintJs.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
eslintPluginPackageJson.configs.recommended,
{
files: ['*.config.js'],
languageOptions: {
globals: {
...globals.node
}
}
},
{
languageOptions: {
globals: {
...globals.browser
}
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': ['error', { 'args': 'none' }],
'semi': 'error',
'no-trailing-spaces': 'error',
'comma-dangle': ['error', 'never'],
'quotes': ['error', 'single'],
'no-template-curly-in-string': 'error',
'vue/max-attributes-per-line': ['error', { 'singleline': 3 }],
'vue/html-closing-bracket-newline': ['error', { singleline: 'never', multiline: 'never'}],
'vue/html-closing-bracket-spacing': 'error',
'vue/prop-name-casing': 'error'
}
}
];