Skip to content

Commit

Permalink
chore: add eslint plugin (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor authored Nov 14, 2023
1 parent dda2eb9 commit cc655ab
Show file tree
Hide file tree
Showing 39 changed files with 291 additions and 472 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "@typescript-eslint", "prettier"],
plugins: ["react", "@typescript-eslint", "prettier", "react-hooks"],
rules: {
"arrow-body-style": "error",
"camelcase": "off",
Expand All @@ -22,6 +22,7 @@ module.exports = {
"no-unused-vars": "off",
"object-shorthand": "error",
"prefer-const": "error",
"prefer-template": "error",
"quote-props": ["error", "consistent-as-needed"],

"@typescript-eslint/no-shadow": "error",
Expand Down Expand Up @@ -57,7 +58,6 @@ module.exports = {
},
],

"prefer-template": "error",
"react/function-component-definition": "off",
"react/jsx-boolean-value": "error",
"react/jsx-one-expression-per-line": "off",
Expand All @@ -69,6 +69,9 @@ module.exports = {
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/self-closing-comp": "error",

"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",
},
overrides: [
{
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Sitemaps
public/*.xml
test-results

# dependencies
/node_modules
Expand Down
Loading

0 comments on commit cc655ab

Please sign in to comment.