Skip to content

resolved issue #1293 modified es-lint config file - #1370

Merged
itsalaidbacklife merged 2 commits into
cuttle-cards:mainfrom
princekamariya:feature/issue-1293-prevent-unscoped-style-blocks
Aug 3, 2026
Merged

resolved issue #1293 modified es-lint config file#1370
itsalaidbacklife merged 2 commits into
cuttle-cards:mainfrom
princekamariya:feature/issue-1293-prevent-unscoped-style-blocks

Conversation

@princekamariya

Copy link
Copy Markdown
Contributor

#1293

Please check the following

  • [✓] Do the tests still pass? (see Run the Tests)
  • [✓] Is the code formatted properly? (see Linting (Formatting))
  • For New Features:
    • Have tests been added to cover any new features or fixes?
    • Has the documentation been updated accordingly?

Please describe additional details for testing this change

Adds the vue/enforce-style-attribute ESLint rule so every <style> block must be scoped, with an override disabling the rule for src/App.vue (which holds global styles).

One other file in the repo, src/components/MarkdownContent.vue, also had a plain <style> block. Since its markdown content is rendered via v-html (and scoped CSS attributes aren't applied to v-html-injected DOM), it was converted to <style scoped> using :deep(p) so the padding rule still reaches the dynamically rendered markdown.

To verify:

  1. Run npm run lint ,should pass with no errors.
  2. Try adding a plain (non-scoped) <style> block to any .vue file other than App.vue , npm run lint should now fail with vue/enforce-style-attribute.
  3. Confirm src/App.vue's existing global <style> block still lints clean (override working).
  4. Confirm src/components/MarkdownContent.vue's markdown-rendered padding still displays correctly in the browser

@itsalaidbacklife itsalaidbacklife added dev experience Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle version-patch An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1) labels Aug 3, 2026

@itsalaidbacklife itsalaidbacklife left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@itsalaidbacklife
itsalaidbacklife merged commit af166d3 into cuttle-cards:main Aug 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev experience Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle version-patch An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevEx]: Prevent unscoped <style> blocks with eslint rule enforce-style-attribute

2 participants