Skip to content

Commit

Permalink
chore: use tsslint for lint rule require type check
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Jan 17, 2025
1 parent 346cd25 commit b21d926
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"recommendations": ["dbaeumer.vscode-eslint"]
"recommendations": [
"dbaeumer.vscode-eslint",
"johnsoncodehk.vscode-tsslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
"format:check": "prettier --check .",
"generator:i18n-template": "tsx scripts/generate-i18n-locale.ts",
"hotfix": "vv -c bump.hotfix.config.js",
"lint": "eslint",
"lint": "pnpm run lint:tsl && eslint",
"lint:fix": "eslint --fix",
"lint:tsl": "tsslint --project apps/*/tsconfig.json",
"mitproxy": "bash scripts/run-proxy.sh",
"polyfill-optimize": "pnpx nolyfill install",
"prepare": "simple-git-hooks",
Expand Down Expand Up @@ -68,6 +69,9 @@
"@t3-oss/env-core": "^0.11.1",
"@tailwindcss/container-queries": "0.1.1",
"@tailwindcss/typography": "0.5.15",
"@tsslint/cli": "^1.5.8",
"@tsslint/config": "^1.5.8",
"@tsslint/eslint": "^1.5.8",
"@types/html-minifier-terser": "7.0.2",
"@types/js-yaml": "4.0.9",
"@types/node": "^22.10.1",
Expand Down
100 changes: 92 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions tsslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "@tsslint/config"
import { convertRule } from "@tsslint/eslint"

export default defineConfig({
rules: {
"no-leaked-conditional-rendering": convertRule(
await import("./node_modules/eslint-plugin-react-x/dist/index.mjs").then(
(module) => module.default.rules["no-leaked-conditional-rendering"],
),
),
},
})

0 comments on commit b21d926

Please sign in to comment.