-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.js
56 lines (56 loc) · 1.64 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
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-recommended',
'@vue/typescript',
'@vue/prettier',
'prettier/@typescript-eslint',
'plugin:@typescript-eslint/recommended',
'plugin:vue-scoped-css/recommended',
],
rules: {
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// TODO: once we are ready to start force-migrating away from `I` prefix, enable this rule
// '@typescript-eslint/naming-convention': [
// 'warn',
// {
// selector: 'interface',
// format: ['PascalCase'],
// custom: {
// regex: "^I[A-Z]",
// match: false
// }
// }
// ],
'no-undef': 'off', // interferes with typescript `as const`
'no-use-before-define': 'off',
'no-unused-expressions': 'off',
'no-useless-constructor': 'off', // better covered by @typescript-eslint/no-useless-constructor
'vue/require-default-prop': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-extra-semi': 'off', // sometimes in conflict with prettier
'@typescript-eslint/no-unused-vars': [
'warn',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],
'vue/attribute-hyphenation': [
'warn',
'never',
{ ignore: ['text-anchor', 'clip-rule', 'clip-path-units', 'stroke-width'] },
],
'vue/component-name-in-template-casing': ['warn', 'PascalCase'],
},
parserOptions: {
parser: '@typescript-eslint/parser',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
}