From 28f4ee57834d45939bca024dd3862960e45e44ab Mon Sep 17 00:00:00 2001 From: Youssef Meskini Date: Thu, 23 Apr 2020 18:35:05 +0200 Subject: [PATCH] extract eslint rules from package.json (#1480) --- .eslintrc | 30 ++++++++++++++++++++++++++++++ package.json | 39 --------------------------------------- 2 files changed, 30 insertions(+), 39 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..37be252c --- /dev/null +++ b/.eslintrc @@ -0,0 +1,30 @@ +{ + "extends": ["prettier", "react-app"], + "plugins": ["prettier"], + "rules": { + "curly": "warn", + "no-console": [ + "warn", + { + "allow": ["warn", "error", "info"] + } + ], + "no-else-return": "warn", + "no-useless-return": "warn", + "prefer-const": [ + "warn", + { + "destructuring": "all" + } + ], + "prefer-template": "warn", + "prettier/prettier": "warn", + "no-restricted-syntax": [ + "warn", + { + "selector": "JSXText[value=/\\w/]", + "message": "Use 't(...)' instead of literal text in JSX" + } + ] + } +} diff --git a/package.json b/package.json index 3fb78e83..4aee8eff 100644 --- a/package.json +++ b/package.json @@ -57,45 +57,6 @@ "engines": { "node": ">=12.0.0" }, - "eslintConfig": { - "extends": [ - "prettier", - "react-app" - ], - "plugins": [ - "prettier" - ], - "rules": { - "curly": "warn", - "no-console": [ - "warn", - { - "allow": [ - "warn", - "error", - "info" - ] - } - ], - "no-else-return": "warn", - "no-useless-return": "warn", - "prefer-const": [ - "warn", - { - "destructuring": "all" - } - ], - "prefer-template": "warn", - "prettier/prettier": "warn", - "no-restricted-syntax": [ - "warn", - { - "selector": "JSXText[value=/\\w/]", - "message": "Use 't(...)' instead of literal text in JSX" - } - ] - } - }, "homepage": ".", "husky": { "hooks": {