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.
Pure ESM Mode
Refer to this for more information about pure esm https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Changes
This PR is change builder to rollup to make life easier. Before using rollup, the esm code generated by tsc is not fully supported in esm (package with
type: "module"
). For exampleWith rollup our code will automatically compiled to single code
index.js
and imported file will automatically transformed to explicit extension like thisThis PR also refactor some code that not work in esm, for example
So I make separate file rules.ts for list all rules and rules/index.ts to export object containing list of rules. Tested in my internal project
(PS: I was submit PR before to fix this extensible esm issue, but that PR break niv extend function, I guarantee this method is work and not break extend function)