-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
70 lines (69 loc) · 1.52 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaFeatures: { legacyDecorators: true }
},
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:nuxt/recommended',
'plugin:eslint-comments/recommended',
'plugin:prettier/recommended',
'prettier/vue',
'prettier/@typescript-eslint'
],
plugins: ['vue', 'prettier', '@typescript-eslint', 'json'],
settings: {
'import/core-modules': ['vue', 'vuex','axios'],
'import/resolver': {
nuxt: {
nuxtSrcDir: 'src',
extensions: ['.js', '.ts', '.json', '.vue']
}
}
},
// add your custom rules here
rules: {
//'class-methods-use-this': 0,
'prettier/prettier': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'import/no-unresolved': 'warn',
'unicorn/number-literal-case': 'off',
'import/no-dynamic-require': 'off',
'global-require': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'max-classes-per-file': 'warn',
'import/prefer-default-export': 'warn',
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
ignores: [
'nuxt',
'nuxt-link',
'n-link',
'nuxt-child',
'no-ssr',
'client-only',
'svg-icon'
]
}
]
},
overrides: [
{
files: ['*.d.ts'],
rules: {
'import/no-extraneous-dependencies': 0
}
}
]
}