extract eslint rules from package.json (#1480)

This commit is contained in:
Youssef Meskini 2020-04-23 18:35:05 +02:00 committed by GitHub
parent fa8354e306
commit 28f4ee5783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 39 deletions

30
.eslintrc Normal file
View File

@ -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"
}
]
}
}

View File

@ -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": {