Skip to content

Commit

Permalink
chore(eslint): use imported tailwindcssAnimate
Browse files Browse the repository at this point in the history
People with the following settings

```.eslintrc.json
"rules": {
  "@typescript-eslint/no-require-imports": "error"
}
```

will get the error:

```
A `require()` style import is forbidden.eslint@typescript-eslint/no-require-imports
```
  • Loading branch information
walkccc committed Jan 3, 2025
1 parent 1081536 commit 6a64683
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/cli/src/utils/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ module.exports = {
}`

export const TAILWIND_CONFIG_TS = `import type { Config } from "tailwindcss"
import tailwindcssAnimate from "tailwindcss-animate"
const config = {
darkMode: ["class"],
Expand Down Expand Up @@ -166,12 +167,13 @@ const config = {
},
},
},
plugins: [require("tailwindcss-animate")],
plugins: [tailwindcssAnimate],
} satisfies Config
export default config`

export const TAILWIND_CONFIG_TS_WITH_VARIABLES = `import type { Config } from "tailwindcss"
import tailwindcssAnimate from "tailwindcss-animate"
const config = {
darkMode: ["class"],
Expand Down Expand Up @@ -247,7 +249,7 @@ const config = {
},
},
},
plugins: [require("tailwindcss-animate")],
plugins: [tailwindcssAnimate],
} satisfies Config
export default config`

0 comments on commit 6a64683

Please sign in to comment.