Plugins
#101
Replies: 1 comment
-
I just found out that https://github.com/NaverPayDev/cli/tree/main/packages/publint implements a variant that applies the orgs opinionated linting errors. I'd love to validate that this new plugin API can work for their usecase too. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Today, publint is a slightly opinionated linting tool that comes with a built-in set of rules for support in environments like Vite, Node, workers, etc, and suggestions to keep your package clean and correct.
The next logical step is to allow expanding what publint is today. In comparison to ESLint where it lints your source code, publint lints your built/publish code, which is an area I've not seen explored.
I'd like to work on a plugin API to enable this, and below are drafts of the idea:
Goals
.svelte
or.ts
filespackage.json
publint
alone should still be all that's needed to lint the basic/standard thingsNon-goals
Design
How to write a good plugin:
api.vfs.*
for any filesystem related operations.api.resolve
to resolve paths instead of manual resolution, which is possible but only for non-standard cases.Notes:
lint
hook run in parallel, the order ofapi.report
between plugins may be non-deterministic. Internally, we can sort this by file, rule name, and issue message.Examples
Suggest specifying a
description
:Beta Was this translation helpful? Give feedback.
All reactions