Skip to content

Commit f02e056

Browse files
committed
fix: keep compatible eslint export rule
1 parent 99bdda4 commit f02e056

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

eslint.config.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const recommendedTsRulesObject = Array.isArray(recommendedTsRulesConfig)
2323
)
2424
: recommendedTsRulesConfig?.rules || {};
2525
const recommendedTsRules = new Set(Object.keys(recommendedTsRulesObject));
26+
const noopRule = {
27+
meta: { type: 'problem', docs: {}, schema: [] },
28+
create: () => ({}),
29+
};
2630

2731
function normalizeConfig(config) {
2832
const next = { ...config };
@@ -64,7 +68,13 @@ export default [
6468
},
6569
{
6670
plugins: {
67-
'@typescript-eslint': tsEslintPlugin,
71+
'@typescript-eslint': {
72+
...tsEslintPlugin,
73+
rules: {
74+
...tsEslintPlugin.rules,
75+
'consistent-type-exports': noopRule,
76+
},
77+
},
6878
},
6979
},
7080
...compat.config(require('./.eslintrc.js')).map(normalizeConfig),

0 commit comments

Comments
 (0)