Skip to content

Commit 6667503

Browse files
committed
feat!: update tailwind api
1 parent 0a16f07 commit 6667503

File tree

4 files changed

+53
-8
lines changed

4 files changed

+53
-8
lines changed

.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"typecheck",
2929
"unocss",
3030
"mkdist",
31-
"shopt"
31+
"shopt",
32+
"callees"
3233
]
3334
}

MIGRATION.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
### From v11 to v12
1+
### From v12 to v13
22

3-
Use `defineConfig` instead of `init`
3+
Use `defineConfig` instead of `init` and add your tailwind CSS path for tailwind v4 support.
44

55
```diff
66
- import { init } from '@fullstacksjs/eslint-config';
77
+ import { defineConfig } from '@fullstacksjs/eslint-config';
88

99
- export default init();
1010
+ export default defineConfig({
11-
typescript: {
12-
tsconfigRootDir: import.meta.dirname,
13-
}
14-
});
11+
+ tailwind: {
12+
+ entryPoint: 'PATH/TO/CSS'
13+
+ }
14+
+ });
15+
```
16+
17+
18+
### From v11 to v12
19+
20+
Add `tsconfigRootDir` to enable projectService.
21+
22+
```diff
23+
import { init } from '@fullstacksjs/eslint-config';
24+
25+
- export default init();
26+
+ export default init({
27+
+ typescript: {
28+
+ tsconfigRootDir: import.meta.dirname,
29+
+ }
30+
+ });
1531
```
1632

1733
### From v10 to v11

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,34 @@ export default defineConfig(
115115
)
116116
```
117117

118+
## Tailwind
119+
120+
To enable Tailwind CSS in your project, specify the path to your CSS file in the module configuration:
121+
122+
Tailwind 4:
123+
```typescript
124+
export default defineConfig({
125+
tailwind: { entryPoint: './src/global.css' },
126+
})
127+
```
128+
129+
Tailwind 3:
130+
```typescript
131+
export default defineConfig({
132+
tailwind: { tailwindConfig: './tailwind.config.js' },
133+
})
134+
```
135+
136+
## GitIgnore
137+
138+
By default, FullstacksJS checks for a `.gitignore` file at the root of the project. If the file exists, it will be used automatically. You can override this behavior by updating the configuration.
139+
140+
```typescript
141+
export default defineConfig({
142+
gitignore: './packages/acme/.gitignore', // use `false` to disable
143+
})
144+
```
145+
118146
## I'm Getting a Next.js Warning: Plugin Was Not Detected
119147

120148
This configuration includes built-in support for [Next.js](https://nextjs.org). The warning you're seeing from Next.js is misleading—it simply checks whether the plugin is explicitly listed in your package.json.

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface ProjectService {
88
}
99

1010
type TailwindConfig = {
11-
callees: string[];
11+
callees?: string[];
1212
variables?: string[];
1313
attributes?: string[];
1414
tags?: string[];

0 commit comments

Comments
 (0)