aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-09 11:54:05 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-09 15:43:17 +0900
commit1a7632e353d60d5c0fd46a8a3fa659889b6ae080 (patch)
tree216b9c5cf1412f87d5155e30282a15016b44b484
parent9a6a614466f7d83bca3e05e24982d16d32b7a3d6 (diff)
configure eslint
-rw-r--r--.eslintrc9
-rw-r--r--package.json2
2 files changed, 8 insertions, 3 deletions
diff --git a/.eslintrc b/.eslintrc
index 216b847..d244c8f 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -5,13 +5,14 @@
"browser" : true,
"webextensions": true
},
+ "plugins": ["react"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
- "extends": [ "eslint:all" ],
+ "extends": [ "eslint:all", "plugin:react/recommended" ],
"rules": {
"array-bracket-newline": ["error", { "multiline": true }],
"array-element-newline": "off",
@@ -27,6 +28,7 @@
"function-paren-newline": "off",
"id-length": "off",
"indent": ["error", 2],
+ "jsx-quotes": ["error", "prefer-single"],
"max-statements": ["error", 15],
"multiline-ternary": "off",
"newline-after-var": "off",
@@ -56,6 +58,9 @@
"sort-imports": "off",
"sort-keys": "off",
"sort-vars": "off",
- "space-before-function-paren": ["error", "never"]
+ "space-before-function-paren": ["error", "never"],
+
+ "react/jsx-indent": ["error", 2],
+ "react/prop-types": "off",
}
}
diff --git a/package.json b/package.json
index e00c1ee..42da3a7 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"description": "Vim vixen",
"scripts": {
"start": "webpack -w --debug",
- "lint": "eslint src",
+ "lint": "eslint --ext .jsx,.js src",
"test": "karma start"
},
"repository": {