-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 (#7636)
* chore: Migrate to ESLint flat config * Migrate more packages * angular and solid * svelte packages * Hopefully more fixes * react packages * vue packages * Fix typescript errors * Update Nx config
- Loading branch information
1 parent
8d75aaa
commit e6a0fdd
Showing
98 changed files
with
1,210 additions
and
835 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,42 @@ | ||
// @ts-check | ||
|
||
// @ts-ignore | ||
import { rootConfig } from '@tanstack/config/eslint' | ||
// @ts-ignore | ||
import cspellConfigs from '@cspell/eslint-plugin/configs' | ||
|
||
export default [ | ||
...rootConfig, | ||
cspellConfigs.recommended, | ||
{ | ||
name: 'tanstack/temp', | ||
rules: { | ||
'@cspell/spellchecker': [ | ||
'error', | ||
{ | ||
cspell: { | ||
words: [ | ||
'codemod', // We support our codemod | ||
'extralight', // Our public interface | ||
'jscodeshift', | ||
'Promisable', // Our public interface | ||
'retryer', // Our public interface | ||
'solidjs', // Our target framework | ||
'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric | ||
'tanstack', // Our package scope | ||
'todos', // Too general word to be caught as error | ||
'TSES', // @typescript-eslint package's interface | ||
'tsqd', // Our public interface (TanStack Query Devtools shorthand) | ||
'tsup', // We use tsup as builder | ||
'typecheck', // Field of vite.config.ts | ||
'vue-demi', // dependency of @tanstack/vue-query | ||
], | ||
}, | ||
}, | ||
], | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'no-case-declarations': '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 |
---|---|---|
|
@@ -44,24 +44,18 @@ | |
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.15.3", | ||
"@cspell/eslint-plugin": "^8.9.1", | ||
"@eslint-react/eslint-plugin": "^1.5.16", | ||
"@solidjs/testing-library": "^0.8.8", | ||
"@tanstack/config": "^0.7.11", | ||
"@tanstack/config": "^0.8.1", | ||
"@testing-library/jest-dom": "^6.4.5", | ||
"@testing-library/react": "^15.0.7", | ||
"@types/eslint": "^8.56.10", | ||
"@types/node": "^20.12.12", | ||
"@types/react": "npm:types-react@rc", | ||
"@types/react-dom": "npm:types-react-dom@rc", | ||
"@typescript-eslint/eslint-plugin": "^7.13.1", | ||
"@typescript-eslint/parser": "^7.13.1", | ||
"@vitest/coverage-istanbul": "^1.6.0", | ||
"cpy-cli": "^5.0.0", | ||
"esbuild-plugin-file-path-extensions": "^2.1.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-react": "^7.34.3", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"husky": "^9.0.11", | ||
"jsdom": "^24.0.0", | ||
|
@@ -78,6 +72,7 @@ | |
"solid-js": "^1.8.17", | ||
"tsup": "^8.0.2", | ||
"typescript": "5.3.3", | ||
"typescript-eslint": "^7.14.1", | ||
"typescript47": "npm:[email protected]", | ||
"typescript48": "npm:[email protected]", | ||
"typescript49": "npm:[email protected]", | ||
|
@@ -89,11 +84,9 @@ | |
}, | ||
"pnpm": { | ||
"overrides": { | ||
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin", | ||
"@typescript-eslint/parser": "$@typescript-eslint/parser", | ||
"eslint": "$eslint", | ||
"@types/react": "npm:types-react@rc", | ||
"@types/react-dom": "npm:types-react-dom@rc" | ||
"@types/react-dom": "npm:types-react-dom@rc", | ||
"eslint": "$eslint" | ||
} | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
packages/angular-query-devtools-experimental/.eslintrc.cjs
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
packages/angular-query-devtools-experimental/eslint.config.js
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 | ||
|
||
import pluginJsdoc from 'eslint-plugin-jsdoc' | ||
import rootConfig from '../../eslint.config.js' | ||
|
||
export default [ | ||
...rootConfig, | ||
pluginJsdoc.configs['flat/recommended-typescript'], | ||
{ | ||
rules: { | ||
'jsdoc/require-hyphen-before-param-description': 1, | ||
'jsdoc/sort-tags': 1, | ||
'jsdoc/require-throws': 1, | ||
'jsdoc/check-tag-names': ['warn'], | ||
}, | ||
}, | ||
] |
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,23 @@ | ||
// @ts-check | ||
|
||
import pluginJsdoc from 'eslint-plugin-jsdoc' | ||
import rootConfig from '../../eslint.config.js' | ||
|
||
export default [ | ||
...rootConfig, | ||
pluginJsdoc.configs['flat/recommended-typescript'], | ||
{ | ||
rules: { | ||
'jsdoc/require-hyphen-before-param-description': 1, | ||
'jsdoc/sort-tags': 1, | ||
'jsdoc/require-throws': 1, | ||
'jsdoc/check-tag-names': [ | ||
'warn', | ||
{ | ||
// Not compatible with Api Extractor @public | ||
typed: false, | ||
}, | ||
], | ||
}, | ||
}, | ||
] |
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
Oops, something went wrong.