ubiquity / ts-template

A template repository for all @ubiquity projects.
2 stars 24 forks source link

use `eslint-plugin-filename-rules` #23

Closed Keyrxng closed 6 months ago

Keyrxng commented 8 months ago

Related to #21

ubiquity-os-deployer[bot] commented 8 months ago
b4c274b
3d239c8
bf59bee
b92db67
0f9acf6
github-actions[bot] commented 8 months ago
Lines Statements Branches Functions
Coverage: 80%
80% (4/5) 100% (0/0) 66.66% (2/3)

JUnit

Tests Skipped Failures Errors Time
1 0 :zzz: 0 :x: 0 :fire: 2.823s :stopwatch:
Coverage Report (80%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files8010066.6680 
   main.ts8010066.66809
Keyrxng commented 8 months ago
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 commented 6 months ago

@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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

no worries I'll do this today

Keyrxng commented 6 months ago

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

gentlementlegen commented 6 months ago

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

Keyrxng commented 6 months ago

@gentlementlegen sorry bud didn't see there was conflicts