Skip to content

Commit

Permalink
chore: update npm-package-json-lint config (#84)
Browse files Browse the repository at this point in the history
- Use new config file name: npmpackagejsonlint.config.cjs
- Only use the rules we explicitly want to enforce
- Use overrides to get rid of config files in folders
- Update proprietary/**/package.json to have the correct license fields
- Add missing repository field in root package.json
  • Loading branch information
matijs authored Jul 28, 2024
1 parent 8041070 commit 67806c3
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 52 deletions.
42 changes: 0 additions & 42 deletions .npmpackagejsonlintrc.json

This file was deleted.

18 changes: 18 additions & 0 deletions npmpackagejsonlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
rules: {
'no-caret-version-dependencies': 'error',
'no-caret-version-devDependencies': 'error',
'no-tilde-version-dependencies': 'error',
'require-repository-directory': 'error',
'valid-values-license': ['error', ['EUPL-1.2']],
'valid-values-name-scope': ['error', ['@tilburg']],
},
overrides: [
{
patterns: ['proprietary/**/package.json'],
rules: {
'valid-values-license': ['error', ['SEE LICENSE IN ../LICENSE.md']],
},
},
],
};
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"node": "^20",
"pnpm": "^9"
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/tilburg.git",
"directory": "."
},
"workspaces": [
"./packages/*",
"./proprietary/*"
Expand Down Expand Up @@ -50,7 +55,7 @@
"lint:css": "stylelint --allow-empty-input '**/*.{css,scss}'",
"lint:js": "eslint --ext .js,.cjs,.mjs,.json,.jsx,.mdx,.ts,.tsx --report-unused-disable-directives .",
"lint:md": "markdownlint '**/*.md'",
"lint:package-json": "npmPkgJsonLint '**/package.json'",
"lint:package-json": "npmPkgJsonLint .",
"lint:package-lock": "pnpm ls --recursive",
"lint-fix": "npm-run-all --continue-on-error lint-fix:** prettier",
"lint-fix:css": "stylelint --fix '**/*.{css,scss}'",
Expand Down
7 changes: 6 additions & 1 deletion packages/components-css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
"keywords": [
"nl-design-system"
],
"private": true
"private": true,
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/tilburg.git",
"directory": "packages/components-css"
}
}
5 changes: 0 additions & 5 deletions proprietary/.npmpackagejsonlintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion proprietary/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1.0.0-alpha.0",
"author": "Community for NL Design System",
"description": "Assets",
"license": "SEE LICENSE IN LICENSE.md",
"license": "SEE LICENSE IN ../LICENSE.md",
"name": "@tilburg/assets",
"keywords": [
"nl-design-system"
Expand Down
2 changes: 1 addition & 1 deletion proprietary/design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1.0.0-alpha.15",
"author": "Community for NL Design System",
"description": "Example design tokens",
"license": "SEE LICENSE IN LICENSE.md",
"license": "SEE LICENSE IN ../LICENSE.md",
"name": "@tilburg/design-tokens",
"keywords": [
"nl-design-system"
Expand Down
2 changes: 1 addition & 1 deletion proprietary/font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1.0.0-alpha.0",
"author": "Community for NL Design System",
"description": "Font assets",
"license": "SEE LICENSE IN LICENSE.md",
"license": "SEE LICENSE IN ../LICENSE.md",
"name": "@tilburg/font",
"main": "dist/index.css",
"keywords": [
Expand Down

0 comments on commit 67806c3

Please sign in to comment.