From ae8790bd6cfaa08561518da9916e28662c25571a Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Sat, 14 Oct 2017 11:27:20 +0300 Subject: [PATCH] updated eslint to work with React --- .eslintrc.js | 12 ++++++++++-- package.json | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9e6ae9f1..e2fd2a38 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,8 @@ module.exports = { "extends": "standard", "plugins": [ "standard", - "promise" + "promise", + "react", ], "globals": { "angular": true, @@ -17,6 +18,13 @@ module.exports = { "space-before-function-paren": "off", "comma-dangle": "off", "no-tabs": "off", - "indent": ["error", "tab"] + "indent": ["error", "tab"], + "react/jsx-uses-react": "error", + "react/jsx-uses-vars": "error", + }, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } } }; \ No newline at end of file diff --git a/package.json b/package.json index d0b8b362..4dddc233 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "eslint": "^3.9.1", "eslint-config-standard": "^6.2.1", "eslint-plugin-promise": "^3.3.1", + "eslint-plugin-react": "^7.4.0", "eslint-plugin-standard": "^2.0.1", "gulp": "^3.8.10", "gulp-concat": "^2.4.1",