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

use eslint-plugin-filename-rules #23

Merged
merged 4 commits into from
May 13, 2024

Conversation

Keyrxng
Copy link
Member

@Keyrxng Keyrxng commented Mar 5, 2024

Related to #21

  • Added eslint-plugin-filename-rules

@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Mar 5, 2024

Copy link
Contributor

github-actions bot commented Mar 21, 2024

Lines Statements Branches Functions
Coverage: 80%
80% (4/5) 100% (0/0) 66.66% (2/3)

JUnit

Tests Skipped Failures Errors Time
1 0 💤 0 ❌ 0 🔥 2.823s ⏱️
Coverage Report (80%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files8010066.6680 
   main.ts8010066.66809

@Keyrxng
Copy link
Member Author

Keyrxng commented Mar 21, 2024

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 92.3 75 80 92
static 80 100 66.66 80
main.ts 80 100 66.66 80 9
tests/kebab-case 95.23 75 100 95
kebab-case.ts 95.23 75 100 95 20

@gentlementlegen gentlementlegen self-requested a review May 2, 2024 08:07
@gentlementlegen
Copy link
Member

@Keyrxng does it really need to be done manually? Have you considered using eslint plugins instead like https://www.npmjs.com/package/eslint-plugin-filename-rules ? Or are there features missing in it

@Keyrxng
Copy link
Member Author

Keyrxng commented May 2, 2024

I wasn't aware of that plugin @gentlementlegen. The bash script was already in use in other repos across the org I just ported it over, added some tests and tweaks to catch more file name formats.

It could be removed in favour of the plugin I don't have any problems with that.


Also there is no active issue for this, I just took it upon myself (won't do it again without spinning up an issue first) but I'm happy to see it through and add the plugin if you haven't already took it upon yourself

@gentlementlegen
Copy link
Member

Would be nice if you can test the plugin and see if that can replace everything that the script is currently doing. If so, I am in favor of replacing it by the eslint package.

@Keyrxng
Copy link
Member Author

Keyrxng commented May 2, 2024

no worries I'll do this today

@Keyrxng
Copy link
Member Author

Keyrxng commented May 2, 2024

Would be nice if you can test the plugin and see if that can replace everything that the script is currently doing. If so, I am in favor of replacing it by the eslint package.

It'll have to be manual QA but seems to work nicely

image

@Keyrxng Keyrxng changed the title add kebab workflow, script and tests use eslint-plugin-filename-rules May 2, 2024
@Keyrxng Keyrxng changed the title use eslint-plugin-filename-rules use eslint-plugin-filename-rules May 2, 2024
@gentlementlegen
Copy link
Member

@Keyrxng if you fix the conflicts in can merge this in.

@Keyrxng
Copy link
Member Author

Keyrxng commented May 13, 2024

@gentlementlegen sorry bud didn't see there was conflicts

@gentlementlegen gentlementlegen self-requested a review May 13, 2024 08:47
@gentlementlegen gentlementlegen merged commit 0f9acf6 into ubiquity:development May 13, 2024
5 checks passed
Comment on lines +1 to +3
/**
* @type {import("eslint").Linter.Config}
*/
Copy link
Member

@0x4007 0x4007 May 27, 2024

Choose a reason for hiding this comment

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

What is this? @Keyrxng @gentlementlegen

Why did you accept this as a js file? Those are forbidden.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't know they were explicitly forbidden as jest.config.js is a common config file across UBQ repos but I can refactor to one of the other accepted extensions

Copy link
Member

Choose a reason for hiding this comment

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

Jest is the exception if I recall correctly due to limitations

You changed this file format in this pull

Copy link
Member

Choose a reason for hiding this comment

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

#23 (comment)

Since it's a configuration file, didn't see much of the problem as long as it is typed. Can revert to json.

Copy link
Member

Choose a reason for hiding this comment

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

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.

3 participants