make css modules build without errors
This commit is contained in:
parent
0193c8fcb6
commit
875f2f2d46
3 changed files with 17 additions and 2 deletions
11
packages/web/tsconfig.cssmodulehack.json
Normal file
11
packages/web/tsconfig.cssmodulehack.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"files": [],
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
// the typescript-plugin-css-modules only works when typescript is used as a LSP and not when "tsc" is invoked.
|
||||||
|
// Therefore when tsc is invoked, we need to disable the noPropertyAccessFromIndexSignature option.
|
||||||
|
// This is good, because its more of a lint anyways - the heavy lifting is done by the
|
||||||
|
// noUncheckedIndexedAccess rule
|
||||||
|
"noPropertyAccessFromIndexSignature": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -11,7 +11,9 @@
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "typescript-plugin-css-modules",
|
"name": "typescript-plugin-css-modules",
|
||||||
"options": { "classnameTransform": "camelCase" }
|
"options": {
|
||||||
|
"classnameTransform": "camelCaseOnly",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rootDirs": [".", "./.react-router/types"],
|
"rootDirs": [".", "./.react-router/types"],
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
checker({
|
checker({
|
||||||
biome: { command: "check", dev: { command: "lint" } },
|
biome: { command: "check", dev: { command: "lint" } },
|
||||||
typescript: true,
|
typescript: {
|
||||||
|
tsconfigPath: "./tsconfig.cssmodulehack.json",
|
||||||
|
},
|
||||||
stylelint: { lintCommand: "stylelint ./app/**/*.css" },
|
stylelint: { lintCommand: "stylelint ./app/**/*.css" },
|
||||||
}),
|
}),
|
||||||
reactRouter(),
|
reactRouter(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue