320986a2b8
## Feature We are in a Typescript context, but the `next.config.js` cannot be parsed as is, since it fails on `File is a CommonJS module; it may be converted to an ES module.ts(80001)` so it does not parse the rest of the file : ![image](https://user-images.githubusercontent.com/5599375/148612812-de50b5d9-609e-4273-9892-5b3a4ad0b282.png) Here we should have an error because the type is not the expected one. With a little trick, it's possible to enable the check by : - adding `// @ts-check` at first line - moving the export at the end of the file And then it works like a charm : ![image](https://user-images.githubusercontent.com/5599375/148612666-ae5350d8-f16e-45e0-84e4-b31faf07fcca.png) Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com> |
||
---|---|---|
.. | ||
default | ||
typescript |