-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: migrate to TypeScript and ESM #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| matrix: | ||
| eslint: [8] | ||
| node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16, 18.0.0, 18, 20, 22, 24] | ||
| node: [22, 24] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these entries from the CI matrix, when the engines list haven't been reduced is creating a blind spot. Is there a reason these versions were dropped?
|
|
||
| const __dirname = path.dirname(fileURLToPath(import.meta.url)) | ||
|
|
||
| const tsdownConfig = defineConfig((cliOptions) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This config seems excessive. Many of these properties are set to their default values. Can this be cleaned up a bit?
| "declaration": true, | ||
| "declarationMap": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are already true in the base tsconfig.
| "version": "node scripts/update && git add .", | ||
| "postversion": "git push && git push --tags", | ||
| "clean": "rimraf .nyc_output coverage docs/.vitepress/cache", | ||
| "clean": "rimraf .nyc_output/ coverage/ docs/.vitepress/cache/ dist/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use clean: true in the tsdown config (the default)? Then you don't have to call clean or rimraf before build explicitly.
| "default": "./dist/configs.cjs" | ||
| } | ||
| }, | ||
| ".": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: recommend the root entry point be at the top.
| "files": [ | ||
| "configs.js", | ||
| "lib" | ||
| "lib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is lib still needed in the package, if everything's built into dist?
| meta: { | ||
| name: string | ||
| version: string | ||
| } | ||
| rules: { | ||
| "disable-enable-pair": Rule.RuleModule | ||
| "no-aggregating-enable": Rule.RuleModule | ||
| "no-duplicate-disable": Rule.RuleModule | ||
| "no-restricted-disable": Rule.RuleModule | ||
| "no-unlimited": Rule.RuleModule | ||
| "no-unused-disable": Rule.RuleModule | ||
| "no-unused-enable": Rule.RuleModule | ||
| "no-use": Rule.RuleModule | ||
| "require-description": Rule.RuleModule | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this type annotation needed when you're using satisfies?
| name: "@eslint-community/eslint-comments/recommended" | ||
| plugins: { | ||
| "@eslint-community/eslint-comments": { | ||
| meta: { | ||
| name: string | ||
| version: string | ||
| } | ||
| rules: { | ||
| "disable-enable-pair": Rule.RuleModule | ||
| "no-aggregating-enable": Rule.RuleModule | ||
| "no-duplicate-disable": Rule.RuleModule | ||
| "no-restricted-disable": Rule.RuleModule | ||
| "no-unlimited": Rule.RuleModule | ||
| "no-unused-disable": Rule.RuleModule | ||
| "no-unused-enable": Rule.RuleModule | ||
| "no-use": Rule.RuleModule | ||
| "require-description": Rule.RuleModule | ||
| } | ||
| } | ||
| } | ||
| rules: { | ||
| "@eslint-community/eslint-comments/disable-enable-pair": "error" | ||
| "@eslint-community/eslint-comments/no-aggregating-enable": "error" | ||
| "@eslint-community/eslint-comments/no-duplicate-disable": "error" | ||
| "@eslint-community/eslint-comments/no-unlimited-disable": "error" | ||
| "@eslint-community/eslint-comments/no-unused-enable": "error" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar question here. Why is satisfies not enough here?
This PR: