-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.js
43 lines (42 loc) · 1.19 KB
/
eslint.config.js
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
43
import js from '@eslint/js';
import stylisticJs from '@stylistic/eslint-plugin-js';
import globals from 'globals';
import pluginVue from 'eslint-plugin-vue';
/** @type {import('eslint').Linter.ConfigOverride[]} */
export default [
js.configs.recommended,
...pluginVue.configs['flat/recommended'],
{
plugins: {
'@stylistic/js': stylisticJs,
},
languageOptions: {
globals: {
...globals.browser,
...globals.greasemonkey,
},
},
files: ['src/**/*.js', '*.config.[m]js'],
rules: {
'@stylistic/js/semi': ['error', 'always'],
'@stylistic/js/quotes': ['error', 'single'],
'@stylistic/js/indent': ['error', 2],
'@stylistic/js/key-spacing': ['error'],
'@stylistic/js/quote-props': ['error', 'consistent-as-needed'],
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
'@stylistic/js/object-curly-spacing': ['error', 'always'],
},
},
{
files: ['src/**/*.vue'],
rules: {
'vue/max-attributes-per-line': ['error', {
singleline: { max: 100 },
multiline: { max: 1 },
}],
'vue/multi-word-component-names': ['error', {
ignores: ['App'],
}],
},
},
];