-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue-eslint.config.ts
More file actions
97 lines (94 loc) · 4.15 KB
/
vue-eslint.config.ts
File metadata and controls
97 lines (94 loc) · 4.15 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import globals from 'globals';
import { globalIgnores } from 'eslint/config';
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
import pluginVue from 'eslint-plugin-vue';
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
import stylistic from '@stylistic/eslint-plugin';
export default defineConfigWithVueTs(
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
skipFormatting,
{
plugins: { '@stylistic': stylistic },
rules: {
'@stylistic/array-bracket-newline': ['error', { minItems: 4, multiline: true }],
'@stylistic/array-bracket-spacing': ['error', 'never'],
'@stylistic/array-element-newline': ['error', { consistent: true, multiline: true }],
'@stylistic/arrow-parens': ['error', 'always'],
'@stylistic/arrow-spacing': ['error', { before: true, after: true }],
'@stylistic/block-spacing': 'error',
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/comma-spacing': ['error', { before: false, after: true }],
'@stylistic/computed-property-spacing': ['error', 'never'],
'@stylistic/curly-newline': ['error', 'always'],
'@stylistic/dot-location': ['error', 'property'],
'@stylistic/function-paren-newline': ['error', { minItems: 4 }],
'@stylistic/indent': ['error', 2],
'@stylistic/key-spacing': ['error', { afterColon: true, beforeColon: false }],
'@stylistic/keyword-spacing': ['error', { before: true }],
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/max-len': ['error', { code: 120 }],
'@stylistic/lines-around-comment': ['error', { beforeBlockComment: true }],
'@stylistic/lines-between-class-members': ['error', 'always'],
'@stylistic/max-statements-per-line': ['error', { max: 1 }],
'@stylistic/new-parens': 'error',
'@stylistic/newline-per-chained-call': 'off',
'@stylistic/no-confusing-arrow': ['error'],
'@stylistic/no-extra-semi': 'error',
'@stylistic/no-floating-decimal': 'error',
'@stylistic/no-mixed-spaces-and-tabs': 'error',
'@stylistic/no-multi-spaces': 'error',
'@stylistic/no-multiple-empty-lines': 'error',
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/object-curly-newline': ['error', { multiline: true, minProperties: 3 }],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/operator-linebreak': ['error', 'after'],
'@stylistic/padded-blocks': ['error', 'never'],
'@stylistic/padding-line-between-statements': [
'error',
{
blankLine: 'always', prev: '*', next: 'return',
},
],
'@stylistic/quote-props': ['error', 'consistent-as-needed'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/rest-spread-spacing': ['error', 'never'],
'@stylistic/semi': 'error',
'@stylistic/semi-spacing': 'error',
'@stylistic/semi-style': ['error', 'last'],
'@stylistic/space-before-blocks': ['error', 'always'],
'@stylistic/space-before-function-paren': ['error', 'never'],
'@stylistic/space-in-parens': ['error', 'never'],
'@stylistic/space-infix-ops': ['error', { int32Hint: false }],
'@stylistic/spaced-comment': ['error', 'always'],
'@stylistic/switch-colon-spacing': 'error',
'@stylistic/template-curly-spacing': 'error',
'@stylistic/type-annotation-spacing': 'error',
'@stylistic/type-generic-spacing': ['error'],
'@stylistic/type-named-tuple-spacing': ['error'],
'curly': ['error', 'all'],
'import/no-absolute-path': 'off',
'no-console': 'warn',
'no-debugger': 'warn',
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-undef': 'error',
'no-unreachable': 'warn',
'no-unused-vars': 'warn',
},
},
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
...globals.node,
},
},
},
);