-
-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Migrate to ESLint flat config (#1846)
* chore: Migrate to ESLint flat config * Add knip.json
- Loading branch information
1 parent
7d8d3e0
commit 4310311
Showing
61 changed files
with
871 additions
and
546 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// @ts-check | ||
|
||
// @ts-ignore Needed due to moduleResolution Node vs Bundler | ||
import { tanstackConfig } from '@tanstack/config/eslint' | ||
|
||
export default [ | ||
...tanstackConfig, | ||
{ | ||
name: 'tanstack/local', | ||
rules: { | ||
'ts/ban-types': 'off', | ||
'ts/require-await': 'off', | ||
'no-empty': 'off', | ||
'no-prototype-builtins': 'off', | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://unpkg.com/knip@5/schema.json", | ||
"ignoreWorkspaces": ["examples/**"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// @ts-check | ||
|
||
import rootConfig from '../../eslint.config.js' | ||
|
||
export default [...rootConfig] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// @ts-check | ||
|
||
import rootConfig from '../../eslint.config.js' | ||
|
||
export default [...rootConfig] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// @ts-check | ||
|
||
import pluginReact from '@eslint-react/eslint-plugin' | ||
// @ts-expect-error | ||
import pluginReactHooks from 'eslint-plugin-react-hooks' | ||
import rootConfig from '../../eslint.config.js' | ||
|
||
export default [ | ||
...rootConfig, | ||
{ | ||
files: ['**/*.{ts,tsx}'], | ||
...pluginReact.configs.recommended, | ||
}, | ||
{ | ||
plugins: { | ||
'react-hooks': pluginReactHooks, | ||
}, | ||
rules: { | ||
'@eslint-react/no-unstable-context-value': 'off', | ||
'@eslint-react/no-unstable-default-props': 'off', | ||
'@eslint-react/dom/no-missing-button-type': 'off', | ||
'react-hooks/exhaustive-deps': 'error', | ||
'react-hooks/rules-of-hooks': 'error', | ||
}, | ||
}, | ||
{ | ||
files: ['**/__tests__/**'], | ||
rules: { | ||
'ts/no-unnecessary-condition': 'off', | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.