Skip to content

Commit e8d38bc

Browse files
committed
refactor(eslint-config-core): disable react/prop-types rule for typescript
1 parent bee849e commit e8d38bc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/eslint-config-react/src/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Linter } from 'eslint';
33
import { eslintConfigReactBase } from './base';
44
import { eslintConfigReactHooks } from './hooks';
55
import { eslintConfigReactJsx } from './jsx';
6+
import { eslintConfigReactTypescript } from './typescript';
67

78
export const eslintConfigReact: Linter.BaseConfig = {
89
extends: [require.resolve('@azimutlabs/eslint-config-env')],
@@ -21,5 +22,9 @@ export const eslintConfigReact: Linter.BaseConfig = {
2122
files: ['**/**.[jt]sx'],
2223
...eslintConfigReactJsx,
2324
},
25+
{
26+
files: ['**/**.ts?(x)'],
27+
...eslintConfigReactTypescript,
28+
},
2429
],
2530
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Linter } from 'eslint';
2+
3+
export const eslintConfigReactTypescript: Linter.BaseConfig = {
4+
rules: {
5+
// TypeScript already will take care of it.
6+
'react/prop-types': 'off',
7+
},
8+
};

0 commit comments

Comments
 (0)