Skip to content

Commit 9f2f840

Browse files
author
Laurynas Grigutis
committed
fix: ts config issues in @tailwindcss/language-service
1 parent 9c9b63a commit 9f2f840

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

packages/tailwindcss-language-service/scripts/build.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,20 @@ let build = await esbuild.context({
2727
name: 'generate-types',
2828
async setup(build) {
2929
build.onEnd(async (result) => {
30+
const distPath = path.resolve(__dirname, '../dist')
31+
3032
// Call the tsc command to generate the types
3133
spawnSync(
3234
'tsc',
33-
['--emitDeclarationOnly', '--outDir', path.resolve(__dirname, '../dist')],
35+
['--emitDeclarationOnly', '--outDir', distPath],
3436
{
3537
stdio: 'inherit',
3638
},
3739
)
40+
// Remove all .test.d.ts file definitions
41+
spawnSync('find', [distPath, '-name', '*.test.d.ts', '-delete'], {
42+
stdio: 'inherit',
43+
})
3844
})
3945
},
4046
},

packages/tailwindcss-language-service/src/util/find.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ function createDocument({
530530
let defaults = getDefaultTailwindSettings()
531531
let state = createState({
532532
editor: {
533-
// @ts-ignore
534533
getConfiguration: async () => ({
535534
...defaults,
536535
...settings,

packages/tailwindcss-language-service/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"include": ["src", "../../types"],
3-
"exclude": ["src/**/*.test.ts"],
43
"compilerOptions": {
54
"module": "NodeNext",
65
"lib": ["ES2022"],
@@ -15,6 +14,7 @@
1514
"noImplicitReturns": true,
1615
"noFallthroughCasesInSwitch": true,
1716
"moduleResolution": "NodeNext",
17+
"skipLibCheck": true,
1818
"jsx": "react",
1919
"esModuleInterop": true
2020
}

0 commit comments

Comments
 (0)