Skip to content

Commit f9c6c49

Browse files
matijsRobbert
authored andcommitted
chore: update npm-package-json-lint config
- 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 - Remove unused `proprietary/LICENSE.md`
1 parent 807f8af commit f9c6c49

File tree

13 files changed

+54
-72
lines changed

13 files changed

+54
-72
lines changed

.npmpackagejsonlintrc.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

npmpackagejsonlint.config.cjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
rules: {
3+
'no-caret-version-dependencies': 'error',
4+
'no-caret-version-devDependencies': 'error',
5+
'no-tilde-version-dependencies': 'error',
6+
'no-tilde-version-devDependencies': 'error',
7+
'require-repository-directory': 'error',
8+
'valid-values-license': ['error', ['EUPL-1.2']],
9+
'valid-values-name-scope': ['error', ['@example']],
10+
},
11+
overrides: [
12+
{
13+
patterns: ['proprietary/**/package.json'],
14+
rules: {
15+
'valid-values-license': ['error', ['SEE LICENSE IN LICENSE.md']],
16+
},
17+
},
18+
],
19+
};

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{
2+
"name": "@example/design-system",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "Design system based on the NL Design System architecture",
56
"license": "EUPL-1.2",
6-
"name": "@example/design-system",
77
"keywords": [
88
"nl-design-system"
99
],
1010
"private": true,
11+
"repository": {
12+
"type": "git+ssh",
13+
"url": "git@github.com:nl-design-system/example.git",
14+
"directory": "."
15+
},
1116
"engines": {
1217
"node": "^20",
1318
"pnpm": "^9"
@@ -50,7 +55,7 @@
5055
"lint:css": "stylelint --allow-empty-input '**/*.{css,scss}'",
5156
"lint:js": "eslint --ext .js,.cjs,.mjs,.json,.jsx,.mdx,.ts,.tsx --report-unused-disable-directives .",
5257
"lint:md": "markdownlint '**/*.md'",
53-
"lint:package-json": "npmPkgJsonLint '**/package.json'",
58+
"lint:package-json": "npmPkgJsonLint .",
5459
"lint:package-lock": "pnpm ls --recursive",
5560
"lint-fix": "npm-run-all --continue-on-error lint-fix:** prettier",
5661
"lint-fix:css": "stylelint --fix '**/*.{css,scss}'",

packages/components-css/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{
2+
"name": "@example/components-css",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "CSS Components for a design system based on the NL Design System architecture",
56
"license": "EUPL-1.2",
6-
"name": "@example/components-css",
77
"keywords": [
88
"nl-design-system"
99
],
10-
"private": true
10+
"private": true,
11+
"repository": {
12+
"type": "git+ssh",
13+
"url": "git@github.com:nl-design-system/example.git",
14+
"directory": "packages/components-css"
15+
}
1116
}

packages/components-react/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2+
"name": "@example/components-react",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "React component library for the Example repository, based on the NL Design System architecture",
56
"license": "EUPL-1.2",
6-
"name": "@example/components-react",
77
"keywords": [
88
"nl-design-system"
99
],
@@ -14,7 +14,8 @@
1414
},
1515
"repository": {
1616
"type": "git+ssh",
17-
"url": "git@github.com:nl-design-system/example-community.git"
17+
"url": "git@github.com:nl-design-system/example.git",
18+
"directory": "packages/components-react"
1819
},
1920
"scripts": {
2021
"build": "npm-run-all clean build:**",

packages/storybook/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2+
"name": "@example/storybook",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "Storybook based on the NL Design System architecture",
56
"license": "EUPL-1.2",
6-
"name": "@example/storybook",
77
"keywords": [
88
"nl-design-system"
99
],
1010
"private": true,
1111
"repository": {
1212
"type": "git+ssh",
13-
"url": "git@github.com:nl-design-system/example.git"
13+
"url": "git@github.com:nl-design-system/example.git",
14+
"directory": "packages/storybook"
1415
},
1516
"scripts": {
1617
"build": "storybook build --output-dir dist/ --config-dir config/",

packages/web-components-react/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2+
"name": "@example/web-components-react",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "React web components bundle based on the NL Design System architecture",
56
"license": "EUPL-1.2",
6-
"name": "@example/web-components-react",
77
"keywords": [
88
"nl-design-system"
99
],
1010
"private": true,
1111
"repository": {
1212
"type": "git+ssh",
13-
"url": "git@github.com:nl-design-system/example.git"
13+
"url": "git@github.com:nl-design-system/example.git",
14+
"directory": "packages/web-components-react"
1415
},
1516
"sideEffects": false,
1617
"scripts": {

packages/web-components-stencil/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2+
"name": "@example/web-components-stencil",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "Stencil web components bundle based on the NL Design System architecture",
56
"license": "EUPL-1.2",
6-
"name": "@example/web-components-stencil",
77
"keywords": [
88
"nl-design-system"
99
],
@@ -20,7 +20,8 @@
2020
],
2121
"repository": {
2222
"type": "git+ssh",
23-
"url": "git@github.com:nl-design-system/example.git"
23+
"url": "git@github.com:nl-design-system/example.git",
24+
"directory": "packages/web-components-stencil"
2425
},
2526
"scripts": {
2627
"build": "npm-run-all clean build:**",

proprietary/.npmpackagejsonlintrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

proprietary/LICENSE.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

proprietary/assets/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2+
"name": "@example/assets",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "Assets",
56
"license": "SEE LICENSE IN LICENSE.md",
6-
"name": "@example/assets",
77
"keywords": [
88
"nl-design-system"
99
],
@@ -14,6 +14,7 @@
1414
"files": [],
1515
"repository": {
1616
"type": "git+ssh",
17-
"url": "git@github.com:nl-design-system/example.git"
17+
"url": "git@github.com:nl-design-system/example.git",
18+
"directory": "proprietary/assets"
1819
}
1920
}

proprietary/design-tokens/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2+
"name": "@example/design-tokens",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "Example design tokens",
56
"license": "SEE LICENSE IN LICENSE.md",
6-
"name": "@example/design-tokens",
77
"keywords": [
88
"nl-design-system"
99
],
@@ -13,7 +13,8 @@
1313
},
1414
"repository": {
1515
"type": "git+ssh",
16-
"url": "git@github.com:nl-design-system/example.git"
16+
"url": "git@github.com:nl-design-system/example.git",
17+
"directory": "proprietary/design-tokens"
1718
},
1819
"scripts": {
1920
"clean": "rimraf dist/",

proprietary/font/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2+
"name": "@example/font",
23
"version": "1.0.0-alpha.0",
34
"author": "Community for NL Design System",
45
"description": "Font assets",
56
"license": "SEE LICENSE IN LICENSE.md",
6-
"name": "@example/font",
77
"main": "dist/index.css",
88
"keywords": [
99
"nl-design-system"
@@ -17,6 +17,7 @@
1717
],
1818
"repository": {
1919
"type": "git+ssh",
20-
"url": "git@github.com:nl-design-system/example.git"
20+
"url": "git@github.com:nl-design-system/example.git",
21+
"directory": "proprietary/font"
2122
}
2223
}

0 commit comments

Comments
 (0)