From 2d294ddccdbe369240c0c4e303694fe1c16fe2f8 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 11 Apr 2020 01:18:45 +0300 Subject: [PATCH] eslint config --- package.json | 34 ++++++++++++++++++++++++++++++++++ webpack.config.dev.js | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) 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)$/,