-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.js
46 lines (45 loc) · 1.44 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
44
45
46
import { createConfigForNuxt } from '@nuxt/eslint-config/flat';
export default createConfigForNuxt({
features: {
tooling: true,
typescript: {
strict: true,
},
stylistic: {
indent: 4,
semi: true,
},
},
}).override('nuxt/vue/rules', {
rules: {
'vue/block-lang': [ 'error', { script: { lang: 'ts' } } ],
'vue/block-order': [ 'error', { order: [ 'script', 'template', 'style' ] } ],
'vue/component-name-in-template-casing': [ 'error', 'PascalCase', { registeredComponentsOnly: false } ],
'vue/multi-word-component-names': 'off',
'vue/no-ref-object-reactivity-loss': 'error',
},
}).override('nuxt/stylistic', {
rules: {
'@stylistic/array-bracket-spacing': [ 'error', 'always' ],
'@stylistic/comma-dangle': [ 'error', 'always-multiline' ],
},
}).override('nuxt/import/rules', {
rules: {
'import/order': [ 'error', {
'groups': [
'type',
[ 'builtin', 'external' ],
[ 'internal', 'parent', 'sibling', 'index', 'object' ],
],
'newlines-between': 'always',
'alphabetize': {
order: 'asc',
},
} ],
},
}).append({
rules: {
'prefer-template': [ 'error' ],
'no-unused-vars': [ 'error', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' } ],
},
});