-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
107 lines (104 loc) · 3.13 KB
/
.eslintrc.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
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
98
99
100
101
102
103
104
105
106
107
module.exports = {
root: true,
ignorePatterns: [
'/public',
'/dist',
'/old',
'tests',
'tests/**',
'tests/**/*',
'**/tests/**/*',
'/node_modules',
'**/node_modules/**/*',
],
env: {
node: true,
mocha: true,
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
// "plugin:cypress/recommended",
// 'plugin:@typescript-eslint/recommended',
'standard',
'plugin:vue/vue3-recommended',
// 'plugin:typescript/recommended',
// '@vue/standard',
// '@vue/typescript',
],
plugins: [
// 'typescript',
'@typescript-eslint',
// 'cypress',
'import',
'unused-imports',
'simple-import-sort',
// 'eslint-plugin-mad-vue3',
],
rules: {
indent: ['error', 2],
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-var': 'error',
'no-unused-vars': 'warn',
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
'comma-dangle': ['error', 'always-multiline'],
'vue/html-self-closing': ['error', { html: { void: 'never', normal: 'never', component: 'always' } }],
'vue/html-indent': 'error',
// 'vue/max-attributes-per-line': ['error', { 'singleline': 12, 'multiline': { 'max': 1 } }],
'vue/html-closing-bracket-newline': ['off'],
'vue/max-attributes-per-line': ['off'],
'vue/no-v-html': ['off'],
'vue/singleline-html-element-content-newline': 'off',
'vue/require-prop-types': 'off',
'vue/require-default-prop': 'off',
camelcase: 'off', // because we work with python backend
// "@typescript-eslint/no-unused-vars": "off",
'unused-imports/no-unused-imports-ts': 'error',
// "unused-imports/no-unused-vars-ts": ["warn", { vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" }],
// 'no-trailing-spaces': 'off',
'dot-notation': 'off',
// 'sort-imports': 'warn',
'vue/no-mutating-props': 'off',
'sort-imports': 'off',
'import/order': 'off',
'simple-import-sort/exports': 'warn',
// 'simple-import-sort/imports': 'warn',
// https://github.com/lydell/eslint-plugin-simple-import-sort/
'simple-import-sort/imports': ['warn', { groups: [['^\\u0000', '^@?\\w', '^', '^\\.', '^.+\\.vue$', '^.+\\.s?css$']] }],
// '@typescript-eslint/dot-notation': ['error'],
// 'mad-vue3/import-component': 'error',
// 'mad-vue3/unknown-component': 'error',
},
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.vue'],
},
// overrides: [
// {
// files: [
// 'src/**/*.ts',
// 'src/**/*.vue',
// '*.js',
// '*.json',
// '*.ts',
// '*.html',
// ],
// },
// // {
// // files: [
// // '**/__tests__/*.{j,t}s?(x)',
// // 'tests/unit/**/*.spec.{j,t}s?(x)',
// // 'tests/e2e/**/*.ts',
// // ],
// // plugins: [
// // 'cypress',
// // ],
// // env: {
// // // 'cypress/globals': true,
// // },
// // },
// ],
}