mirror of
https://github.com/pezkuwichain/pezkuwi-dev.git
synced 2026-11-04 15:21:07 +00:00
consistent-type-exports: offer the export * fix as a suggestion
`export *` loads the module; `export type *` is erased. The autofix rewrote one into the other whenever a module exported only types, so a module that registers something when loaded stopped being loaded (the api typegen lost its Handlebars partial this way). The report stays an error; the rewrite is now a suggestion, which --fix does not apply. Named re-exports are unaffected: under verbatimModuleSyntax their type-only form is already a compile error.
This commit is contained in:
1 parent
aa231ca6b9
commit
e972491c5e
3 files changed
+146
-2
No files matched your search
@@ -25,6 +25,7 @@ import globals from 'globals';
|
||||
import { overrideAll, overrideJs, overrideJsx, overrideSpec } from './eslint.rules.js';
|
||||
import { standardRules } from './eslint.standard.js';
|
||||
import { withoutContextualAssertions } from './eslint.typeAssertion.js';
|
||||
import { withoutExportAllFix } from './eslint.typeExports.js';
|
||||
|
||||
/**
|
||||
* eslint-plugin-header declares no options schema, and eslint 9+ rejects
|
||||
@@ -94,8 +95,8 @@ export default [
|
||||
},
|
||||
plugins: {
|
||||
'@stylistic': stylisticPlugin,
|
||||
// see eslint.typeAssertion.js
|
||||
'@typescript-eslint': withoutContextualAssertions(tsPlugin),
|
||||
// see eslint.typeAssertion.js and eslint.typeExports.js
|
||||
'@typescript-eslint': withoutExportAllFix(withoutContextualAssertions(tsPlugin)),
|
||||
// eslint-plugin-header reports at the first token after the leading
|
||||
// comments, so a generated file's /* eslint-disable */ covers it; the
|
||||
// maintained fork reports at line 1 instead. The compat layer supplies the
|
||||
|
||||
Reference in new issue
Block a user