-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
75 lines (65 loc) · 2.06 KB
/
index.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
module.exports = {
root: true,
env: {
node: true,
es6: true,
browser: true,
},
extends: ['plugin:vue/recommended', '@vue/airbnb', '@vue/prettier'],
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2019,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
// https://prettier.io/docs/en/integrating-with-linters.html#use-eslint-to-run-prettier
'prettier/prettier': 'error',
// https://eslint.org/docs/rules/no-plusplus
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
// https://eslint.org/docs/rules/no-shadow
'no-shadow': ['warn', { allow: ['state'] }],
// https://eslint.org/docs/rules/consistent-return
'consistent-return': 'off',
// https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md
'import/no-cycle': 'off',
// disallow certain syntax forms
// https://eslint.org/docs/rules/no-restricted-syntax
'no-restricted-syntax': [
'error',
{
selector: 'LabeledStatement',
message:
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message:
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
// https://eslint.vuejs.org/rules/require-default-prop.html#vue-require-default-prop
'vue/require-default-prop': 'off',
// https://eslint.vuejs.org/rules/html-self-closing.html#vue-html-self-closing
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
// https://eslint.org/docs/rules/func-names
'func-names': 'off',
// rule: https://eslint.org/docs/rules/no-param-reassign.html
'no-param-reassign': 'off',
// rule: https://eslint.org/docs/rules/camelcase
camelcase: 'off',
},
};