forked from scratchfoundation/scratch-blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
27 lines (27 loc) · 1.09 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
{
"rules": {
"curly": [2, "multi-line"],
"eol-last": [2],
"indent": [2, 2, {"SwitchCase": 1}], # Blockly/Google use 2-space indents
"linebreak-style": [2, "unix"],
"max-len": [2, 120, 4],
"no-trailing-spaces": [2, { "skipBlankLines": true }],
"no-unused-vars": [2, {"args": "after-used", "varsIgnorePattern": "^_"}],
"quotes": [0], # Blockly mixes single and double quotes
"semi": [2, "always"],
"space-before-function-paren": [2, "never"], # Blockly doesn't have space before function paren
"strict": [0], # Blockly uses 'use strict' in files
"no-cond-assign": [0], # Blockly often uses cond-assignment in loops
"valid-jsdoc": [2, {"requireReturn": false}],
"no-redeclare": [0], # Preference from Blockly/Google
"no-console": ["off"] # Blockly uses console for errors to developers.
},
"env": {
"browser": true
},
"globals": {
"Blockly": true, # Blockly global
"goog": true # goog closure libraries/includes
},
"extends": "eslint:recommended"
}