-
Notifications
You must be signed in to change notification settings - Fork 24
/
.eslintrc.js
63 lines (63 loc) · 1.57 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
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: [
'@nuxtjs',
'eslint:recommended',
'google'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
parser: 'babel-eslint'
},
// TODO: should fix properly
// ! Just followed https://chestozo.medium.com/fixing-eslint-no-invalid-this-error-for-fat-arrow-class-methods-a56908ca8bb6
plugins: [
'babel',
'import'
],
rules: {
// Vue
'vue/html-closing-bracket-newline': ['error', {
singleline: 'never',
multiline: 'never'
}],
'vue/no-v-html': ['error'],
// JavaScript
'comma-dangle': ['error', 'never'],
'no-console': ['warn'],
indent: ['error', 2],
'quote-props': ['error', 'as-needed'],
'max-len': ['warn',
{
code: 130
} // 130 on GitHub, 80 on npmjs.org for README.md code blocks
],
'arrow-parens': ['error', 'as-needed'],
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'never'
}
],
'no-negated-condition': 'warn',
'spaced-comment': ['error', 'always',
{
exceptions: ['/']
}
],
'object-curly-spacing': ['error', 'always'],
semi: ['error', 'always'],
'require-jsdoc': 'off', // TODO: should turn on and fix accordingly
'import/exports-last': 'error',
// TODO: should fix properly
// ! Just followed https://chestozo.medium.com/fixing-eslint-no-invalid-this-error-for-fat-arrow-class-methods-a56908ca8bb6
'no-invalid-this': 0,
'babel/no-invalid-this': 1
}
};