-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
58 lines (58 loc) · 1.91 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
browser: true,
es2021: true
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'@vue/typescript/recommended',
'prettier',
'plugin:storybook/recommended'
],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.vue'],
ignorePatterns: ['.eslintrc.cjs']
},
plugins: ['no-relative-import-paths', 'vue', '@typescript-eslint', 'prettier', 'unused-imports'],
rules: {
'vue/multi-word-component-names': 'off',
'vue/component-api-style': ['error', ['script-setup']],
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/v-for-delimiter-style': ['error', 'in'],
radix: ['error', 'always'],
curly: 1,
'@typescript-eslint/explicit-function-return-type': [2],
'@typescript-eslint/no-explicit-any': [2],
'@typescript-eslint/prefer-ts-expect-error': [2],
'@typescript-eslint/ban-ts-comment': [0],
'ordered-imports': [0],
'object-literal-sort-keys': [0],
'new-parens': 1,
'no-bitwise': 1,
'no-cond-assign': 1,
'no-trailing-spaces': 0,
'eol-last': 1,
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'no-var': 2,
'prettier/prettier': 'warn',
'no-void': ['error', { allowAsStatement: true }],
'no-relative-import-paths/no-relative-import-paths': [
'warn',
{ allowSameFolder: true, rootDir: 'src', prefix: '@' }
],
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }
]
}
};