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

ci(root): update ls lint version & config wd-180 #680

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

what1s1ove
Copy link
Owner

@what1s1ove what1s1ove commented Jul 17, 2024

Resolves #180

@what1s1ove what1s1ove self-assigned this Jul 17, 2024
@what1s1ove what1s1ove linked an issue Jul 17, 2024 that may be closed by this pull request
2 tasks
@github-actions github-actions bot added the main label Jul 17, 2024
@what1s1ove what1s1ove merged commit 6649dfe into main Jul 17, 2024
4 of 5 checks passed
@loeffel-io
Copy link

Can you please provide more informations what you try to archive with regex:([.a-z0-9]*)([-.][a-z0-9]+)*

First quick look: you missed .d.ts

I would a recommend a config like this:

ls:
  .dir: kebab-case
  .*: regex:([.a-z0-9]*)([-.][a-z0-9]+)* # dont know why 
  .*.*: regex:([.a-z0-9]*)([-.][a-z0-9]+)* # match .d.ts
  .md: SCREAMING_SNAKE_CASE # rename your readme.md to README.md

  .github:
    .dir: regex:([.a-z]*)*
    # you could add here more to check - only .dir is checked for .github and sub directories

ignore:
  - .git
  - '**/node_modules'
  - '**/build'

@loeffel-io
Copy link

Checked out your repo

This should do the job:

ls:
  .dir: kebab-case
  .*: kebab-case
  .*.*: kebab-case
  .md: SCREAMING_SNAKE_CASE # rename your readme.md to README.md

  .github:
    .dir: regex:[.]*[a-z]+
    .yml: kebab-case

ignore:
  - .git
  - '**/node_modules'
  - '**/build'
  - '**/index.md' # <-- 

@what1s1ove
Copy link
Owner Author

what1s1ove commented Jul 17, 2024

Can you please provide more informations what you try to archive with regex:([.a-z0-9]*)([-.][a-z0-9]+)*

First quick look: you missed .d.ts

I would a recommend a config like this:

ls:
  .dir: kebab-case
  .*: regex:([.a-z0-9]*)([-.][a-z0-9]+)* # dont know why 
  .*.*: regex:([.a-z0-9]*)([-.][a-z0-9]+)* # match .d.ts
  .md: SCREAMING_SNAKE_CASE # rename your readme.md to README.md

  .github:
    .dir: regex:([.a-z]*)*
    # you could add here more to check - only .dir is checked for .github and sub directories

ignore:
  - .git
  - '**/node_modules'
  - '**/build'

Hey @loeffel-io! Thank you for your advice!

Can you please provide more informations what you try to archive with regex:([.a-z0-9])([-.][a-z0-9]+)

This regex was previously used for files like timeline-filter.type.js, as the simple kebab-case option would still complain about such a name. I've had this regex for a very long time, since the early versions of ls-lint. It's great to see that I can now remove it! Thank you!

Regarding MD files. Honestly, I don't want to rename the readme and add index.md to the ignore list 🥲 since there is a high chance that other MD files with different names will appear. As I understand it, there's no other way to make ls-lint not complain about the root file CHANGELOG.md, except for what you described?

@loeffel-io
Copy link

Got it - Yes, there is no way by design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Update ls-lint config
2 participants