12345678910111213141516171819202122232425262728 |
- {
- "rules": {
- "curly": ["error", "multi-line"],
- "eol-last": ["error"],
- "indent": ["error", 2, {"SwitchCase": 1}], # Blockly/Google use 2-space indents
- "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 mixes single and 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"
- }
|