Skip to content

Commit

Permalink
v0.0.16 将no-shadow改为warn
Browse files Browse the repository at this point in the history
  • Loading branch information
leizongmin committed Nov 23, 2016
1 parent 4954cc0 commit 25dcc5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions index.js
Expand Up @@ -111,12 +111,6 @@ module.exports = {
'eqeqeq': [ 'error', 'allow-null' ],
// 禁止在 else 前有 return
'no-else-return': 'error',
// 禁止变量声明覆盖外层作用域的变量
'no-shadow': [ 'error', {
builtinGlobals: true,
hoist: 'functions',
allow: [ 'err', 'error', 'resolve', 'reject', 'done', 'callback', 'next' ],
}],
// 关键字不能被遮蔽
'no-shadow-restricted-names': 'error',

Expand Down Expand Up @@ -238,6 +232,12 @@ module.exports = {
'object-shorthand': 'warn',
// 建议可以表达为更简单结构的条件表达式
'no-unneeded-ternary': 'warn',
// 禁止变量声明覆盖外层作用域的变量
'no-shadow': [ 'warn', {
builtinGlobals: true,
hoist: 'functions',
allow: [ 'err', 'error', 'resolve', 'reject', 'done', 'callback', 'next' ],
}],

// ------------------------ Pomise 强制的风格 --------------------------------
// 调用 Pomise 函数时,必须有 .catch(callback) 或者用 return 返回当前 Promise 对象
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-config-lei",
"version": "0.0.15",
"version": "0.0.16",
"description": "my own eslint config",
"main": "index.js",
"files": [
Expand Down

0 comments on commit 25dcc5b

Please sign in to comment.