From e50bc510d5860d8aeab960167dc7d91668376f76 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Thu, 17 Sep 2020 18:20:31 -0400 Subject: [PATCH] docs: add comment that noUnused* overlaps with an ESLint rule - the checks overlap with the @typescript-eslint/no-unused-vars rule - per user issue, this can result in duplicative errors inside an IDE, so explicitly call this out in a comment for `tsdx lint` / ESLint users in case they'd like to disable this and leave only one on - change the ordering of linter checks in the templates as well to make the comments easier to read/understand --- templates/basic/tsconfig.json | 5 +++-- templates/react-with-storybook/tsconfig.json | 5 +++-- templates/react/tsconfig.json | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/templates/basic/tsconfig.json b/templates/basic/tsconfig.json index 441afb11c..2c85b2d99 100644 --- a/templates/basic/tsconfig.json +++ b/templates/basic/tsconfig.json @@ -14,10 +14,11 @@ // stricter type-checking for stronger correctness. Recommended by TS "strict": true, // linter checks for common issues - "noUnusedLocals": true, - "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, + // noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative + "noUnusedLocals": true, + "noUnusedParameters": true, // use Node's module resolution algorithm, instead of the legacy TS one "moduleResolution": "node", // transpile JSX to React.createElement diff --git a/templates/react-with-storybook/tsconfig.json b/templates/react-with-storybook/tsconfig.json index 441afb11c..2c85b2d99 100644 --- a/templates/react-with-storybook/tsconfig.json +++ b/templates/react-with-storybook/tsconfig.json @@ -14,10 +14,11 @@ // stricter type-checking for stronger correctness. Recommended by TS "strict": true, // linter checks for common issues - "noUnusedLocals": true, - "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, + // noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative + "noUnusedLocals": true, + "noUnusedParameters": true, // use Node's module resolution algorithm, instead of the legacy TS one "moduleResolution": "node", // transpile JSX to React.createElement diff --git a/templates/react/tsconfig.json b/templates/react/tsconfig.json index 441afb11c..2c85b2d99 100644 --- a/templates/react/tsconfig.json +++ b/templates/react/tsconfig.json @@ -14,10 +14,11 @@ // stricter type-checking for stronger correctness. Recommended by TS "strict": true, // linter checks for common issues - "noUnusedLocals": true, - "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, + // noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative + "noUnusedLocals": true, + "noUnusedParameters": true, // use Node's module resolution algorithm, instead of the legacy TS one "moduleResolution": "node", // transpile JSX to React.createElement