Commit graph

11 commits

Author SHA1 Message Date
Boshen
72615877dc
feat(linter): allow "-c" configuration (#1909)
closes #1693
2024-01-06 16:32:11 +08:00
Boshen
497a20796c
feat(linter): parse two script tags from vue (#1899) 2024-01-05 16:44:27 +08:00
Boshen
8a3eff1bee
feat(linter): parse multiple script tags in astro file (#1898) 2024-01-05 16:36:31 +08:00
Boshen
a63490c1c0
feat(linter): support astro front matter --- block (#1893)
closes #1702
2024-01-05 10:05:43 +08:00
Boshen
11ca5c2bad
feat(linter): do not lint when vue file has no js section (#1891) 2024-01-04 21:24:19 +08:00
Clark Fischer
d88d76fdb8
Prioritize ignored paths when linting (#1878)
As discussed in #1124

A common workflow is running `oxlint` automatically via something like
lint-staged, which passes all changed file paths explicitly as CLI
arguments. The ignore crate auto-whitelists explicit paths, overriding
anything defined in an ignore file, leading to files that should be
ignored causing CI and VC hooks to fail.

eslint avoids this issue by giving precedence to .eslintignore unless
you pass `--no-ignore`.

Since `ignore` doesn't really give much control over this, the most
effective solution seems to be filtering. ~~Once we've got a list of
files to be linted, we can compare each against the .eslintignore and
see if it really truly should be linted.~~

~~Unfortunately, this is sort of a naive solution. Ignored directories
will still be walked, then filtered out after the fact. Changing this
behavior at the walker level would affect the formatter, which probably
isn't desirable.~~ (edit: The performance impact has been mostly
resolved.)

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2024-01-04 03:44:10 +00:00
Wenzhe Wang
ec9598cefc
test(cli): add simple integration test for vue file (#1863) 2023-12-31 22:37:26 +08:00
Wenzhe Wang
0feeac540d
feat(lint): add partial loader register (#1760) 2023-12-31 22:19:27 +08:00
Wenzhe Wang
8f27a98468
feat(cli): support walk vue and astro (#1745) 2023-12-31 22:15:11 +08:00
Boshen
c88823244e
fix(cli): correct ignore-pattern behavior; add more cli tests (#796) 2023-08-26 00:03:49 +08:00
Boshen
4ee56576c7
feat(cli): add basic unit tests (#793) 2023-08-25 21:26:14 +08:00