Skip to content

Commit

Permalink
feat(@pixiv/eslint-config): update rules
Browse files Browse the repository at this point in the history
  • Loading branch information
yue4u committed Oct 25, 2024
1 parent a8c9f0d commit b2597b4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
12 changes: 10 additions & 2 deletions packages/eslint-config/src/__snapshots__/next.rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"no-fallthrough": "error",
"no-constant-condition": "error",
"object-shorthand": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
Expand Down Expand Up @@ -38,9 +43,12 @@
]
}
],
"react/prop-types": "warn",
"react/require-render-return": 2,
"react/self-closing-comp": "error",
"react/jsx-boolean-value": [
"error",
"never"
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react-compiler/react-compiler": "warn",
Expand Down
12 changes: 10 additions & 2 deletions packages/eslint-config/src/__snapshots__/recommended.rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"no-fallthrough": "error",
"no-constant-condition": "error",
"object-shorthand": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
Expand Down Expand Up @@ -38,9 +43,12 @@
]
}
],
"react/prop-types": "warn",
"react/require-render-return": 2,
"react/self-closing-comp": "error",
"react/jsx-boolean-value": [
"error",
"never"
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react-compiler/react-compiler": "warn",
Expand Down
10 changes: 8 additions & 2 deletions packages/eslint-config/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ export const typescript = () => [

rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
Expand Down Expand Up @@ -122,7 +127,8 @@ export const react = () => [
"react/self-closing-comp": "error",
"react/react-in-jsx-scope": "off",
"react/jsx-no-target-blank": "off",
"react/prop-types": "warn",
'react/prop-types': 'off',
"react/jsx-boolean-value": ["error", "never"],
"react/display-name": "warn",
"react/no-unknown-property": [
"error",
Expand Down

0 comments on commit b2597b4

Please sign in to comment.