-
-
Notifications
You must be signed in to change notification settings - Fork 833
feat(linter/plugins): rule options #16215
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
cb21eac
feat(linter/plugins): rule options
wagenet 449f47c
docs: update comments
overlookmotel 793bc49
style: formatting
overlookmotel e4c82ce
style: use `for ... of` loop
overlookmotel 5769d4e
docs: shorten comment
overlookmotel a62ff03
refactor: export `ExternalLinterSetupConfigsCb` from `oxc_linter` crate
overlookmotel a91c4f9
docs: revise comment
overlookmotel d516f76
docs: revise comment
overlookmotel 330604e
move calling `setupConfigs` to after check for `list_rules`
overlookmotel 07c023d
docs: add comment
overlookmotel 63881d7
test: combine test into existing test fixture
overlookmotel 8ecc071
test: test all JSON value types
overlookmotel 71a16fa
style: shorten code (dereference early)
overlookmotel fde3021
refactor: convert to `PathBuf` explicitly
overlookmotel 0ec8111
style: longer var names
overlookmotel 8f2a6e2
test: fix tests
overlookmotel a0cf146
style: combine imports
overlookmotel 9b8c848
test: make test more realistic
overlookmotel 67edfd9
refactor: shorten code
overlookmotel 9ab19a3
style: rename vars
overlookmotel 6667b91
style: full stops on comments
overlookmotel 624eff8
refactor: remove unnecessary type annotation
overlookmotel 736841b
refactor: assume `options` passed to `add_options` is an array
overlookmotel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { setOptions } from "./options.js"; | ||
|
|
||
| /** | ||
| * Populates Rust-resolved configuration options on the JS side. | ||
| * Called from Rust side after all configuration options have been resolved. | ||
| * | ||
| * Note: the name `setupConfigs` is currently incorrect, as we only populate rule options. | ||
| * The intention is for this function to transfer all configurations in a multi-config workspace. | ||
| * The configuration relevant to each file would then be resolved on the JS side. | ||
| * | ||
| * @param optionsJSON - Array of all rule options across all configurations, serialized as JSON | ||
| */ | ||
| export function setupConfigs(optionsJSON: string): void { | ||
| // TODO: setup settings using this function | ||
| setOptions(optionsJSON); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| export { lintFile } from "./lint.js"; | ||
| export { loadPlugin } from "./load.js"; | ||
| export { setupConfigs } from "./config.js"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.