Bugfix for fork-ts-checker-webpack-plugin and TypeScript 3.8 Type-Only Imports/Exports #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The addition of
"importsNotUsedAsValues": "preserve"
intsconfig.json
(following the example ESLint configuration for the fork-ts-checker-webpack-plugin module), introduced type errors for import/exports of TypeScript type definitions. Further details of the error is documented in issue #308.Fixing this issue also revealed additional errors, including ESLint linting being applied to non-code files (
.svg
,.png
,.json
) with repeated errors for each such file within the Synectic codebase indicating:This error is documented in TypeStrong/fork-ts-checker-webpack-plugin#453, and requires fine-grain configuration of ESLint options used by the fork-ts-checker-webpack-plugin so that it does not aggressively lint all files.
This PR resolves #308, and signifies the following version changes:
Changes:
This PR makes the following changes:
import
statements for TypeScript type definition files (e.g.src/types.d.ts
) to use TypeScript 3.8import type
statements..ts
,.tsx
, and.js
files.import/named
rule override forreact-dnd/XYCoord
, which was fixed in Defines the XYCoord interface in React-Dnd package react-dnd/react-dnd#1454.@typescript-eslint/no-var-requires
rule override forwebpack.renderer.config.js
file, since updates to@typescript-eslint
have now restricted theno-var-requires
rule to only apply to TS files.target
toES2018
(ECMAScript 2018 also known asES9
) for additional features such as asynchronous iterators,Promise.prototype.finally
library, Unicode property escapes in regular expressions, RegExp lookbehind assertions, Object Rest/spread properties, RegExp named capture groups, ands
'dotAll' flag for regular expressions.Checklist:
Before submitting this PR, I have verified that my code:
fix/
orfeature/
branch that was initially branched off fromdevelopment
.yarn lint
) and unit testing (yarn test
).yarn package
).Additionally, I have verified that: