-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
67 lines (63 loc) · 2.45 KB
/
eslint.config.js
File metadata and controls
67 lines (63 loc) · 2.45 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
export default createConfigForNuxt({
features: {
stylistic: {
commaDangle: 'always-multiline',
},
tooling: true,
},
})
.override('nuxt/typescript/rules', {
rules: {
'curly': [ 'error', 'all' ],
'dot-notation': 'error',
'no-lonely-if': 'error',
'no-useless-rename': 'error',
'object-shorthand': 'error',
'prefer-const': [ 'error', { destructuring: 'any', ignoreReadBeforeAssign: false } ],
'require-await': 'error',
'semi': [ 'error', 'never' ],
'array-bracket-newline': [ 'error', { multiline: true, minItems: 3 } ],
'array-element-newline': 'off',
'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': true,
},
],
'@typescript-eslint/no-dynamic-delete': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/unified-signatures': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-invalid-void-type': 'off',
},
})
.override('nuxt/vue/rules', {
rules: {
'vue/html-indent': [ 'error', 4 ],
'vue/multi-word-component-names': 'off',
},
})
.override('nuxt/stylistic', {
rules: {
'@stylistic/brace-style': [ 'error', '1tbs', { allowSingleLine: true } ],
'@stylistic/indent-binary-ops': 'off',
'@stylistic/max-statements-per-line': 'off',
'@stylistic/operator-linebreak': 'off',
'@stylistic/quote-props': [ 'error', 'consistent' ],
'@stylistic/space-before-function-paren': [ 'error', 'always' ],
'@stylistic/indent': [ 'error', 4 ],
'@stylistic/array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
},
})