[Feature] ESLint plugin new rules#728
Merged
Merged
Conversation
- emits-kebab-case: enforce kebab-case emit names in config.emits (fixable) - emits-multi-word: enforce multi-word emit names to avoid native DOM event collisions - components-pascal-case: enforce PascalCase keys in config.components (fixable) - require-emit-declared-in-config: require this.$emit() names to be in config.emits - require-children-declared-in-config: require this.$children.Name to be in config.components - require-options-declared-in-config: require this.$options.name to be in config.options
Export SizeUnchanged@studiometa/js-toolkit
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #728 +/- ##
==========================================
- Coverage 97.99% 97.72% -0.27%
==========================================
Files 153 159 +6
Lines 3386 3607 +221
Branches 898 1004 +106
==========================================
+ Hits 3318 3525 +207
- Misses 62 74 +12
- Partials 6 8 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fc6678c to
50b19af
Compare
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.
🔗 Linked issue
No issue.
❓ Type of change
📚 Description
Add new rules to the ESLint plugin:
emits-kebab-case(fixable)Emit names in
config.emitsmust be kebab-case (content-change, notcontentChange)emits-multi-wordEmit names must be multi-word to avoid collisions with native DOM events (
item-click, notclick)require-emit-declared-in-configEvery
this.$emit('name')call must reference a name declared inconfig.emitscomponents-pascal-case(fixable)Keys in
config.componentsmust be PascalCase (MySlider, notmySlider)require-children-declared-in-configEvery
this.$children.Nameaccess must reference a component declared inconfig.componentsrequire-options-declared-in-configEvery
this.$options.nameaccess must reference an option declared inconfig.options📝 Checklist