add lint js
This commit is contained in:
@@ -4,7 +4,12 @@
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:react/recommended"
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/stylistic",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:tailwindcss/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
@@ -19,30 +24,25 @@
|
||||
"tailwindcss"
|
||||
],
|
||||
"rules": {
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"no-undef": ["error", {"typeof": true}],
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/button-has-type": "error",
|
||||
"react/prop-types": "error",
|
||||
"react/require-default-props": "off",
|
||||
"react/no-array-index-key": "error",
|
||||
"react/jsx-uses-react": "error",
|
||||
"react/display-name": "error",
|
||||
"react/no-danger-with-children": "error",
|
||||
// "react-hooks/exhaustive-deps": "warn",
|
||||
// "react/jsx-no-bind": "error",
|
||||
"react/jsx-uses-vars": "error",
|
||||
"no-restricted-syntax": ["warn", {
|
||||
"selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|info)$/]",
|
||||
"message": "Unexpected property on console object was called"
|
||||
}],
|
||||
"semi": [2, "never"],
|
||||
"tailwindcss/classnames-order": "warn",
|
||||
"tailwindcss/no-custom-classname": ["warn", {
|
||||
"cssFiles": ["resources/css/app.css"],
|
||||
"whitelist": []
|
||||
}],
|
||||
"tailwindcss/enforces-negative-arbitrary-values": "warn",
|
||||
"tailwindcss/enforces-shorthand": "warn",
|
||||
"tailwindcss/migration-from-tailwind-2": "warn",
|
||||
"tailwindcss/no-arbitrary-value": "off",
|
||||
// "tailwindcss/no-arbitrary-value": "off",
|
||||
// "tailwindcss/no-arbitrary-value": "error",
|
||||
"tailwindcss/no-contradicting-classname": "error"
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "18.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://dev.to/logrocket/12-essential-eslint-rules-for-react-5doc
|
||||
|
||||
Reference in New Issue
Block a user