Skip to content
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

Add docs note on lint fixing #379

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions www/src/pages/docs/cli/api/plugin-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ Unlike ESLint, there are a few notable differences:

- **Namespacing isn’t provided by default.** Your rules declared in your plugin will match the user’s config. If you think your rules may conflict with other plugins, then namespace them yourself (e.g. `my-plugin/rule-foo`).
- **There’s no AST visitor.** Linting tokens is much simpler than linting an actual programming language. For that reason, there’s no AST visitor. Most token linters will simply iterate over `context.tokens` for everything they need. However, if you _really_ want to traverse an AST, you can do so by parsing and traversing `context.src` yourself.
- **There’s no auto-fixing.** Linting tokens is also a bit different, in that the source of truth may not even be source code (it was likely generated from Figma, etc.). So the APIs around fixing aren’t there yet; we’re only concerned with raising issues.

### transform()

Expand Down
Loading