Breaking: Support ESM only, rename num to number#13
Breaking: Support ESM only, rename num to number#13evelynhathaway wants to merge 2 commits intomainfrom
Conversation
## v2.0.0-beta.1 **[`v1.0.6...v2.0.0-beta.1`](v1.0.6...v2.0.0-beta.1)** - **2021-05-21** ### 💥 Breaking - Support ESM only, rename num to number [`f5ce597`](f5ce597) ### Other - **dev:** Bump conventional-changelog-evelyn from 1.2.3 to 1.3.0 [`358777c`](358777c) - **dev:** Bump eslint-plugin-evelyn from 5.0.4 to 5.0.5 [`640ac4b`](640ac4b)
|
Before I go ahead and only support native ESModules in future packages, I am using
|
| "extends": [ | ||
| "plugin:evelyn/default", | ||
| "plugin:evelyn/typescript", | ||
| "plugin:evelyn/esm", |
There was a problem hiding this comment.
Before merging, this config needs to better enforce best practices with importing to prevent easily making super annoying bugs for users
| "typescript.format.insertSpaceBeforeFunctionParenthesis": true, | ||
| "typescript.format.semicolons": "insert", | ||
| "typescript.preferences.importModuleSpecifier": "relative", | ||
| "typescript.preferences.importModuleSpecifierEnding": "js", |
There was a problem hiding this comment.
I had to add this to make TypeScript import the ghost .js files when using VSCode
| }, | ||
| moduleNameMapper: { | ||
| "(.*)\\.js$": ["$1"], | ||
| }, |
There was a problem hiding this comment.
I had to tell the @next version of ts-jest and jest to strip off the .js from the imports since they technically didn't exist and ts-jest doesn't resolve the ghosts like the eslint plugin import resolver for TypeScript.
| { | ||
| "name": "loose-rgb", | ||
| "version": "1.0.6", | ||
| "type": "module", |
There was a problem hiding this comment.
I heard not to use "type": "module", but... I am not adding a plugin just to rename files to .mjs at this point
| @@ -1,4 +1,4 @@ | |||
| import {normalize} from ".."; | |||
| import {normalize} from "../index.js"; | |||
There was a problem hiding this comment.
I like this explicit syntax better actually, only if TS and ESLint played nice
| @@ -1,10 +1,15 @@ | |||
| module.exports = function () { | |||
| export default function wallabyConfig () { | |||
There was a problem hiding this comment.
Currently Wallaby says this is supported, but it never loads when choosing this config
No description provided.