feat: add control for executing rules based on Svelte/SvelteKit context

#980

Pull request

Merged
B
baseballyama
Dec 30, 2024, 2:01 PM

This PR introduces the getSvelteContext function. This function will be invoked at the beginning of every rule before the release of eslint-plugin-svelte v3. It enables the conditional execution of linting based on factors such as the Svelte version SvelteKit route etc. By doing so, it allows users can use recommended config regardless of the Svelte version they are using. As a result, unnecessary rules will be effectively disabled automatically.

After merging this PR and applying the changes to all rules, I plan to update the recommended config and release v3. Consequently, I will close #957.

Info

Merged at Jan 11, 2025, 12:52 PM
Merged by baseballyama
Assignees None
Reviewers ota-meshi
Labels None
Milestone None