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

chore: set up initial actions & docs #1

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

Conversation

JakobJingleheimer
Copy link
Member

No description provided.

@bmuenzenmeyer
Copy link

just throwing this previous conversation here nodejs/release-cloudflare-worker#132 - it's not a blocker, but i honestly dont know how to manage this sort of fragmentation across the project - perhaps it doesnt matter

package.json Outdated Show resolved Hide resolved
@JakobJingleheimer
Copy link
Member Author

I think some fragmentation is fine. I think it's more important to keep standards similar. How they are enforced is an implementation detail, and the existing modus operandi of the project is, without a compelling reason to the contrary, that's author's choice.

ESLint being "in the family" is maybe a compelling reason, but i think not a clear-cut one.

I don't have much preference though. ESLint has been fine when I've used it before. I only tossed in biome here because of the reasons Augustin mentioned.

@AugustinMauroy
Copy link
Member

Note, you put the MIT license in package.json but not on the repo

@@ -0,0 +1,18 @@
# Contributing
Copy link
Member

Choose a reason for hiding this comment

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

Need to add code snippets about how to run test and how to write a test.
Take example on nodejs.org repo we had done huge work to have something really explicit

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea!

This PR isn't finished btw. Just as much as I could get done last night. But it's ready for input/discussion 🙂

biome.jsonc Outdated Show resolved Hide resolved
@AugustinMauroy
Copy link
Member

Should we have commit hooks ?

node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
Copy link
Member

Choose a reason for hiding this comment

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

this should be done in sub steps ? I'm no sure.
@bmuenzenmeyer is more of an expert on this than I am

Comment on lines +4 to +5
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always"
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 think we need to set an additional property so that VS Code doesn't change d.ts.js when it updates imports. I don't recall what the config prop is though.

Copy link
Member

Choose a reason for hiding this comment

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

I've no idea, but I think this behaviour is gone now, but not for sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely not gone. It happened to me like yesterday.

Comment on lines +23 to +26
- Do `node --run lint:fix` to fix linting issues
- Do `node --run format:fix` to format code
- Do `node --run test:types` to check types
- Do `node --run test` to run tests (it's should pass 😃)
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we create a superset of these so users just have to do 1 thing? Ex node --run pre-commit

Copy link
Member

@AugustinMauroy AugustinMauroy Nov 21, 2024

Choose a reason for hiding this comment

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

Why not

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Comment on lines +7 to +9
"lint": "biome lint ./",
"lint:fix": "biome lint --fix ./",
"format": "biome format ./",
Copy link
Member Author

Choose a reason for hiding this comment

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

What's the difference between lint and format?

Copy link
Member

Choose a reason for hiding this comment

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

if you take look to biome rules set there are two part linter and formater

  • linter is a code analyser
  • formater is a code formater

IDK if you get the idea put it's two separate things

.github/workflows/ci.yml Show resolved Hide resolved
Comment on lines 24 to 25
- run: npm run lint
- run: npm run test:types
Copy link
Member Author

Choose a reason for hiding this comment

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

Same: Should these be switched to node --run …?

Also, should we add format?

Copy link
Member

Choose a reason for hiding this comment

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

Also, should we add format?

We can use a separate step using the biome action that include a reporter

@AugustinMauroy
Copy link
Member

error TS6059: File '/home/runner/work/userland-migrations/userland-migrations/build/snapshots.ts' is not under 'rootDir' '/home/runner/work/userland-migrations/userland-migrations/recipes'. 'rootDir' is expected to contain all source files.

should we include or exclude this file ?

Co-authored-by: Jacob Smith <[email protected]>
@JakobJingleheimer
Copy link
Member Author

Should we have commit hooks ?

I think no: those can get hella annoying. If a user wants to commit code that will fail, that doesn't hurt anything, so let's not get in the way—maybe they have a good reason (like sharing something incomplete).

@JakobJingleheimer
Copy link
Member Author

should we include or exclude this file ?

I think include

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