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(fix): check that no files were changed when performing a lint #131

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zimeg
Copy link
Member

@zimeg zimeg commented Nov 5, 2024

Type of change

  • Bug fix

Summary

This PR checks if the CI lintings catch unexpected formatting or similar strangness with biome 🔍 Planning to share findings in comments below 🙏

Requirements

  • I’ve checked my submission against the Samples Checklist to ensure it complies with all standards
  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@zimeg
Copy link
Member Author

zimeg commented Nov 5, 2024

https://github.com/slack-samples/bolt-ts-starter-template/actions/runs/11675826478/job/32511044471?pr=131#step:5:17

> [email protected] test
> npm run build && npm run lint

...

> [email protected] lint
> npx @biomejs/biome check --write *.ts listeners

Checked 15 files in 8ms. Fixed 1 file.

The fixed file here unfort. isn't added to the PR though'twould be neat 👀 Will follow up with proposed changes!

Comment on lines +9 to +10
"lint": "npx @biomejs/biome check *.ts listeners",
"lint:fix": "npx @biomejs/biome check --write *.ts listeners",
Copy link
Member Author

Choose a reason for hiding this comment

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

No reference to npm run lint in the README which I think is alright, but I'm unsure if the : approach makes sense here 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Adding npm run lint:ci and using it for CI jobs may be another option, but I'm happy to let @filmaj and you decide the naming tomorrow!

Copy link
Member

Choose a reason for hiding this comment

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

Either works for me 👍

@zimeg zimeg changed the title ci: experiment with the test lintings in ci ci(fix): check that no files were changed when performing a lint Nov 5, 2024
@zimeg zimeg added the bug Something isn't working label Nov 5, 2024
@zimeg zimeg requested review from seratch and filmaj November 5, 2024 01:36
Comment on lines +9 to +10
"lint": "npx @biomejs/biome check *.ts listeners",
"lint:fix": "npx @biomejs/biome check --write *.ts listeners",
Copy link
Member

Choose a reason for hiding this comment

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

Either works for me 👍

@filmaj
Copy link
Member

filmaj commented Nov 5, 2024

A potential related option is to consider running the --write run script in a pre-commit hook. I even opened an issue for this in the node-slack-sdk: slackapi/node-slack-sdk#2034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants