Skip to content

Commit e633c67

Browse files
chore: Use typescript-eslint v6 features (#594)
* chore: Use typescript-eslint v6 features * Remove unnecessary parserOptions * Delete stray prettierrc
1 parent 70e4fdb commit e633c67

File tree

21 files changed

+163
-118
lines changed

21 files changed

+163
-118
lines changed

.eslintrc.cjs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
/** @type {import('eslint').Linter.Config} */
44
const config = {
55
root: true,
6+
reportUnusedDisableDirectives: true,
7+
ignorePatterns: ['**/build', '**/coverage', '**/dist'],
68
parser: '@typescript-eslint/parser',
79
plugins: ['@typescript-eslint', 'import'],
810
extends: [
9-
'plugin:@typescript-eslint/eslint-recommended',
11+
'eslint:recommended',
1012
'plugin:@typescript-eslint/recommended',
13+
'plugin:@typescript-eslint/stylistic',
1114
'plugin:import/recommended',
1215
'plugin:import/typescript',
1316
'prettier',
@@ -18,7 +21,7 @@ const config = {
1821
},
1922
parserOptions: {
2023
tsconfigRootDir: __dirname,
21-
project: './tsconfig.json',
24+
project: true,
2225
sourceType: 'module',
2326
ecmaVersion: 2020,
2427
},
@@ -34,14 +37,17 @@ const config = {
3437
},
3538
},
3639
rules: {
40+
'@typescript-eslint/array-type': 'off',
3741
'@typescript-eslint/ban-types': 'off',
3842
'@typescript-eslint/ban-ts-comment': 'off',
43+
'@typescript-eslint/consistent-type-definitions': 'off',
3944
'@typescript-eslint/consistent-type-imports': 'error',
4045
'@typescript-eslint/explicit-module-boundary-types': 'off',
4146
'@typescript-eslint/no-empty-interface': 'off',
4247
'@typescript-eslint/no-explicit-any': 'off',
4348
'@typescript-eslint/no-non-null-assertion': 'off',
4449
'@typescript-eslint/no-unnecessary-condition': 'error',
50+
'@typescript-eslint/no-unused-vars': 'off',
4551
'@typescript-eslint/no-inferrable-types': [
4652
'error',
4753
{
@@ -52,8 +58,10 @@ const config = {
5258
'import/no-cycle': 'error',
5359
'import/no-unresolved': ['error', { ignore: ['^@tanstack/'] }],
5460
'import/no-unused-modules': ['off', { unusedExports: true }],
61+
'no-async-promise-executor': 'off',
62+
'no-empty': 'off',
5563
'no-redeclare': 'off',
56-
'@typescript-eslint/no-unused-vars': 'off',
64+
'no-undef': 'off',
5765
},
5866
overrides: [
5967
{
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
module.exports = {
22
extends: 'next/core-web-vitals',
3-
parserOptions: {
4-
tsconfigRootDir: __dirname,
5-
project: ['./tsconfig.json'],
6-
},
73
}

examples/react/simple/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
/** @type {import('eslint').Linter.Config} */
44
const config = {
55
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
6-
parserOptions: {
7-
tsconfigRootDir: __dirname,
8-
project: './tsconfig.json',
9-
},
106
rules: {
117
'react/no-children-prop': 'off',
128
},

examples/react/ui-libraries/.eslintrc.cjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22

33
/** @type {import('eslint').Linter.Config} */
44
const config = {
5-
env: { browser: true, es2020: true },
6-
extends: [
7-
'eslint:recommended',
8-
'plugin:@typescript-eslint/recommended',
9-
'plugin:react-hooks/recommended',
10-
],
11-
parser: '@typescript-eslint/parser',
12-
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
5+
extends: ['plugin:react-hooks/recommended'],
136
plugins: ['react-refresh'],
147
rules: {
158
'react-refresh/only-export-components': 'warn',

examples/react/valibot/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
/** @type {import('eslint').Linter.Config} */
44
const config = {
55
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
6-
parserOptions: {
7-
tsconfigRootDir: __dirname,
8-
project: './tsconfig.json',
9-
},
106
rules: {
117
'react/no-children-prop': 'off',
128
},

examples/react/yup/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
/** @type {import('eslint').Linter.Config} */
44
const config = {
55
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
6-
parserOptions: {
7-
tsconfigRootDir: __dirname,
8-
project: './tsconfig.json',
9-
},
106
rules: {
117
'react/no-children-prop': 'off',
128
},

examples/react/zod/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
/** @type {import('eslint').Linter.Config} */
44
const config = {
55
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
6-
parserOptions: {
7-
tsconfigRootDir: __dirname,
8-
project: './tsconfig.json',
9-
},
106
rules: {
117
'react/no-children-prop': 'off',
128
},

examples/react/zod/.prettierrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"@types/node": "^18.19.3",
4444
"@types/react": "^18.2.45",
4545
"@types/react-dom": "^18.0.5",
46-
"@typescript-eslint/eslint-plugin": "^6.4.1",
47-
"@typescript-eslint/parser": "^6.4.1",
46+
"@typescript-eslint/eslint-plugin": "^6.20.0",
47+
"@typescript-eslint/parser": "^6.20.0",
4848
"@vitest/coverage-istanbul": "^1.2.2",
4949
"eslint": "^8.56.0",
5050
"eslint-config-prettier": "^9.1.0",

packages/form-core/.eslintrc.cjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
// @ts-check
22

33
/** @type {import('eslint').Linter.Config} */
4-
const config = {
5-
parserOptions: {
6-
tsconfigRootDir: __dirname,
7-
project: './tsconfig.json',
8-
},
9-
}
4+
const config = {}
105

116
module.exports = config

0 commit comments

Comments
 (0)