diff --git a/package.json b/package.json index cdc698a..673b971 100644 --- a/package.json +++ b/package.json @@ -57,5 +57,39 @@ "presets": [ "babel-preset-react-app" ] + }, + "eslintConfig": { + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:import/errors", + "plugin:import/warnings" + ], + "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "env": { + "browser": true, + "node": true, + "es6": true, + "jest": true + }, + "rules": { + "no-debugger": "off", + "no-console": "off", + "no-unused-vars": "warn", + "react/prop-types": "warn" + }, + "settings": { + "react": { + "version": "detect" + } + }, + "root": true } } diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 4c9097f..2673392 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -33,7 +33,7 @@ module.exports = { { test: /\.(js|jsx)$/, exclude: /node_modules/, - use: ["babel-loader"] + use: ["babel-loader", "eslint-loader"] }, { test: /(\.css)$/,