Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"contributions": [
"bug",
"code",
"content",
"doc",
Expand All @@ -17,6 +18,23 @@
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"profile": "http://www.joshuakgoldberg.com"
},
{
"login": "michaelfaith",
"name": "michael faith",
"avatar_url": "https://avatars.githubusercontent.com/u/8071845?v=4",
"profile": "https://github.com/michaelfaith",
"contributions": [
"bug",
"code",
"content",
"doc",
"ideas",
"infra",
"maintenance",
"projectManagement",
"tool"
]
}
],
"contributorsPerLine": 7,
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thanks for your interest in contributing to `package-json-validator-cli`! 💖
Thanks for your interest in contributing to `package-json-validator-cli`! 📂

> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.

Expand Down Expand Up @@ -94,4 +94,4 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2

If you made it all the way to the end, bravo dear user, we love you.
Please include an emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
💖 is a good starter if you're not sure which to use.
📂 is a good starter if you're not sure which to use.
7 changes: 6 additions & 1 deletion .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Add `--watch` to run the builder in a watch mode that continuously cleans and re
pnpm build --watch
```

### Built App Debugging

This repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging.
To debug a `bin` app, add a breakpoint to your code, then run _Debug Program_ from the VS Code Debug panel (or press F5).
VS Code will automatically run the `build` task in the background before running `lib/bin.js`.

## Formatting

[Prettier](https://prettier.io) is used to format code.
Expand All @@ -45,7 +51,6 @@ Each should be shown in VS Code, and can be run manually on the command-line:
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files

Read the individual documentation for each linter to understand how it can be configured and used best.

Expand Down
42 changes: 23 additions & 19 deletions .github/ISSUE_TEMPLATE/01-bug.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
name: 🐛 Bug
description: Report a bug trying to run the code

title: "🐛 Bug: <short description of the bug>"

labels:
- "type: bug"

body:
- attributes:
- type: checkboxes
attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/JoshuaKGoldberg/package-json-validator-cli/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
- type: textarea
attributes:
description: What did you expect to happen?
label: Expected
type: textarea
validations:
required: true
- attributes:
- type: textarea
attributes:
description: What happened instead?
label: Actual
type: textarea
validations:
required: true
- attributes:
- type: input
attributes:
description: Version of this package you tried
label: Version
placeholder: 1.2.3
validations:
required: true
- type: textarea
attributes:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Report a bug trying to run the code

labels:
- "type: bug"

name: 🐛 Bug

title: "🐛 Bug: <short description of the bug>"
19 changes: 9 additions & 10 deletions .github/ISSUE_TEMPLATE/02-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
name: 📝 Documentation
description: Report a typo or missing area of documentation

title: "📝 Documentation: <short description of the request>"

labels:
- "area: documentation"

body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Documentation Report Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
- label: I have checked the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/JoshuaKGoldberg/package-json-validator-cli/issues?q=is%3Aissue) and found none that matched my issue.
required: true
Expand All @@ -18,12 +26,3 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Report a typo or missing area of documentation

labels:
- "area: documentation"

name: 📝 Documentation

title: "📝 Documentation: <short description of the request>"
21 changes: 9 additions & 12 deletions .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: 🚀 Feature
description: Request that a new feature be added or an existing feature improved

title: "🚀 Feature: <short description of the feature>"

labels:
- "type: feature"

body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Feature Request Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/JoshuaKGoldberg/package-json-validator-cli/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
description: What did you expect to be able to do?
description: What would you like to be able to do?
label: Overview
type: textarea
validations:
Expand All @@ -18,12 +24,3 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Request that a new feature be added or an existing feature improved

labels:
- "type: feature"

name: 🚀 Feature

title: "🚀 Feature: <short description of the feature>"
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/04-rfc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 💬 RFC
description: Request feedback from the community on a significant change to the project.

title: "💬 RFC: <short description of the proposal>"

labels:
- "type: rfc"

body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: RFC Checklist
options:
- label: I have [searched for related issues](https://github.com/JoshuaKGoldberg/package-json-validator-cli/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
description: Please provide details about your proposal.
label: Overview
type: textarea
validations:
required: true
- attributes:
description: How long should this RFC remain open for feedback? This should be no less than 6 weeks from the publishing date.
label: This RFC will remain open until
placeholder: YYYY-MM-DD
type: input
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
name: 🛠 Tooling
description: Report a bug or request an enhancement in repository tooling

title: "🛠 Tooling: <short description of the change>"

labels:
- "area: tooling"

body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
Expand All @@ -11,7 +19,7 @@ body:
required: true
type: checkboxes
- attributes:
description: What did you expect to be able to do?
description: What tooling changes would you like to make?
label: Overview
type: textarea
validations:
Expand All @@ -20,12 +28,3 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Report a bug or request an enhancement in repository tooling

labels:
- "area: tooling"

name: 🛠 Tooling

title: "🛠 Tooling: <short description of the change>"
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- 👋 Hi, thanks for sending a PR to package-json-validator-cli! 💖
<!-- 👋 Hi, thanks for sending a PR to package-json-validator-cli! 📂
Please fill out all fields below and make sure each item is true and [x] checked.
Otherwise we may not be able to review your PR. -->

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
cache: pnpm
node-version: 24.6.0
node-version: "lts/*"
- run: pnpm install --frozen-lockfile
shell: bash
using: composite
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: ./.github/actions/prepare
- run: pnpm build
- run: node lib/index.js
- run: node lib/bin.js
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: ./.github/actions/prepare
- run: pnpm build
- run: pnpm lint
lint_knip:
name: Lint Knip
Expand All @@ -35,13 +36,6 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: ./.github/actions/prepare
- run: pnpm lint:packages
lint_spelling:
name: Lint Spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: ./.github/actions/prepare
- run: pnpm lint:spelling
prettier:
name: Prettier
runs-on: ubuntu-latest
Expand All @@ -56,7 +50,9 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: ./.github/actions/prepare
- run: pnpm run test --coverage
- if: always()
- env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: always()
uses: codecov/codecov-action@v3
type_check:
name: Type Check
Expand Down
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"smartStep": true,
"type": "node"
},
{
"name": "Debug Program",
"preLaunchTask": "build",
"program": "lib/bin.js",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node"
}
],
"version": "0.2.0"
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p align="center">
<!-- prettier-ignore-start -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors" target="_blank"><img alt="👪 All Contributors: 1" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-1-21bb42.svg" /></a>
<a href="#contributors" target="_blank"><img alt="👪 All Contributors: 2" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-2-21bb42.svg" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- prettier-ignore-end -->
<a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
Expand All @@ -20,20 +20,27 @@

## Usage

Run this package as a terminal command to validate a `package.json` file:

```shell
npm i package-json-validator-cli
npx package-json-validator-cli
```

```ts
import { greet } from "package-json-validator-cli";
See `package-json-validator-cli --help` for usage:

greet("Hello, world! 💖");
```plaintext
Options:
--filename, -f package.json file to validate [default: "package.json"]
--warnings, -w display warnings [default: false]
--recommendations, -r display recommendations [default: false]
--quiet, -q less output [default: false]
--help, -h, -? this help message [default: false]
```

## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).
Thanks! 💖
Thanks! 📂

## Contributors

Expand All @@ -44,7 +51,8 @@ Thanks! 💖
<table>
<tbody>
<tr>
<td align="center"><a href="http://www.joshuakgoldberg.com"><img src="https://avatars.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg ✨"/><br /><sub><b>Josh Goldberg ✨</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/commits?author=JoshuaKGoldberg" title="Code">💻</a> <a href="#content-JoshuaKGoldberg" title="Content">🖋</a> <a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/commits?author=JoshuaKGoldberg" title="Documentation">📖</a> <a href="#ideas-JoshuaKGoldberg" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-JoshuaKGoldberg" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-JoshuaKGoldberg" title="Maintenance">🚧</a> <a href="#projectManagement-JoshuaKGoldberg" title="Project Management">📆</a> <a href="#tool-JoshuaKGoldberg" title="Tools">🔧</a></td>
<td align="center"><a href="http://www.joshuakgoldberg.com"><img src="https://avatars.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg ✨"/><br /><sub><b>Josh Goldberg ✨</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/issues?q=author%3AJoshuaKGoldberg" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/commits?author=JoshuaKGoldberg" title="Code">💻</a> <a href="#content-JoshuaKGoldberg" title="Content">🖋</a> <a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/commits?author=JoshuaKGoldberg" title="Documentation">📖</a> <a href="#ideas-JoshuaKGoldberg" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-JoshuaKGoldberg" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-JoshuaKGoldberg" title="Maintenance">🚧</a> <a href="#projectManagement-JoshuaKGoldberg" title="Project Management">📆</a> <a href="#tool-JoshuaKGoldberg" title="Tools">🔧</a></td>
<td align="center"><a href="https://github.com/michaelfaith"><img src="https://avatars.githubusercontent.com/u/8071845?v=4?s=100" width="100px;" alt="michael faith"/><br /><sub><b>michael faith</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/issues?q=author%3Amichaelfaith" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/commits?author=michaelfaith" title="Code">💻</a> <a href="#content-michaelfaith" title="Content">🖋</a> <a href="https://github.com/JoshuaKGoldberg/package-json-validator-cli/commits?author=michaelfaith" title="Documentation">📖</a> <a href="#ideas-michaelfaith" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-michaelfaith" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-michaelfaith" title="Maintenance">🚧</a> <a href="#projectManagement-michaelfaith" title="Project Management">📆</a> <a href="#tool-michaelfaith" title="Tools">🔧</a></td>
</tr>
</tbody>
</table>
Expand Down
Loading