Skip to content

Commit

Permalink
Merge pull request #284 from AndreaPontrandolfo/AndreaPontrandolfo/is…
Browse files Browse the repository at this point in the history
…sue235

feat(internals): Use configDir in in reusable config
  • Loading branch information
AndreaPontrandolfo authored Oct 31, 2024
2 parents 858a1e9 + 412f4c1 commit 45adcbc
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 20 deletions.
1 change: 0 additions & 1 deletion apps/cli-playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"jsx": "react-jsx",
"composite": false, // you should enable this only for using TS project references. But they are fairly discourages nowadays.
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"strict": true, // this is required for Sheriff to perform correctly.
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
Expand Down
1 change: 0 additions & 1 deletion apps/config-validation-playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"module": "ESNext",
"composite": false,
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"jsx": "react-jsx",
"skipLibCheck": true,
"allowJs": false,
Expand Down
2 changes: 1 addition & 1 deletion apps/docs-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"typecheck": "tsc --noEmit",
"lint": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache",
"typesync": "typesync --dry=fail",
"clean": "pnpm clear && rm -rf .turbo dist"
"clean": "pnpm clear && rm -rf .turbo dist node_modules/.cache"
},
"dependencies": {
"@docusaurus/core": "3.4.0",
Expand Down
6 changes: 3 additions & 3 deletions apps/sheriff-webservices/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"compilerOptions": {
"outDir": "./dist",
"esModuleInterop": true,
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
"jsxImportSource": "hono/jsx",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config-sheriff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"bug": "https://github.com/AndreaPontrandolfo/sheriff/labels/bug",
"scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rm -rf .turbo dist",
"clean": "rm -rf .turbo dist node_modules/.cache",
"re-bundle-types": "dts-bundle-generator -out-file=dist/index.d.ts ./dist/index.d.ts",
"build": "tsup && pnpm re-bundle-types",
"build-watch": "tsup && pnpm re-bundle-types",
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-config-sheriff/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"exclude": ["dist", "build", "node_modules"],
"extends": "tsconfig/base.json",
"compilerOptions": {
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
"incremental": true
}
}
2 changes: 1 addition & 1 deletion packages/sheriff-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "The Sheriff CLI. Used to manage Sheriff-based ESLint configs.",
"scripts": {
"dev": "tsx ./src/index.ts",
"clean": "rm -rf .turbo dist",
"clean": "rm -rf .turbo dist node_modules/.cache",
"build": "tsup",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src --max-warnings=0 --cache --cache-location=node_modules/.cache/.eslintcache",
Expand Down
1 change: 0 additions & 1 deletion packages/sheriff-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"module": "ESNext",
"moduleResolution": "Bundler",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"resolveJsonModule": true
}
}
2 changes: 1 addition & 1 deletion packages/sheriff-create-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "This package creates new Sheriff configs.",
"scripts": {
"dev": "tsx ./src/index.ts",
"clean": "rm -rf .turbo dist",
"clean": "rm -rf .turbo dist node_modules/.cache",
"build": "tsup",
"build-watch": "tsup",
"typecheck": "tsc --noEmit",
Expand Down
1 change: 0 additions & 1 deletion packages/sheriff-create-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"module": "ESNext",
"moduleResolution": "Bundler",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"resolveJsonModule": true
}
}
2 changes: 1 addition & 1 deletion packages/sheriff-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"src"
],
"scripts": {
"clean": "rm -rf .turbo dist",
"clean": "rm -rf .turbo dist node_modules/.cache",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/sheriff-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"extends": "tsconfig/base.json",
"compilerOptions": {
"module": "ESNext",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
"incremental": true
}
}
2 changes: 1 addition & 1 deletion packages/sheriff-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"rulesgen": "tsx ./src/generateRulesDataset.ts",
"publint": "publint",
"clean": "rm -rf .turb dist"
"clean": "rm -rf .turb dist node_modules/.cache"
},
"devDependencies": {
"@sherifforg/types": "workspace:*",
Expand Down
11 changes: 8 additions & 3 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"include": ["src"],
"exclude": ["dist", "build", "node_modules"],
"include": ["${configDir}/src"],
"exclude": [
"${configDir}/dist",
"${configDir}/build",
"${configDir}/node_modules"
],
"compilerOptions": {
"composite": false,
"target": "ESNext",
Expand All @@ -17,6 +21,7 @@
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
"tsBuildInfoFile": "${configDir}/node_modules/.cache/tsbuildinfo.json"
}
}

0 comments on commit 45adcbc

Please sign in to comment.