-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
83 lines (75 loc) Β· 1.98 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
module.exports = {
root: true,
env: {
node: true,
es6: true,
es2017: true,
es2020: true,
browser: true,
mongo: true,
},
plugins: ['prettier', 'vue', 'security'], //eslint-plugin-STRING
extends: [
'airbnb-base', // eslint-config
'eslint:recommended',
'plugin:security/recommended',
// 'prettier', // eslint-config - no need
'plugin:vue/recommended',
'plugin:prettier/recommended', // enable plugin prettier - set rule: 'prettier/prettier': 'error' - extends eslint-config-prettier
'prettier/vue', //eslint-config | extra exclusions for the another plugins, eg vue in this line
],
rules: {
// 'prettier/prettier': 'error', // - no need
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
},
},
],
'no-shadow': ['error', { allow: ['state'] }],
'no-param-reassign': [
'error',
{ props: false },
// { props: true, ignorePropertyModificationsFor: ['state'] },
],
'prefer-destructuring': ['error', { object: true, array: false }],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'import/no-unresolved': 0,
'import/extensions': 0,
// [
// 'error',
// 'ignorePackages',
// {
// js: 'never',
// mjs: 'never',
// jsx: 'never',
// ts: 'never',
// tsx: 'never',
// vue: 'never',
// },
// ],
},
// settings: {
// 'import/resolver': "webpack"
// // {
// // node: {
// // extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.vue'],
// // },
// // webpack: webpack,
// // // {
// // config: 'webpack.dev.config.js', // path.resolve('./webpack.config.eslint.js'),
// // },
// },
// },
globals: {
$nuxt: true,
},
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
parser: 'babel-eslint',
},
};