-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
72 lines (62 loc) · 1.72 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
/* eslint-disable max-len */
module.exports = {
root: true,
env: {
browser: true,
es6: true,
},
extends: [
// https://github.com/airbnb/javascript
'airbnb-base',
// https://eslint.vuejs.org/rules/
'plugin:vue/essential',
// https://prettier.io/docs/en/integrating-with-linters.html#use-eslint-to-run-prettier
'plugin:prettier/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['vue'],
settings: {
'import/core-modules': ['vue'],
},
rules: {
// https://prettier.io/docs/en/integrating-with-linters.html#eslint
'prettier/prettier': 'error',
// Allow unresolved imports
// https://github.com/nuxt/eslint-config/blob/master/packages/eslint-config/index.js
'import/no-unresolved': 'off',
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
'import/extensions': [
'error',
'never',
{
vue: 'always',
json: 'always',
},
],
// https://eslint.org/docs/rules/max-len
// https://github.com/vuejs/eslint-plugin-vue/issues/731
'max-len': 'off',
// https://eslint.org/docs/rules/radix
radix: ['error', 'as-needed'],
// https://eslint.org/docs/rules/no-param-reassign
'no-param-reassign': 'off',
// Allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'vue/attribute-hyphenation': [
'error',
'always',
{
ignore: ['fetchFormat'],
},
],
},
};