Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Refactor lint configs
  • Loading branch information
Kuniwak committed Apr 7, 2015
commit 7fe335d1a10f6335df1ca14210611040e99c416b
10 changes: 8 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"node": true
},
"rules": {
"quotes": [2, "single"],
"no-use-before-define": 0
"//": "single quote に統一",
"quotes": [2, "single", "avoid-escape"],

"//": "関数宣言文以外は hoisting 避けのため禁止",
"no-use-before-define": [2, "nofunc"],

"//": "この形式のキャストはくっついていないと読みづらい",
"space-infix-ops": [2, { "int32Hint": false }]
}
}
8 changes: 7 additions & 1 deletion public/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"env": {
"mocha": true
"mocha": true,
"browser": true,
"jquery": true
},
"globals": {
"expect": false
},
"rules": {
"//": "chai の expect 構文が誤警告になるため無視",
"no-unused-expressions": 0
}
}
11 changes: 0 additions & 11 deletions public/stage1/.eslintrc

This file was deleted.

11 changes: 0 additions & 11 deletions public/stage2/.eslintrc

This file was deleted.

11 changes: 0 additions & 11 deletions public/stage3/.eslintrc

This file was deleted.

11 changes: 0 additions & 11 deletions public/stage4/.eslintrc

This file was deleted.

9 changes: 1 addition & 8 deletions public/stage5/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"env": {
"browser": true,
"mocha": true
},
"globals": {
"$": false,
"jQuery": false,
"fetch": false,
"Promise": false,
"HTMLCollection": false
"Promise": false
}
}
11 changes: 2 additions & 9 deletions public/stage6/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"env": {
"browser": true,
"mocha": true
},
"rules": {
"no-unused-expressions": 0,
"//": "シャレオツコードの意図が undefined 代入だとわかりやすいので許可",
"no-undef-init": 0
},
"globals": {
"$": false,
"jQuery": false,
"fetch": false,
"Promise": false,
"HTMLCollection": false
"Promise": false
}
}
19 changes: 9 additions & 10 deletions public/stage7/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"env": {
"browser": true,
"mocha": true
},
"rules": {
"no-unused-expressions": 0,
"no-undef-init": 0
"//": "undefined 上書き問題のため、明示的な undefined 代入を許可",
"no-undef-init": 0,

"//": "== 演算子の振る舞いの問題の警告は誤警告",
"yoda": 0,

"//": "truthy, falsey を判定する問題のため、定数式を許可",
"no-constant-condition": 0
},
"globals": {
"$": false,
"jQuery": false,
"fetch": false,
"Promise": false,
"HTMLCollection": false
"Promise": false
}
}