Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter #21

Merged
merged 17 commits into from
Oct 14, 2024
Merged

Linter #21

merged 17 commits into from
Oct 14, 2024

Conversation

max-ostapenko
Copy link
Contributor

@max-ostapenko max-ostapenko commented Oct 12, 2024

I went with default superlinter setup.

Had to switch off two tasks:

VALIDATE_JAVASCRIPT_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false

because of the conflicts:

  • markdown and json didn't conform to 2 spaces indentation regardless of .editorconfig presence (maybe I missed something)

@max-ostapenko max-ostapenko marked this pull request as ready for review October 12, 2024 19:53
Copy link
Member

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

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

LGTM

Is it worth adding npm run lint commands to allow this to be run offline? At least for the common ones like eslint, markdownlint...etc? Would save you having to wait for a github action to complete just to realise you've missed one small thing.

@max-ostapenko
Copy link
Contributor Author

standard and markdownlint help to format and lint js and md locally.

@tunetheweb
Copy link
Member

IIRC standard is very opinionated and deliberately doesn’t allow config (which might be why it didn’t play well with prettier?) Whereas eslint is more configurable. But maybe for this simple use case it doesn’t matter? So happy to merge this and can improve if future if we wanna.

@max-ostapenko
Copy link
Contributor Author

max-ostapenko commented Oct 14, 2024

Agree, it was just the fastest setup to get all checks green.
And I relied on my positive experience with black.

I'm not familiar with how well standard is maintained.
eslint may be a better choice for more granular preferences, but also could take hours to configure. It lost a lot of rules and formatting functionality to plugins in v9...

P.S. My issue with prettier - it created 3 space indents in markdown sublists.

@max-ostapenko max-ostapenko merged commit 1372eae into main Oct 14, 2024
16 checks passed
@max-ostapenko max-ostapenko deleted the linter branch October 14, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants