diff --git a/packages/cli/src/utils/transformers/transform-css-vars.ts b/packages/cli/src/utils/transformers/transform-css-vars.ts index 764a5ef3..abb86364 100644 --- a/packages/cli/src/utils/transformers/transform-css-vars.ts +++ b/packages/cli/src/utils/transformers/transform-css-vars.ts @@ -8,21 +8,14 @@ export function transformCssVars(opts: TransformOpts): CodemodPlugin { type: 'codemod', name: 'add prefix to tailwind classes', - // eslint-disable-next-line unused-imports/no-unused-vars - transform({ scriptASTs, sfcAST, styleASTs, filename, utils: { traverseScriptAST, traverseTemplateAST } }) { - // codemod plugins self-report the number of transforms it made - // this is only used to print the stats in CLI output + transform({ scriptASTs, sfcAST, utils: { traverseScriptAST, traverseTemplateAST } }) { let transformCount = 0 const { baseColor, config } = opts + if (config.tailwind?.cssVariables || !baseColor?.inlineColors) return transformCount - // scriptASTs is an array of Program ASTs - // in a js/ts file, this array will only have one item - // in a vue file, this array will have one item for each