forked from serverless-components/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
72 lines (72 loc) · 1.59 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
module.exports = {
root: true,
extends: ['prettier'],
plugins: ['import', 'prettier'],
env: {
es6: true,
jest: true,
node: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
globals: {
on: true // for the Socket file
},
rules: {
'array-bracket-spacing': [
'error',
'never',
{
objectsInArrays: false,
arraysInArrays: false
}
],
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', { before: true, after: true }],
'comma-dangle': ['error', 'never'],
curly: 'error',
'eol-last': 'error',
'func-names': 'off',
'id-length': [
'error',
{
min: 2,
max: 50,
properties: 'never',
exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$']
}
],
'no-alert': 'error',
'no-console': 'error',
'no-const-assign': 'error',
'no-else-return': 'error',
'no-empty': 'off',
'no-shadow': 'error',
'no-undef': 'error',
'no-unused-vars': 'error',
'no-use-before-define': 'error',
'no-useless-constructor': 'error',
'object-curly-newline': 'off',
'object-shorthand': 'off',
'prefer-const': 'error',
'prefer-destructuring': ['error', { object: true, array: false }],
quotes: [
'error',
'single',
{
allowTemplateLiterals: true,
avoidEscape: true
}
],
semi: ['error', 'never'],
'spaced-comment': 'error',
strict: ['error', 'never'],
'prettier/prettier': 'error'
}
}