Commit Graph

4 Commits

Author SHA1 Message Date
Boshen 1193c9dbaf chore(oxfmt): dogfood operator position at line start (#25937)
dogfood
2026-08-20 14:36:47 +00:00
camc314 1d22912cb4 fix(linter/plugins): parse rule-less directive justifications (#25559)
## Summary

- extract directive justifications before parsing directive labels, matching ESLint
- return an empty rule value for rule-less directives while preserving their justification
- cover block, enable, line, and next-line directives with both eslint and oxlint prefixes

Closes #25556
2026-08-12 16:44:01 +00:00
camc314 016cf2acd6 feat(linter/oxc): add bad-match-all-arg rule (#24900)
## Summary

- add oxc/bad-match-all-arg for non-global regular expressions passed to matchAll
- share cycle-safe RegExp flag resolution with bad-replace-all-arg
- support callable and global-qualified RegExp constructors
- update generated metadata, diagnostics, timings, and CLI rule-count snapshots

Closes #24823.
2026-07-24 14:48:45 +00:00
Nicolas Le Cam 1884833279 feat(linter/plugins): implement SourceCode.getDisableDirectives method (#21029)
Used by [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/0e023e3ad4dfb22ace33ef70c420513946528fa4/rules/utils/eslint-directive.js)

It crashes when trying to use it through jsPlugins (for unicorn/expiring-todo-comments)

ESLint [documentation](https://eslint.org/docs/latest/extend/languages#the-sourcecode-object) says its optional but unicorn doesn't seem to guard against its absence

---------

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-05-04 21:17:38 +01:00