forked from porybox/porybox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
79 lines (79 loc) · 2.53 KB
/
.eslintrc
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
76
77
78
79
{
"parser": "babel-eslint",
'env': {
'es6': true,
'node': true
},
'ecmaFeatures': {
'arrowFunctions': true,
'blockBindings': true,
'classes': true,
'defaultParams': true,
'destructuring': false,
'forOf': true,
'generators': false,
'modules': true,
'objectLiteralComputedProperties': true,
'objectLiteralDuplicateProperties': false,
'objectLiteralShorthandMethods': true,
'objectLiteralShorthandProperties': true,
'restParams': false,
'spread': false,
'superInFunctions': true,
'templateStrings': true,
'jsx': true
},
'rules': {
'eqeqeq': 2,
"indent": [2, 2],
// disallow modifying variables that are declared using const
'no-const-assign': 2,
// require let or const instead of var
'no-var': 2,
// suggest using of const declaration for variables that are never modified after declared
'prefer-const': 1,
// enforce one true brace style
'brace-style': [2, '1tbs', {'allowSingleLine': true }],
// require camel case names
'camelcase': [2, {'properties': 'never'}],
// enforce one true comma style
'comma-style': [2, 'last'],
// enforce newline at the end of file, with no multiple empty lines
'eol-last': 2,
// enforces spacing between keys and values in object literal properties
'key-spacing': [2, {'beforeColon': false, 'afterColon': true}],
// require a capital letter for constructors
'new-cap': [2, {'newIsCap': true}],
'no-console': 0,
// disallow mixed spaces and tabs for indentation
'no-mixed-spaces-and-tabs': 2,
// disallow trailing whitespace at the end of lines
'no-trailing-spaces': 2,
// disallow declaration of variables that are not used in the code
'no-unused-expressions': 2,
'no-unused-vars': 1,
// require all variables to be defined
'no-undef': "error",
// specify whether double or single quotes should be used
'quotes': [2, 'single', 'avoid-escape'],
'semi': 1,
// enforce spacing before and after semicolons
'semi-spacing': [2, {'before': false, 'after': true}],
// require spaces around operators
'space-infix-ops': 2,
// require spaces following keywords
'keyword-spacing': 2,
// warn when line length is greater than 80 characters
'max-len': [1, 100, 2, { 'ignoreComments': true, 'ignoreUrls': true }]
},
'globals': {
'sails': true,
'describe': true,
'it': true,
'before': true,
'beforeEach': true,
'after': true,
'afterEach': true
},
'extends': "eslint:recommended",
}