Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-react-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@mheob/eslint-config': patch
---

Update React ESLint rules configuration.
5 changes: 3 additions & 2 deletions .claude/commands/create-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ description: Create a git commit
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -10`

## Your task
## Your tasks

Create changeset if needed (at least an empty changeset) and create a single git commit based on the above changes.
- create changeset if needed (at least an empty changeset); write the change message in a full sentence
- create a single git commit based on the above changes

Use conventional commits with a title length of max 50 characters. See @commitlint.config.js for more details.

Expand Down
7 changes: 0 additions & 7 deletions .husky/post-merge

This file was deleted.

13 changes: 5 additions & 8 deletions packages/eslint-config/src/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ export async function react(
'react-web-api/no-leaked-resize-observer': 'warn',
'react-web-api/no-leaked-timeout': 'warn',

// recommended rules from eslint-plugin-react https://eslint-react.xyz/docs/rules/overview#core-rules
'react/jsx-no-duplicate-props': 'off',
'react/jsx-no-undef': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-uses-vars': 'off',
// recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
'react/jsx-no-comment-textnodes': 'warn',
'react/jsx-no-duplicate-props': 'warn',
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'warn',
'react/no-children-count': 'warn',
Expand All @@ -179,7 +179,6 @@ export async function react(
'react/no-children-only': 'warn',
'react/no-children-to-array': 'warn',
'react/no-clone-element': 'warn',
'react/no-comment-textnodes': 'warn',
'react/no-component-will-mount': 'error',
'react/no-component-will-receive-props': 'error',
'react/no-component-will-update': 'error',
Expand All @@ -190,9 +189,7 @@ export async function react(
'react/no-duplicate-key': 'warn',
'react/no-forward-ref': 'warn',
'react/no-implicit-key': 'warn',
// 'react/no-leaked-conditional-rendering': 'warn', // deactivated because it is not working (parserOptions issue)
'react/no-missing-key': 'error',
'react/no-misused-capture-owner-stack': 'error',
'react/no-nested-component-definitions': 'error',
'react/no-nested-lazy-component-declarations': 'warn',
'react/no-prop-types': 'error',
Expand Down
Loading