mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Merge pull request #2212 from rachel-fenichel/cleanup/remove_eslintrc
Remove old eslintrc and use .json for mocha eslintrc
This commit is contained in:
68
.eslintrc
68
.eslintrc
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"curly": ["error"],
|
||||
"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"]
|
||||
}
|
||||
],
|
||||
"keyword-spacing": ["error"],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 100,
|
||||
"tabWidth": 4,
|
||||
"ignoreStrings": true,
|
||||
"ignoreRegExpLiterals": true
|
||||
}
|
||||
],
|
||||
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"args": "after-used",
|
||||
# Ignore vars starting with an underscore.
|
||||
"varsIgnorePattern": "^_",
|
||||
# Ignore arguments starting with an underscore.
|
||||
"argsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"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
|
||||
"space-infix-ops": ["error"],
|
||||
"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"
|
||||
}
|
||||
Reference in New Issue
Block a user