-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
102 lines (102 loc) · 2.62 KB
/
.eslintrc.js
File metadata and controls
102 lines (102 loc) · 2.62 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
[References]
ESLint
http://eslint.org/docs/rules
http://eslint.org/docs/user-guide/configuring
http://eslint.org/docs/user-guide/configuring#using-configuration-files
http://eslint.org/docs/user-guide/configuring#specifying-environments
http://eslint.org/docs/user-guide/configuring.html#specifying-globals
https://github.com/yannickcr/eslint-plugin-react
http://eslint.org/docs/user-guide/migrating-to-2.0.0#language-options
https://leanpub.com/understandinges6/read
*/
module.exports = {
"env": {
"browser": true,
"es6": true,
"jasmine": true,
"jest": true,
"node": true,
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6,
"ecmaFeatures": {
"modules": true,
"jsx": true,
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"restParams": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true
}
},
"globals": {
"describe": true,
"it": true
},
"plugins": [
"jest",
"react"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
// Style Guide
"array-bracket-spacing": ["error", "never"],
"comma-dangle": ["error", "never"],
"curly": ["error", "all"],
"func-call-spacing": ["error", "never"],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"no-duplicate-imports": "error",
"no-floating-decimal": "error",
"no-tabs": "error",
"no-trailing-spaces": ["error", {
"skipBlankLines": false
}],
"no-var": "error",
"no-whitespace-before-property": "error",
"quotes": ["error", "double"],
"semi": ["error", "always"],
// Error Prevention
"no-cond-assign": ["error", "always"],
"no-console": "off",
// Code Performance
"global-require": "warn",
"no-unused-vars": "warn",
// Documentation
"require-jsdoc": ["off", {
"require": {
"FunctionDeclaration": false,
"MethodDefinition": false,
"ClassDeclaration": true,
"ArrowFunctionExpression": false
}
}],
"valid-jsdoc": ["off", {
"prefer": {
"arg": "param",
"argument": "param",
"virtual": "abstract"
},
"requireParamDescription": false,
"requireReturnDescription": false,
"requireReturnType": false
}],
// Unit Tests
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error"
}
};