forked from opentripplanner/otp-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
288 lines (288 loc) · 10.1 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
287
288
{
"name": "@opentripplanner/otp-ui",
"version": "0.0.1",
"private": true,
"engines": {
"node": ">=12"
},
"workspaces": [
"packages/*"
],
"resolutions": {
"react": "18.2.0",
"react-animate-height": "3.0.4"
},
"devDependencies": {
"@babel/cli": "^7.10",
"@babel/core": "^7.10",
"@babel/plugin-proposal-class-properties": "^7.10",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.14.0",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.10",
"@babel/preset-react": "^7.10",
"@babel/preset-typescript": "^7.13.0",
"@danielhep/storybook-react-intl": "3.0.1",
"@formatjs/cli": "^4.2.32",
"@graphql-eslint/eslint-plugin": "^3.19.1",
"@semantic-release/git": "^9.0.0",
"@storybook/addon-a11y": "7.6.17",
"@storybook/addon-actions": "7.6.17",
"@storybook/addon-controls": "^7.6.17",
"@storybook/addon-docs": "7.6.17",
"@storybook/addon-essentials": "7.6.17",
"@storybook/addon-links": "7.6.17",
"@storybook/addon-storyshots": "7.6.17",
"@storybook/addon-storyshots-puppeteer": "7.6.17",
"@storybook/addon-storysource": "7.6.17",
"@storybook/addon-viewport": "7.6.17",
"@storybook/react": "7.6.17",
"@storybook/react-webpack5": "7.6.17",
"@storybook/storybook-deployer": "^2.8.10",
"@storybook/test-runner": "^0.17.0",
"@types/jest": "^26.0.23",
"@types/node": "^15.0.0",
"@types/styled-components": "^5.1.9",
"@types/vfile-message": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@typescript-eslint/parser": "^4.28.3",
"axe-playwright": "^2.0.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
"babel-plugin-import-graphql": "^2.8.1",
"babel-plugin-styled-components": "^1.10.0",
"concurrently": "^8.2.2",
"core-js": "2",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^4.3.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-plugin-import": "2.23.3",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "7.14.3",
"flat": "^5.0.2",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
"husky": "^2.4.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.8.0",
"jest-haste-map": "^24.8.0",
"jest-resolve": "^24.8.0",
"jest-styled-components": "^7.0.5",
"js-yaml": "^4.1.0",
"json-loader": "^0.5.7",
"lerna": "^3.18.4",
"lint-staged": "^8.2.0",
"msw": "^2.3.1",
"nock": "^11.7.0",
"prettier": "^1.19.1",
"puppeteer": "^10.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intl": "^5.24.6",
"react-test-renderer": "^16.14.0",
"semantic-release": "^17.1.1",
"semantic-release-monorepo": "^7.0.2",
"semver": "^7.3.2",
"storybook": "7.6.17",
"storybook-mock-date-decorator": "^1.0.2",
"styled-components": "^5.3.0",
"stylelint": "^10.1.0",
"stylelint-config-prettier": "^5.2.0",
"stylelint-config-recommended": "^2.2.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-prettier": "^1.1.1",
"stylelint-processor-styled-components": "^1.8.0",
"typescript": "^4.2.4",
"webpack": "^4.33.0",
"yaml-jest": "^1.2.0",
"yaml-loader": "^0.8.1",
"yaml-sort": "^2.0.0"
},
"scripts": {
"bootstrap": "lerna bootstrap --use-workspaces",
"build:cjs": "lerna exec --parallel -- babel --extensions '.js,.ts,.tsx,.snap' --ignore **/*.story.js,**/*.story.ts,**/*.story.d.ts,**/*.story.tsx,**/*.spec.js,**/*.spec.ts,**/*.test.js,**/*.test.ts,**/__tests__/**,**/__unpublished__/**,**/*.snap --ignore **/__tests__/** -D --no-copy-ignored --root-mode upward --source-maps true src -d lib",
"build:esm": "lerna exec --parallel -- cross-env BABEL_ENV=esm babel --extensions '.js,.ts,.tsx,.snap' --ignore **/*.story.js,**/*.story.ts,**/*.story.d.ts,**/*.story.tsx,**/*.spec.js,**/*.spec.ts,**/*.test.js,**/*.test.ts,**/__tests__/**,**/__unpublished__/**,**/*.snap --ignore **/__tests__/** -D --no-copy-ignored --root-mode upward --source-maps true src -d esm",
"check:i18n-all": "node packages/scripts/lib/run-validate-i18n.js packages/**/src packages/**/i18n",
"check:i18n-en-fr": "node packages/scripts/lib/run-validate-i18n.js packages/**/src packages/**/i18n/en-US.yml packages/**/i18n/fr.yml",
"clean": "git clean -Xdf",
"prepublish": "yarn typescript && yarn build:cjs && yarn build:esm",
"check-eslint-config": "eslint --print-config jestconfig.js | eslint-config-prettier-check",
"coverage": "jest --coverage",
"deploy-storybook": "storybook-to-ghpages",
"dev": "storybook dev -p 5555",
"predev": "yarn",
"build-storybook": "storybook build",
"lint:js": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern esm --ignore-pattern lib --ignore-pattern node_modules --ignore-pattern storybook-static --quiet",
"lint:graphql": "eslint . --ext .graphql --ignore-pattern esm --ignore-pattern lib --ignore-pattern node_modules --ignore-pattern storybook-static",
"lint:fixjs": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern esm --ignore-pattern lib --ignore-pattern node_modules --ignore-pattern storybook-static --fix",
"lint:styles": "stylelint \"packages/**/!(*.d).{j,t}s{,x}\"",
"lint": "yarn lint:js && yarn lint:styles && yarn lint:graphql",
"prettier": "prettier --write \"**/*.{json,md,yml}\"",
"semantic-release": "lerna exec --concurrency 1 -- semantic-release -e semantic-release-monorepo",
"test": "yarn lint:js && yarn lint:styles && yarn check:i18n-en-fr && yarn typescript && yarn unit && yarn test-storybook && yarn a11y-test",
"typescript": "lerna run tsc",
"unit": "jest --testPathIgnorePatterns a11y .d.ts",
"update-internal-dependencies": "node scripts/update-internal-dependencies.js",
"test-storybook": "test-storybook --url http://localhost:5555",
"update-snapshots": "yarn build-storybook; npx concurrently -k -s first -n \"SB,TEST\" \"npx http-server storybook-static --port 5555 --silent\" \"npx wait-on tcp:5555 && yarn test-storybook --url http://localhost:5555 -u\""
},
"eslintConfig": {
"env": {
"browser": true,
"jest": true
},
"overrides": [
{
"files": "*",
"excludedFiles": "*.graphql",
"extends": [
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"prettier/react"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"class-methods-use-this": 0,
"no-alert": 0,
"no-nested-ternary": 0,
"no-param-reassign": 0,
"no-plusplus": 0,
"no-use-before-define": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/func-call-spacing": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true
}
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/semi": "off",
"@typescript-eslint/space-before-function-paren": "off",
"prefer-destructuring": 0,
"prettier/prettier": [
"error"
],
"react/no-array-index-key": 0,
"react/no-string-refs": 0,
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx",
".tsx"
]
}
],
"react/prop-types": [
2,
{
"ignore": [
"style"
]
}
],
"node/no-extraneous-import": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off"
}
},
{
"parserOptions": {
"schema": "./packages/core-utils/src/otpSchema.json",
"operations": "./packages/**/*.graphql"
},
"files": [
"*.graphql"
],
"rules": {
"@graphql-eslint/alphabetize": [
"error",
{
"selections": [
"OperationDefinition"
],
"arguments": [
"Field",
"FieldDefinition"
]
}
]
},
"extends": "plugin:@graphql-eslint/operations-recommended"
}
]
},
"stylelint": {
"processors": [
"stylelint-processor-styled-components"
],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components",
"stylelint-prettier/recommended"
],
"rules": {
"property-no-vendor-prefix": null
}
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-push": "yarn check-eslint-config && yarn lint"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --ignore-pattern lib --ignore-pattern node_modules --fix",
"stylelint \"packages/**/!(*.d).{j,t}s{,x}\" --fix",
"git add"
],
"*.{json,md}": [
"prettier --write",
"git add"
],
"*.graphql": [
"prettier --write",
"yarn lint:graphql --fix",
"git add"
],
"!(.github/**).{yml,yaml}": [
"prettier --write",
"yaml-sort --quotingStyle double --input",
"git add"
]
},
"msw": {
"workerDirectory": "public"
},
"dependencies": {
"@storybook/icons": "^1.2.9"
}
}