Skip to content

feat: add .nvmrc and engines key to package.json #66

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

Merged
merged 3 commits into from
Dec 2, 2022

Conversation

Pinjasaur
Copy link
Contributor

PR Checklist

Overview

It's like JoshuaKGoldberg/refined-saved-replies#69 but for this repo. 🙃

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

This looks great in general (thanks for sending it! ✨), but it's failing a lint task:

$ npx eslint . --max-warnings 0 --report-unused-disable-directives

template-typescript-node-package/package.json
Error:   51:2  error  Expected object keys to be in ascending order. 'engines' should be before 'version'  jsonc/sort-keys

This is one of the lint rules I've been meaning to bring into my other repos 😄

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

💯 thanks!

@Pinjasaur
Copy link
Contributor Author

Thanks @JoshuaKGoldberg! Would it be worth adding to a precommit hook locally? I personally have a tendency to "commit and forget."

@JoshuaKGoldberg JoshuaKGoldberg merged commit db9a536 into JoshuaKGoldberg:main Dec 2, 2022
@Pinjasaur Pinjasaur deleted the nvmrc branch December 2, 2022 19:22
github-actions bot pushed a commit that referenced this pull request Dec 2, 2022
# [1.2.0](v1.1.2...v1.2.0) (2022-12-02)

### Features

* add .nvmrc and `engines` key to package.json ([#66](#66)) ([db9a536](db9a536))
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JoshuaKGoldberg
Copy link
Owner

What would the precommit hook do?

I'm wary of running ESLint in a hook because with type information it can be a little slow. But if there's a good way to only run untyped + fixable rules, that'd be nice...

@Pinjasaur
Copy link
Contributor Author

Pinjasaur commented Dec 2, 2022

What would the precommit hook do?

I'm wary of running ESLint in a hook because with type information it can be a little slow. But if there's a good way to only run untyped + fixable rules, that'd be nice...

I was just thinking it could lint. 🤷🏻

I've used lint-staged on a project at a previous role and it was pretty slick, even ended up using it to leverage shellcheck to lint shell scripts in the same (mono)repo. Maybe it would be worth a test/benchmark? 🙂

@JoshuaKGoldberg
Copy link
Owner

If a benchmark shows it's reasonably quick, I'm down!

We'll want to get a meaty project in. tslint-to-eslint-config might be a good testing ground.

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Dec 12, 2022

@allcontributors add @Pinjasaur for tooling

(whoops, sorry, I forgot I'd set this up!)

@allcontributors
Copy link
Contributor

@JoshuaKGoldberg

I've put up a pull request to add @Pinjasaur! 🎉

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.

🛠 Tooling: Add an .nvmrc and package.json engines
2 participants