Idea of project based on this article How we migrated entirely to CSS Modules using codemods and Sourcegraph Code Insights
sourcegraph/codemod: A collection of codemods powered by TS-Morph and PostCSS
add clsx as option for className by andriyor · Pull Request #189 · sourcegraph/codemod
-
import './App.scss';
toimport styles from './App.module.scss';
-
className='App'
toclassName={styles.App}
-
id='idSelector'
toid={styles.idSelector}
-
className='selector1 selector2'
toclassName={`${styles.selector1} ${styles.selector2}`}
-
className='d-flex menu'
toclassName={`d-flex ${styles.menu}`}
-
className={["listRule1", "listRule2"].join(" ")}
toclassName={[styles.listRule1, styles.listRule2].join(" ")}
-
className="kebab-case"
toclassName={styles["kebab-case"]}