-
-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,5 @@ | |
| /node_modules | ||
| /npm-debug.log | ||
| /test.js | ||
| dist/ | ||
| .rolldown/ | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import type { ESLint, Linter } from "eslint" | ||
| import { rulesRecommended } from "./lib/configs/recommended.ts" | ||
| import { rules } from "./lib/rules.ts" | ||
| import packageJson from "./package.json" with { type: "json" } | ||
|
|
||
| const plugin = { | ||
| meta: { | ||
| name: packageJson.name, | ||
| version: packageJson.version, | ||
| }, | ||
| rules, | ||
| } as const satisfies ESLint.Plugin | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just calling out that from a type perspective |
||
|
|
||
| export const recommended = { | ||
| name: "@eslint-community/eslint-comments/recommended", | ||
| plugins: { | ||
| "@eslint-community/eslint-comments": plugin, | ||
| }, | ||
| rules: rulesRecommended, | ||
| } as const satisfies Linter.FlatConfig | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export * as configs from "./lib/configs.ts" | ||
| export { rules } from "./lib/rules.ts" | ||
| export * as utils from "./lib/utils.ts" |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * as recommended from "./configs/recommended.ts" |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import type { Linter } from "eslint" | ||
|
|
||
| export const plugins = [ | ||
| "@eslint-community/eslint-comments", | ||
| ] as const satisfies Linter.LegacyConfig["plugins"] | ||
|
|
||
| export const rulesRecommended = { | ||
| "@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", | ||
| } as const satisfies Linter.Config["rules"] |
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?
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.
The actual build process as well as the unit-tests need
--experimental-transform-typesand/or--experimental-strip-typeswhich are not available on the older versions of Node.js. Also building, testing and type checking on that many versions of Node might be a bit excessive. We could use this oppurtunity to update theenginesfield as well but if we really want to go that far back in Node versions then I think I might have to switch things around and maybe switch to avitestor some other testing framework.Uh oh!
There was an error while loading. Please reload this page.
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.
I would support updating engines, but just calling out that if engines don't change, and these are dropped from the matrix, then we'd no longer be testing the full range of node versions that we claim to support. I don't think that matrix array is excessive given the engines declaration. it's the first and last node version for each major in the engines range. (except for 20, 22, and 24 for some reason 🤔 )