forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
49 lines (49 loc) · 1.87 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
{
"rules": {
"curly": ["error", "multi-line"],
"eol-last": ["error"],
"indent": [
"error", 2, # Blockly/Google use 2-space indents
# Blockly/Google uses +4 space indents for line continuations.
{
"SwitchCase": 1,
"MemberExpression": 2,
"ObjectExpression": 1,
"FunctionDeclaration": {
"body": 1,
"parameters": 2
},
"FunctionExpression": {
"body": 1,
"parameters": 2
},
"CallExpression": {
"arguments": 2
},
# Ignore default rules for ternary expressions.
"ignoredNodes": ["ConditionalExpression"]
}
],
"linebreak-style": ["error", "unix"],
"max-len": ["error", 120, 4],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"no-unused-vars": ["error", {"args": "after-used", "varsIgnorePattern": "^_"}],
"no-use-before-define": ["error"],
"quotes": ["off"], # Blockly uses single quotes except for JSON blobs, which must use double quotes.
"semi": ["error", "always"],
"space-before-function-paren": ["error", "never"], # Blockly doesn't have space before function paren
"strict": ["off"], # Blockly uses 'use strict' in files
"no-cond-assign": ["off"], # Blockly often uses cond-assignment in loops
"no-redeclare": ["off"], # Closure style allows redeclarations
"valid-jsdoc": ["error", {"requireReturn": false}],
"no-console": ["off"]
},
"env": {
"browser": true
},
"globals": {
"Blockly": true, # Blockly global
"goog": true # goog closure libraries/includes
},
"extends": "eslint:recommended"
}