Skip to content

Commit

Permalink
Linter fix - switching to single TSConfig approach for typescript-esl…
Browse files Browse the repository at this point in the history
…int configuration (#650)
  • Loading branch information
ecamellini authored Jun 17, 2024
1 parent 12b5461 commit 910f7e0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
extends: ["@pagopa/eslint-config/strong"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./packages/*/tsconfig.json", "./packages/*/test/tsconfig.json"],
project: "./tsconfig.eslint.json",
},
rules: {
// Any project level custom rule
Expand All @@ -26,6 +26,6 @@ module.exports = {
"**/src/model/generated/*.ts",
"**/dist",
"**/patchZodios.ts",
"**/paged.polyfill.js"
"**/paged.polyfill.js",
],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "turbo test",
"build": "turbo build",
"check": "turbo check",
"lint": "turbo lint --concurrency=4",
"lint": "turbo lint",
"lint:autofix": "turbo lint:autofix",
"format:check": "turbo format:check",
"format:write": "turbo format:write",
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Root tsconfig for typescript-eslint
// See: https://typescript-eslint.io/getting-started/typed-linting/monorepos#important-note-regarding-large--10-multi-package-monorepos
// Choosing the root tsconfig approach because of: https://typescript-eslint.io/getting-started/typed-linting/monorepos#important-note-regarding-large--10-multi-package-monorepos
{
"extends": "./tsconfig.json",
"compilerOptions": {
// ensure that nobody can accidentally use this config for a build
"noEmit": true,
},
"include": ["packages/**/*"]
}

0 comments on commit 910f7e0

Please sign in to comment.