oxc/apps/oxlint/fixtures
camchenry e88cf1bfd6 fix(linter): make overrides globs relative to config path (#7407)
- fixes https://github.com/oxc-project/oxc/issues/7365

currently, we are matching globs on the absolute path to the file, which means that in order to properly match, all globs would need to start with `**/`. this is not consistent with the behavior in ESLint, which is defined here:  https://eslint.org/docs/v8.x/use/configure/configuration-files#how-do-overrides-work

> **The patterns are applied against the file path relative to the directory of the config file.** For example, if your config file has the path `/Users/john/workspace/any-project/.eslintrc.js` and the file you want to lint has the path `/Users/john/workspace/any-project/lib/util.js`, then the pattern provided in `.eslintrc.js` is executed against the relative path `lib/util.js`.

This PR adds the ability to store the path to the configuration file along with the configuration data, so that we can later use it to resolve the relative paths of the files in the overrides section.

I'm not exactly sure if this will still make sense with nested configuration files, but I think it makes sense to store a path to each configuration file, alongside where the overrides are stored.
2024-11-22 14:37:45 +00:00
..
astro refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
eslintrc_env refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
eslintrc_off refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
eslintrc_vitest_replace refactor(linter): use run_on_jest_node for existing lint rules (#6722) 2024-10-21 02:13:59 +00:00
flow feat(parser,linter)!: add ParserReturn::is_flow_language; linter ignore flow error (#7373) 2024-11-20 12:50:24 +00:00
import feat(linter)!: support plugins in oxlint config files (#6088) 2024-10-10 19:21:50 +00:00
linter test(oxlint): add --fix test case (#6747) 2024-10-21 15:38:19 +00:00
no_console_off refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
no_empty_allow_empty_catch refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
no_empty_disallow_empty_catch refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
no_undef refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
overrides fix(linter): make overrides globs relative to config path (#7407) 2024-11-22 14:37:45 +00:00
print_config feat(linter): support --print-config all to print config file for project (#6579) 2024-10-22 17:56:23 +00:00
svelte refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
tsconfig style: add trailing line breaks to JSON files (#5544) 2024-09-06 12:50:15 +00:00
typescript_eslint feat(linter)!: support plugins in oxlint config files (#6088) 2024-10-10 19:21:50 +00:00
vue fix(linter): fix regression when parsing ts in vue files (#6336) 2024-10-07 14:28:44 +00:00
walk_dir refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00
test.min.js refactor(cli): move crates/oxc_cli to apps/oxlint (#3413) 2024-05-26 05:00:30 +00:00