Skip to content

Commit

Permalink
Add docs note on lint fixing (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow authored Dec 4, 2024
1 parent f88e809 commit 2795f04
Showing 1 changed file with 1 addition and 0 deletions.
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

0 comments on commit 2795f04

Please sign in to comment.