Skip to content

Commit

Permalink
chore: update npm-package-json-lint config
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
- Bring files in line with the configuration
- Add missing package.json#repository field where missing
- Add missing package.json#repository.directory fields
  • Loading branch information
matijs committed Jul 30, 2024
1 parent 73eaead commit d4b0e05
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 73 deletions.
42 changes: 0 additions & 42 deletions .npmpackagejsonlintrc.json

This file was deleted.

5 changes: 3 additions & 2 deletions apps/rvs.rivm.nl/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/rvs.rivm.nl",
"version": "1.0.0-alpha.0",
"author": "Community for NL Design System",
"description": "Storybook based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/rvs.rivm.nl",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "apps/rvs.rivm.nl"
},
"scripts": {
"dev": "next dev",
Expand Down
19 changes: 19 additions & 0 deletions npmpackagejsonlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
rules: {
'no-caret-version-dependencies': 'error',
'no-caret-version-devDependencies': 'error',
'no-tilde-version-dependencies': 'error',
'no-tilde-version-devDependencies': 'error',
'require-repository-directory': 'error',
'valid-values-license': ['error', ['EUPL-1.2']],
'valid-values-name-scope': ['error', ['@rijkshuisstijl-community']],
},
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
@@ -1,13 +1,18 @@
{
"name": "@rijkshuisstijl-community/design-system",
"version": "1.0.0-alpha.0",
"author": "Community for NL Design System",
"description": "Design system based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/design-system",
"keywords": [
"nl-design-system"
],
"private": true,
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "."
},
"engines": {
"node": "^20",
"pnpm": "^9"
Expand Down
7 changes: 6 additions & 1 deletion packages/components-css/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
"name": "@rijkshuisstijl-community/components-css",
"version": "1.0.0-alpha.23",
"author": "Community for NL Design System",
"description": "CSS Components for a design system based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/components-css",
"keywords": [
"nl-design-system"
],
"private": false,
"publishConfig": {
"access": "restricted",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "packages/components-css"
}
}
5 changes: 3 additions & 2 deletions packages/components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/components-react",
"version": "1.0.0-alpha.0",
"author": "Community for NL Design System",
"description": "React component library for the Rijkshuisstijl Community repository, based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/components-react",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "packages/components-react"
},
"scripts": {
"prebuild": "npm run clean",
Expand Down
5 changes: 3 additions & 2 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/storybook",
"version": "1.0.0-alpha.0",
"author": "Community for NL Design System",
"description": "Storybook based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/storybook",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "packages/storybook"
},
"scripts": {
"build": "storybook build --output-dir dist/ --config-dir config/",
Expand Down
5 changes: 3 additions & 2 deletions packages/web-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/web-components-react",
"version": "1.0.0-alpha.5",
"author": "Community for NL Design System",
"description": "React web components bundle based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/web-components-react",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "packages/web-components-react"
},
"sideEffects": false,
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions packages/web-components-stencil/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/web-components-stencil",
"version": "1.0.0-alpha.5",
"author": "Community for NL Design System",
"description": "Stencil web components bundle based on the NL Design System architecture",
"license": "EUPL-1.2",
"name": "@rijkshuisstijl-community/web-components-stencil",
"keywords": [
"nl-design-system"
],
Expand All @@ -26,7 +26,8 @@
],
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "packages/web-components-stencil"
},
"scripts": {
"prebuild": "npm run clean",
Expand Down
5 changes: 0 additions & 5 deletions proprietary/.npmpackagejsonlintrc.json

This file was deleted.

5 changes: 3 additions & 2 deletions proprietary/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/assets",
"version": "1.0.0-alpha.23",
"author": "Community for NL Design System",
"description": "Assets",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/assets",
"keywords": [
"nl-design-system"
],
Expand All @@ -15,6 +15,7 @@
"files": [],
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/assets"
}
}
5 changes: 3 additions & 2 deletions proprietary/design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/design-tokens",
"version": "1.0.0-alpha.24",
"author": "Community for NL Design System",
"description": "Example design tokens",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/design-tokens",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/design-tokens"
},
"scripts": {
"clean": "rimraf dist/* src/generated/*",
Expand Down
5 changes: 3 additions & 2 deletions proprietary/digid-design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/digid-design-tokens",
"version": "1.0.0-alpha.15",
"author": "Community for NL Design System",
"description": "DigiD design tokens",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/digid-design-tokens",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/digid-design-tokens"
},
"scripts": {
"clean": "rimraf dist/ tmp/",
Expand Down
5 changes: 3 additions & 2 deletions proprietary/font/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/font",
"version": "1.0.0-alpha.23",
"author": "Community for NL Design System",
"description": "Font assets",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/font",
"main": "dist/index.css",
"keywords": [
"nl-design-system"
Expand All @@ -18,6 +18,7 @@
],
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/font"
}
}
5 changes: 3 additions & 2 deletions proprietary/logius-design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/logius-design-tokens",
"version": "1.0.0-alpha.16",
"author": "Community for NL Design System",
"description": "Logius design tokens",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/logius-design-tokens",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/logius-design-tokens"
},
"scripts": {
"clean": "rimraf dist/ tmp/",
Expand Down
5 changes: 3 additions & 2 deletions proprietary/mijnoverheid-design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/mijnoverheid-design-tokens",
"version": "1.0.0-alpha.15",
"author": "Community for NL Design System",
"description": "MijnOverheid design tokens",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/mijnoverheid-design-tokens",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/mijnoverheid-design-tokens"
},
"scripts": {
"clean": "rimraf dist/ tmp/",
Expand Down
5 changes: 3 additions & 2 deletions proprietary/rivm-design-tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rijkshuisstijl-community/rivm-design-tokens",
"version": "1.0.0-alpha.9",
"author": "Community for NL Design System",
"description": "RIVM design tokens",
"license": "SEE LICENSE IN LICENSE.md",
"name": "@rijkshuisstijl-community/rivm-design-tokens",
"keywords": [
"nl-design-system"
],
Expand All @@ -14,7 +14,8 @@
},
"repository": {
"type": "git+ssh",
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git"
"url": "[email protected]:nl-design-system/rijkshuisstijl-community.git",
"directory": "proprietary/rivm-design-tokens"
},
"scripts": {
"clean": "rimraf dist/ tmp/",
Expand Down

0 comments on commit d4b0e05

Please sign in to comment.