forked from carbon-design-system/ibm-products
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
286 lines (286 loc) · 9.55 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
{
"name": "ibm-products",
"engines": {
"node": ">=20.x"
},
"private": true,
"version": "0.0.0",
"repository": "git@github.com:carbon-design-system/ibm-products.git",
"license": "Apache-2.0",
"workspaces": {
"packages": [
"config/*",
"packages/*"
]
},
"scripts": {
"audit": "node scripts/audit.js '--environment production' moderate",
"avt": "AVT=true yarn playwright test --project chromium --grep @avt",
"build": "run-s -s 'build:*' storybook:build:storybook",
"build:packages": "yarn run-all --include-dependencies build",
"ci-check": "run-s -s 'ci-check:*' storybook:build",
"ci-check:build": "run-s -s 'build:*' 'run-all --no-sort ci-check'",
"ci-check:lint": "run-p -s audit lint",
"ci-check:tests": "run-p -s 'ci-check:test:*'",
"ci-check:test:c4p": "yarn test:c4p --ci",
"ci-check:test:c4p:snapshot": "yarn test:c4p:snapshot --ci",
"ci-check:test:c4p-wc": "yarn test:c4p-wc",
"ci-check:spellcheck": "yarn spellcheck",
"clean": "run-p -s 'clean:*' && run-p -s 'clean:finally:*'",
"clean:cache": "yarn cache clean",
"clean:finally:files": "rimraf coverage node_modules results",
"clean:lerna": "lerna clean --yes",
"clean:packages": "yarn run-all --no-sort clean",
"coverage": "echo 'you can pass a name argument to specify which tests are ran such as `yarn coverage decorator` and then view the results with `yarn coverage:report`'; yarn test:c4p --coverage",
"coverage:report": "open ./packages/ibm-products/coverage/index.html",
"format": "run-p -s 'format:*'",
"format:config": "prettier ./*.{js,jsx,tsx,ts,md,scss} --write --ignore-unknown",
"format:packages": "prettier ./packages/**/*.{js,jsx,tsx,ts,md,scss} --write --ignore-unknown",
"format:e2e": "prettier ./e2e/**/*.js --write --ignore-unknown",
"format:diff": "prettier --list-different '**/*.{js,jsx,md,scss,ts,tsx}' '*.{js,jsx,md,scss,ts,tsx}' '!**/{build,es,lib,storybook,ts,umd}/**' '!examples/**/*' '!scripts/**/*'",
"generate": "lerna run generate --loglevel success --scope \"@carbon/ibm-products\" --",
"lint": "run-p -s 'lint:*'",
"lint:license": "scripts/check-license.cjs -a",
"lint:license:staged": "scripts/check-license.cjs -w",
"lint:js": "eslint packages --fix",
"lint:styles": "stylelint '**/*.scss'",
"prepare": "husky install",
"postinstall": "husky",
"run-all": "lerna run --stream --prefix --loglevel success",
"test": "run-p -s 'test:*'",
"test:c4p": "lerna run --stream --scope @carbon/ibm-products test --",
"test:c4p:snapshot": "yarn test:c4p-styles styles -u",
"test:c4p-styles": "lerna run --stream --scope @carbon/ibm-products-styles test --",
"test:c4p-wc": "yarn playwright install && lerna run --stream --scope @carbon/ibm-products-web-components test --",
"spellcheck": "cspell '**' -e './examples' --gitignore --quiet --no-must-find-files",
"storybook": "yarn storybook:start",
"storybook:build": "run-s -s 'storybook:build:*'",
"storybook:build:storybook": "cd packages/core && yarn build",
"storybook:start": "cd packages/core && yarn start",
"storybook-wc": "cd packages/ibm-products-web-components && yarn storybook",
"storybook-wc:build": "cd packages/ibm-products-web-components && run-s build build:storybook",
"sync": "carbon-cli sync",
"update-gallery-config": "node scripts/example-gallery-builder/index.js; prettier examples/carbon-for-ibm-products/**/src/**/*.{js,jsx,md,mdx,scss,json} --write --loglevel=silent",
"//upgrade:dependencies:top": "# don't upgrade carbon (done globally), react/react-dom (not tested)",
"upgrade:dependencies:top": "npm-check-updates -u --dep dev,peer,prod --reject '/(carbon|^react$|^react-dom$|^@testing-library)/'",
"upgrade:dependencies:packages": "yarn run-all --no-sort --concurrency 1 upgrade-dependencies",
"upgrade:dependencies:examples": "npm-check-updates -u --dep dev,peer,prod --color --target minor --packageFile 'scripts/example-gallery-builder/update-example/**/package.json'",
"upgrade:automatic": "run-s -s 'upgrade:dependencies:*'",
"upgrade:carbon": "npm-check-updates -u --dep dev,peer,prod --packageFile '{package.json,{config/**,packages/**}/package.json}' --filter '/carbon/' --target minor",
"upgrade:manual": "sh ./scripts/monorepo-npm-upgrade.sh"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.9",
"@babel/preset-react": "^7.17.12",
"@commitlint/cli": "^18.6.0",
"@commitlint/config-conventional": "^18.6.0",
"@playwright/test": "^1.36.2",
"@testing-library/dom": "^8.11.4",
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"@types/carbon__layout": "^0.0.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"accessibility-checker": "^3.1.65",
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"copyfiles": "^2.4.1",
"cspell": "^8.3.2",
"eslint": "^8.56.0",
"eslint-config-carbon": "3.17.1",
"eslint-plugin-ssr-friendly": "^1.3.0",
"gitignore-to-glob": "^0.3.0",
"globby": "^14.0.0",
"husky": "^9.0.5",
"jest": "^29.7.0",
"jest-canvas-mock": "2.5.2",
"jest-junit": "^16.0.0",
"json": "^11.0.0",
"lerna": "^8.0.2",
"lint-staged": "^15.2.0",
"npm-check-updates": "^16.14.12",
"npm-run-all": "^4.1.5",
"npm-upgrade": "^3.1.0",
"postcss": "^8.4.33",
"prettier": "^2.8.8",
"prettier-config-carbon": "^0.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"stylelint": "^15.11.0",
"stylelint-config-carbon": "1.19.1",
"webpack": "^5.90.0"
},
"//resolutions:http-signature": "package 'request' deprecated but still used, asks for http-signature ~1.2.0 which indirectly has vulnerabilities",
"//resolutions:minimist": "https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5)",
"resolutions": {
"cheerio": "1.0.0-rc.10",
"braces": "^3.0.3",
"micromatch": "4.0.8",
"ws": "^8.17.1",
"@carbon/ibm-products-styles": "^2.49.0"
},
"eslintConfig": {
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"presets": [
"@babel/preset-react"
]
}
},
"plugins": [
"ssr-friendly"
],
"ignorePatterns": [
"packages/ibm-products-web-components/**/*"
],
"extends": [
"carbon",
"plugin:ssr-friendly/recommended"
],
"rules": {
"react/display-name": [
0
],
"react/forbid-component-props": [
2,
{
"forbid": [
{
"propName": "style",
"disallowedFor": [
"Datagrid",
"Carousel",
"Checklist",
"Coachmark"
],
"message": "Avoid using style prop"
}
]
}
],
"react/forbid-dom-props": [
2,
{
"forbid": [
{
"propName": "style",
"disallowedFor": [
"Datagrid",
"Carousel",
"Checklist",
"Coachmark"
],
"message": "Avoid using style prop"
}
]
}
]
},
"overrides": [
{
"files": [
"*.ts",
"*.tsx"
],
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "after-used",
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"header-max-length": [
2,
"always",
72
],
"body-max-line-length": [
2,
"always",
80
],
"scope-case": [
0,
"always",
"lower-case"
],
"type-enum": [
2,
"always",
[
"build",
"ci",
"chore",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
]
]
}
},
"lint-staged": {
"!(examples/**/*)**/*.{js,jsx,ts,tsx}": [
"npx prettier --cache --write",
"npx eslint --fix",
"npx cspell --no-must-find-files",
"yarn lint:license:staged"
],
"**/*.scss": [
"npx prettier --cache --write",
"npx stylelint --allow-empty-input"
],
"!(examples/**/*).md": [
"npx prettier --cache --write",
"npx cspell --no-must-find-files",
"yarn lint:license:staged"
]
},
"dependencies": {
"stylelint-plugin-carbon-tokens": "2.8.0"
},
"stylelint": {
"extends": [
"stylelint-config-carbon"
],
"rules": {
"max-nesting-depth": null,
"scss/no-global-function-names": null,
"csstools/use-logical": null,
"scss/load-no-partial-leading-underscore": null,
"scss/double-slash-comment-inline": null,
"no-duplicate-selectors": null
}
},
"packageManager": "yarn@4.0.2"
}