forked from monarch-initiative/monarch-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
71 lines (69 loc) · 1.95 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
const errorInProduction = process.env.NODE_ENV === 'production' ? 'error' : 'off';
const path = require('path');
module.exports = {
root: true,
env: {
node: true,
browser: true
},
plugins: [
'import',
'vue'
],
extends: [
// 'plugin:import/errors',
// 'plugin:import/warnings',
'plugin:vue/recommended',
'plugin:vue/essential',
'@vue/standard',
'airbnb-base',
],
rules: {
'no-console': errorInProduction,
'no-debugger': errorInProduction,
'import/dynamic-import-chunkname': 'error',
'brace-style': [2, 'stroustrup'],
'padded-blocks': 0,
'indent': [2, 2, { 'SwitchCase': 1 }],
'spaced-comment': 1,
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
// 'import/prefer-default-export': 'off',
// 'arrow-parens': ['error', 'as-needed'],
// 'vue/html-self-closing': 0,
// 'vue/html-indent': 1,
'global-require': 0,
'no-unused-vars': [0, { 'argsIgnorePattern': '^_' }],
'quote-props': [0],
'prefer-destructuring': 0,
'prefer-arrow-callback': 0,
'prefer-template': 0,
'comma-dangle': 0,
'max-len': 0,
'standard/no-callback-literal': 0,
'no-param-reassign': 0,
'no-underscore-dangle': 0,
},
parserOptions: {
parser: 'babel-eslint'
},
settings: {
//
// eslint-import-resolver-webpack is supposed to allow the webpack
// aliases from webpack.config.js to be recognized as valid import
// locations, but it doesn't work.
// So I'm using eslint-import-resolver-alias and duplicating the
// aliases here, which does work.
//
'import/resolver': {
alias: { // https://www.npmjs.com/package/eslint-import-resolver-alias
map: [
['@', path.resolve(__dirname, 'src')],
['vue$', 'vue/dist/vue.runtime.esm.js'],
],
},
webpack: { // https://www.npmjs.com/package/eslint-import-resolver-webpack
// Does not work, but should
},
}
},
};