Skip to content

Commit

Permalink
fix: rename rules in eslint-react (#26)
Browse files Browse the repository at this point in the history
* fix: rename rules in eslint-react

* chore: update dependencies
  • Loading branch information
Garfield550 authored Jan 10, 2025
1 parent 5a9f8ec commit c94c567
Show file tree
Hide file tree
Showing 6 changed files with 911 additions and 903 deletions.
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@9.15.1",
"packageManager": "pnpm@10.0.0",
"author": "Biscuit Tin <[email protected]>",
"license": "MIT",
"repository": {
Expand All @@ -30,22 +30,24 @@
"@commitlint/config-conventional": "^19.6.0",
"@commitlint/types": "^19.5.0",
"@types/lint-staged": "^13.3.0",
"@types/node": "^22.10.2",
"@types/node": "^22.10.5",
"@vitest/coverage-v8": "^2.1.8",
"dprint": "^0.47.6",
"dprint": "^0.48.0",
"eslint": "^9.17.0",
"eslint-typegen": "^0.3.2",
"happy-dom": "^15.11.7",
"eslint-typegen": "^1.0.0",
"happy-dom": "^16.5.3",
"husky": "^9.1.7",
"jiek": "^2.2.7",
"jiek": "2.2.7",
"jiti": "^2.4.2",
"lint-staged": "^15.2.11",
"lint-staged": "^15.3.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"typescript": "^5.7.3",
"vitest": "^2.1.8"
},
"pnpm": {
"overrides": {
"@jiek/pkger": "npm:@jiek/[email protected]",
"@jiek/rollup-plugin-dts": "npm:@jiek/[email protected]",
"deep-equal": "npm:@nolyfill/deep-equal@^1",
"is-core-module": "npm:@nolyfill/is-core-module@^1",
"is-generator-function": "npm:@nolyfill/is-generator-function@^1",
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
"@next/eslint-plugin-next": "^15.1.1",
"@package-json/types": "^0.0.11",
"@stylistic/eslint-plugin-jsx": "^2.12.1",
"eslint-config-flat-gitignore": "^0.3.0",
"eslint-flat-config-utils": "^0.4.0",
"eslint-config-flat-gitignore": "^1.0.0",
"eslint-flat-config-utils": "^1.0.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-antfu": "^2.7.0",
"eslint-plugin-autofix": "^2.2.0",
"eslint-plugin-format": "^0.1.3",
"eslint-plugin-format": "^1.0.1",
"eslint-plugin-import-x": "^4.5.1",
"eslint-plugin-jsonc": "^2.18.2",
"eslint-plugin-n": "^17.15.0",
Expand All @@ -75,15 +75,15 @@
"find-up": "^7.0.0",
"globals": "^15.14.0",
"jsonc-eslint-parser": "^2.4.0",
"local-pkg": "^0.5.1",
"local-pkg": "^1.0.0",
"typescript-eslint": "^8.18.1"
},
"devDependencies": {
"@eslint/config-inspector": "^0.6.0",
"@eslint/config-inspector": "^0.7.1",
"@types/eslint-plugin-react-refresh": "^0.4.0",
"@types/eslint-plugin-tailwindcss": "^3.17.0",
"@typescript-eslint/parser": "^8.18.1",
"dprint": "^0.47.6",
"dprint": "^0.48.0",
"eslint": "^9.17.0"
}
}
5 changes: 3 additions & 2 deletions packages/eslint-config/src/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function react(options: OptionsReact = {}): TypedFlatConfigItem[] {
// https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin
...pluginReact.configs.recommended.rules,
'@eslint-react/ensure-forward-ref-using-ref': 'error',
'@eslint-react/jsx-no-duplicate-props': 'error',
'@eslint-react/no-duplicate-jsx-props': 'error',
'@eslint-react/no-children-count': 'error',
'@eslint-react/no-children-for-each': 'error',
'@eslint-react/no-children-only': 'error',
Expand All @@ -93,7 +93,7 @@ export function react(options: OptionsReact = {}): TypedFlatConfigItem[] {
'@eslint-react/no-implicit-key': 'error',
'@eslint-react/no-missing-component-display-name': 'error',
'@eslint-react/no-unstable-context-value': 'error',
'@eslint-react/dom/no-children-in-void-dom-elements': 'error',
'@eslint-react/dom/no-void-elements-with-children': 'error',
// Update as of 2021: All current versions of major browsers now automatically use the
// behavior of rel="noopener" for any target="_blank" link, nullifying this issue.
// See: https://chromestatus.com/feature/6140064063029248.
Expand All @@ -103,6 +103,7 @@ export function react(options: OptionsReact = {}): TypedFlatConfigItem[] {
'@eslint-react/web-api/no-leaked-resize-observer': 'error',
'@eslint-react/web-api/no-leaked-timeout': 'error',
'@eslint-react/hooks-extra/no-unnecessary-use-memo': 'error',
'@eslint-react/hooks-extra/no-useless-custom-hooks': 'error',
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'error',
'@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect': 'error',
},
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ export function typescript(options: OptionsTypeScript = {}): TypedFlatConfigItem
// https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin
// pluginReact.configs.['recommended-typescript'].rules
'@eslint-react/dom/no-unknown-property': 'off',
'@eslint-react/jsx-no-duplicate-props': 'off',
'@eslint-react/jsx-uses-vars': 'off',
'@eslint-react/no-duplicate-jsx-props': 'off',
'@eslint-react/use-jsx-vars': 'off',

// pluginReact.configs.['recommended-type-checked'].rules
// https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"find-up-simple": "^1.0.0",
"micro-memoize": "^4.1.2",
"synckit": "^0.9.2",
"valibot": "1.0.0-beta.9"
"valibot": "1.0.0-beta.11"
},
"devDependencies": {
"@dprint/formatter": "^0.4.1",
Expand Down
Loading

0 comments on commit c94c567

Please sign in to comment.