Repository navigation
fix: route .vue files to ESLint under qlty when the Vue layer is enabled - #215
Merged
Merged
Conversation
qlty's eslint plugin is only handed JavaScript and TypeScript, so a repo on the Vue layer linted no single-file components. The README now gives the file type and routing to add, plus the package_file the eslint sandbox needs, and a consumer integration test runs that exact config.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #210.
Under qlty, ESLint never got
.vuefiles. Its eslint plugin only takes JavaScript and TypeScript, and qlty has novuefile type, so a repo on the Vue layer linted no single-file components in the hooks, in CI or on qlty Cloud.The fix is opt-in through the README rather than the shared source. Without the Vue layer's parser, ESLint can't parse a
.vuefile, so routing them for every consumer would break repos that have.vuefiles but don't use the layer.Changes
[file_types.vue]and widens[plugins.definitions.eslint] file_types.package_file = "package.json"on theeslintplugin. The old snippet only setpackage_filters, and with no package file the sandbox never installs the shared package, so the config failed to load.scripts/test-vue-policy.sh: builds a throwaway consumer from the README's Vue block verbatim,npm packs this repo into it, runsqlty checkand asserts thatvue/no-use-v-if-with-v-forandvue/require-v-for-keyfire on a component. The tarball is named after its hash, so a local rerun can't pick up a stale qlty sandbox.vue-policyjob in the Tests workflow.Verification
master(the shared package isn't installed) and with the two routing blocks removed (the component isn't linted).qlty check --all --no-cache,qlty fmtandqlty smellsare clean.YAML has the same gap and is left for a separate change. The base layer applies
comment-line-wrapto.yml, but qlty never hands YAML to ESLint either. Turning that on would change lint coverage for every consumer, so it needs its own test.