Skip to content

Commit b2597b4

Browse files
committed
feat(@pixiv/eslint-config): update rules
1 parent a8c9f0d commit b2597b4

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

packages/eslint-config/src/__snapshots__/next.rules.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"no-fallthrough": "error",
55
"no-constant-condition": "error",
66
"object-shorthand": "error",
7-
"@typescript-eslint/no-unused-vars": "error",
7+
"@typescript-eslint/no-unused-vars": [
8+
"error",
9+
{
10+
"argsIgnorePattern": "^_"
11+
}
12+
],
813
"@typescript-eslint/consistent-type-imports": [
914
"error",
1015
{
@@ -38,9 +43,12 @@
3843
]
3944
}
4045
],
41-
"react/prop-types": "warn",
4246
"react/require-render-return": 2,
4347
"react/self-closing-comp": "error",
48+
"react/jsx-boolean-value": [
49+
"error",
50+
"never"
51+
],
4452
"react-hooks/rules-of-hooks": "error",
4553
"react-hooks/exhaustive-deps": "error",
4654
"react-compiler/react-compiler": "warn",

packages/eslint-config/src/__snapshots__/recommended.rules.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"no-fallthrough": "error",
55
"no-constant-condition": "error",
66
"object-shorthand": "error",
7-
"@typescript-eslint/no-unused-vars": "error",
7+
"@typescript-eslint/no-unused-vars": [
8+
"error",
9+
{
10+
"argsIgnorePattern": "^_"
11+
}
12+
],
813
"@typescript-eslint/consistent-type-imports": [
914
"error",
1015
{
@@ -38,9 +43,12 @@
3843
]
3944
}
4045
],
41-
"react/prop-types": "warn",
4246
"react/require-render-return": 2,
4347
"react/self-closing-comp": "error",
48+
"react/jsx-boolean-value": [
49+
"error",
50+
"never"
51+
],
4452
"react-hooks/rules-of-hooks": "error",
4553
"react-hooks/exhaustive-deps": "error",
4654
"react-compiler/react-compiler": "warn",

packages/eslint-config/src/config.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ export const typescript = () => [
8585

8686
rules: {
8787
'no-unused-vars': 'off',
88-
'@typescript-eslint/no-unused-vars': 'error',
88+
'@typescript-eslint/no-unused-vars': [
89+
'error',
90+
{
91+
argsIgnorePattern: '^_',
92+
},
93+
],
8994
"@typescript-eslint/consistent-type-imports": [
9095
"error",
9196
{
@@ -122,7 +127,8 @@ export const react = () => [
122127
"react/self-closing-comp": "error",
123128
"react/react-in-jsx-scope": "off",
124129
"react/jsx-no-target-blank": "off",
125-
"react/prop-types": "warn",
130+
'react/prop-types': 'off',
131+
"react/jsx-boolean-value": ["error", "never"],
126132
"react/display-name": "warn",
127133
"react/no-unknown-property": [
128134
"error",

0 commit comments

Comments
 (0)