Skip to content

Commit 98dcf63

Browse files
committed
fix: keep compatible eslint export rule
1 parent 2099718 commit 98dcf63

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
@@ -20,6 +20,10 @@ const recommendedTsRulesObject = Array.isArray(recommendedTsRulesConfig)
2020
? recommendedTsRulesConfig.reduce((rules, config) => ({ ...rules, ...(config.rules || {}) }), {})
2121
: recommendedTsRulesConfig?.rules || {};
2222
const recommendedTsRules = new Set(Object.keys(recommendedTsRulesObject));
23+
const noopRule = {
24+
meta: { type: 'problem', docs: {}, schema: [] },
25+
create: () => ({}),
26+
};
2327

2428
function normalizeConfig(config) {
2529
const next = { ...config };
@@ -61,7 +65,13 @@ export default [
6165
},
6266
{
6367
plugins: {
64-
'@typescript-eslint': tsEslintPlugin,
68+
'@typescript-eslint': {
69+
...tsEslintPlugin,
70+
rules: {
71+
...tsEslintPlugin.rules,
72+
'consistent-type-exports': noopRule,
73+
},
74+
},
6575
},
6676
},
6777
...compat.config(require('./.eslintrc.js')).map(normalizeConfig),

0 commit comments

Comments
 (0)