Skip to content

Commit

Permalink
docs: add comment that noUnused* overlaps with an ESLint rule
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
agilgur5 committed Sep 17, 2020
1 parent 10a6137 commit e50bc51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions templates/basic/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions templates/react-with-storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions templates/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit e50bc51

@vercel
Copy link

@vercel vercel bot commented on e50bc51 Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.