File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,13 +20,15 @@ export function convertErrorCategory(category: 'error' | 'warning' | 'suggestion
2020 }
2121}
2222
23+ /**
24+ * Convert default imports to namespace imports for CSS modules.
25+ * For example, convert `import styles from './styles.module.css'` to `import * as styles from './styles.module.css'`.
26+ */
2327export function convertDefaultImportsToNamespaceImports (
2428 codeFixes : ts . CodeFixAction [ ] | ts . CodeAction [ ] ,
2529 fileName : string ,
2630 resolver : Resolver ,
2731) : void {
28- // Convert default imports to namespace imports for CSS modules.
29- // For example, convert `import styles from './styles.module.css'` to `import * as styles from './styles.module.css'`.
3032 for ( const codeFix of codeFixes ) {
3133 if ( 'fixName' in codeFix && codeFix . fixName !== 'import' ) continue ;
3234 // Check if the code fix is to add an import for a CSS module.
You can’t perform that action at this time.
0 commit comments