1 Star 0 Fork 19

zanxueyan/blockly

forked from Gitee 极速下载/blockly 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.json 2.93 KB
一键复制 编辑 原始数据 按行查看 历史
{
"rules": {
"curly": ["error"],
"eol-last": ["error"],
// Blockly/Google use 2-space indents.
// Blockly/Google uses +4 space indents for line continuations.
// Ignore default rules for ternary expressions.
"indent": [
"error", 2,
{
"SwitchCase": 1,
"MemberExpression": 2,
"ObjectExpression": 1,
"FunctionDeclaration": {
"body": 1,
"parameters": 2
},
"FunctionExpression": {
"body": 1,
"parameters": 2
},
"CallExpression": {
"arguments": 2
},
"ignoredNodes": ["ConditionalExpression"]
}
],
"keyword-spacing": ["error"],
"linebreak-style": ["error", "unix"],
"max-len": [
"error",
{
"code": 100,
"tabWidth": 4,
"ignoreStrings": true,
"ignoreRegExpLiterals": true,
"ignoreUrls": 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"],
// Blockly uses for exporting symbols. no-self-assign added in eslint 5.
"no-self-assign": ["off"],
// Blockly uses single quotes except for JSON blobs, which must use double quotes.
"quotes": ["off"],
"semi": ["error", "always"],
// Blockly doesn't have space before function paren when defining functions.
"space-before-function-paren": ["error", "never"],
// Blockly doesn't have space before function paren when calling functions.
"func-call-spacing": ["error", "never"],
"space-infix-ops": ["error"],
// Blockly uses 'use strict' in files.
"strict": ["off"],
// Closure style allows redeclarations.
"no-redeclare": ["off"],
"valid-jsdoc": ["error", {"requireReturn": false}],
"no-console": ["off"],
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"operator-linebreak": ["error", "after"],
"spaced-comment": ["error", "always", {
"block": {
"balanced": true
},
"exceptions": ["*"]
}],
"es5/no-es6-methods": ["warn"]
},
"env": {
"browser": true
},
"globals": {
"Blockly": true,
"goog": true
},
"extends": [
"eslint:recommended",
"plugin:es5/no-es2015"
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zanxy/blockly.git
git@gitee.com:zanxy/blockly.git
zanxy
blockly
blockly
master

搜索帮助