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

feat(npm-package-json-lint): enforce type module #313

Merged
merged 1 commit into from
Nov 22, 2023
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
5 changes: 5 additions & 0 deletions .changeset/clean-buckets-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spear-ai/npm-package-json-lint-config": major
---

Added rule to NPM Package JSON Lint configs to require packages be of type `module`.
5 changes: 5 additions & 0 deletions .changeset/thin-meals-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spear-ai/npm-package-json-lint-config": patch
---

Fixed missing rules in NPM Package JSON Lint configs.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"turbo": "1.10.16",
"typescript": "5.3.2"
},
"license": "",
"license": "MIT",
"packageManager": "[email protected]",
"private": true,
"repository": {
Expand Down
4 changes: 3 additions & 1 deletion packages/npm-package-json-lint-config/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ const baseNpmPackageJsonLintConfig = {
"prefer-alphabetical-optionalDependencies": "error",
"prefer-alphabetical-peerDependencies": "error",
"prefer-alphabetical-scripts": "error",
"prefer-property-order": ["error", []],
"require-author": "error",
"require-description": "error",
"require-license": "error",
"require-type": "error",
"valid-values-license": ["error", ["MIT", "UNLICENSED"]],
"valid-values-type": ["error", ["module"]],
"version-format": "error",
},
};
Expand Down
1 change: 1 addition & 0 deletions packages/npm-package-json-lint-config/src/spear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import baseNpmPackageJsonLintConfig from "./base";
const npmPackageJsonLintConfig = {
...baseNpmPackageJsonLintConfig,
rules: {
...baseNpmPackageJsonLintConfig.rules,
"valid-values-author": ["error", ["Spear AI"]],
"valid-values-name-scope": ["error", ["@spear-ai"]],
},
Expand Down
Loading