Skip to content

Conversation

rgant
Copy link
Contributor

@rgant rgant commented Feb 26, 2025

I'm building an astro website and would like to have it linted using
https://github.com/ota-meshi/eslint-plugin-astro

I think that this might also be required: https://packagecontrol.io/packages/Astro
So maybe this isn't the correct way to do this.

In which case, what is the correct way to do this?

Lint astro.build files.
linter.py Outdated
@@ -38,6 +38,7 @@

STANDARD_SELECTOR = 'source.js, source.jsx'
PLUGINS = {
'eslint-plugin-astro': 'source.astro, text.html.astro, meta.template.astro, text.html.markdown.jsx',
Copy link
Member

Choose a reason for hiding this comment

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

Generally, I think this is the right approach. However, I don't know how you've come to these selectors. I think it's only source.astro; at least that's what The Astro package you linked defines. Usually you only want the outermost or base scope. Basically, the first part of the scope if the cursor is in (0, 0) position.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used Ctrl+Shift+P and then the "copy" command. I've removed the others beyond source.astro

Copy link
Member

Choose a reason for hiding this comment

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

Does it work? It looks fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does work.

Copy link
Member

Choose a reason for hiding this comment

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

Okaay

@kaste kaste merged commit fbd5524 into SublimeLinter:master Feb 27, 2025
2 checks passed
@kaste
Copy link
Member

kaste commented Feb 27, 2025

Thanks again.

@rgant rgant deleted the rgant-astro-1 branch March 31, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants