Skip to content

Commit

Permalink
feat(npm-package-json-lint): enforce type module (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
psirenny authored Nov 22, 2023
1 parent 0903639 commit e82eaaa
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
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

0 comments on commit e82eaaa

Please sign in to comment.