diff --git a/package.json b/package.json index 9aa8ed2e..0c23ad7d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,9 @@ "test": "jest", "prettify": "prettier --write \"platform/firecamp-platform/src/**/*.(ts|tsx)\" \"packages/firecamp-rest/src/**/*.(ts|tsx)\" \"packages/firecamp-graphql/src/**/*.(ts|tsx)\"", "precommit": "lint-staged", - "preinstall": "npx only-allow pnpm" + "preinstall": "npx only-allow pnpm", + "pre-commit": "pnpm run --filter \"@platform/*\" pre-commit", + "prepare": "husky install" }, "lint-staged": { "**/*.ts": [ @@ -72,7 +74,7 @@ "eslint-plugin-react": "^7.20.5", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.0", - "husky": "^8.0.1", + "husky": "^8.0.3", "ignore-loader": "^0.1.2", "jest-css-modules": "^2.1.0", "jest-css-modules-transform": "^4.4.2", diff --git a/platform/firecamp-platform/package.json b/platform/firecamp-platform/package.json index 58a4538b..ecfcbf6b 100644 --- a/platform/firecamp-platform/package.json +++ b/platform/firecamp-platform/package.json @@ -39,7 +39,8 @@ "doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json", "version": "standard-version", "reset-hard": "git clean -dfx && git reset --hard && npm i", - "prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish" + "prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish", + "pre-commit": "lint-staged" }, "engines": { "node": ">=10" diff --git a/platform/firecamp-ui/package.json b/platform/firecamp-ui/package.json index 11e07099..d1e3db8c 100644 --- a/platform/firecamp-ui/package.json +++ b/platform/firecamp-ui/package.json @@ -34,7 +34,8 @@ "chromatic": "npx chromatic --project-token=4db217014cde004", "build": "cross-env BABEL_ENV=production babel src -d dist && tsc && pnpm copy-files", "copy-files": "copyfiles -u 1 \"src/**/*.sass\" \"src/**/*.scss\" \"src/**/*.css\" dist/", - "storybook:deploy": "pnpm chromatic --project-token=$(grep 'FIRECAMP_STORYBOOK_DEPLOY' ../../.env | cut -d '=' -f 2)" + "storybook:deploy": "pnpm chromatic --project-token=$(grep 'FIRECAMP_STORYBOOK_DEPLOY' ../../.env | cut -d '=' -f 2)", + "pre-commit": "lint-staged" }, "bugs": { "url": "https://github.com/firecamp-dev/firecamp/issues" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f306a8b..00cf41c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -98,7 +98,7 @@ importers: version: 19.0.4(eslint-plugin-import@2.27.5)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.32.1)(eslint@8.32.0) eslint-plugin-import: specifier: ^2.22.0 - version: 2.27.5(eslint@8.32.0) + version: 2.27.5(@typescript-eslint/parser@5.48.2)(eslint@8.32.0) eslint-plugin-jest: specifier: ^27.2.1 version: 27.2.1(eslint@8.32.0)(typescript@5.0.2) @@ -118,7 +118,7 @@ importers: specifier: ^5.5.0 version: 5.5.0(webpack@5.75.0) husky: - specifier: ^8.0.1 + specifier: ^8.0.3 version: 8.0.3 ignore-loader: specifier: ^0.1.2 @@ -466,6 +466,33 @@ importers: specifier: ^4.7.4 version: 4.7.4 + packages/firecamp-common-config: + devDependencies: + '@typescript-eslint/eslint-plugin': + specifier: ^6.7.5 + version: 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@7.32.0)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: ^6.7.5 + version: 6.7.5(eslint@7.32.0)(typescript@4.9.5) + eslint: + specifier: ^7.32.0 + version: 7.32.0 + eslint-config-airbnb-base: + specifier: ^14.2.1 + version: 14.2.1(eslint-plugin-import@2.26.0)(eslint@7.32.0) + eslint-plugin-import: + specifier: ^2.25.2 + version: 2.26.0(@typescript-eslint/parser@6.7.5)(eslint@7.32.0) + eslint-plugin-prettier: + specifier: ^5.0.1 + version: 5.0.1(eslint@7.32.0)(prettier@3.0.3) + husky: + specifier: ^8.0.1 + version: 8.0.3 + prettier: + specifier: ^3.0.3 + version: 3.0.3 + packages/firecamp-cookie-manager: dependencies: tough-cookie: @@ -5882,7 +5909,7 @@ packages: chalk: 4.1.2 strip-ansi: 6.0.1 supports-color: 8.1.1 - tslib: 2.5.3 + tslib: 2.6.1 /@oclif/core@2.11.8(@types/node@16.18.35)(typescript@4.9.5): resolution: {integrity: sha512-GILmztcHBzze45GvxRpUvqQI5nM26kSE/Q21Y+6DtMR+C8etM/hFW26D3uqIAbGlGtg5QEZZ6pjA/Fqgz+gl3A==} @@ -8830,10 +8857,6 @@ packages: parse5: 7.1.2 dev: true - /@types/json-schema@7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} - dev: true - /@types/json-schema@7.0.13: resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} @@ -9005,10 +9028,6 @@ packages: /@types/scheduler@0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} - /@types/semver@7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} - dev: true - /@types/semver@7.5.3: resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} dev: true @@ -9680,8 +9699,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 5.48.2 '@typescript-eslint/types': 5.48.2 '@typescript-eslint/typescript-estree': 5.48.2(typescript@4.7.4) @@ -9700,8 +9719,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 5.48.2 '@typescript-eslint/types': 5.48.2 '@typescript-eslint/typescript-estree': 5.48.2(typescript@5.0.2) @@ -10119,7 +10138,7 @@ packages: '@yarnpkg/parsers': 2.5.1 clipanion: 2.6.2 cross-spawn: 7.0.3 - fast-glob: 3.2.12 + fast-glob: 3.3.1 micromatch: 4.0.5 stream-buffers: 3.0.2 tslib: 1.14.1 @@ -10589,9 +10608,9 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.21.1 - get-intrinsic: 1.2.0 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 is-string: 1.0.7 dev: true @@ -10624,8 +10643,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.21.1 + define-properties: 1.2.0 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 dev: true @@ -10634,8 +10653,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.21.1 + define-properties: 1.2.0 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 dev: true @@ -13694,14 +13713,6 @@ packages: engines: {node: '>=12'} dev: true - /define-properties@1.1.4: - resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - dev: true - /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} engines: {node: '>= 0.4'} @@ -14388,45 +14399,6 @@ packages: resolution: {integrity: sha512-YxIFEJuhgcICugOUvRx5th0UM+ActZ9sjY0QJmeVwsQdvosZ7kYzc9QqS0Da3R5iUmgU5meGIxh0xBeZpMVeLw==} dev: true - /es-abstract@1.21.1: - resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.12 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.11 - dev: true - /es-abstract@1.22.1: resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} engines: {node: '>= 0.4'} @@ -14660,7 +14632,7 @@ packages: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.32.0 - eslint-plugin-import: 2.27.5(eslint@8.32.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.48.2)(eslint@8.32.0) object.assign: 4.1.4 object.entries: 1.1.6 semver: 6.3.0 @@ -14678,7 +14650,7 @@ packages: dependencies: eslint: 8.32.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.32.0) - eslint-plugin-import: 2.27.5(eslint@8.32.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.48.2)(eslint@8.32.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.32.0) eslint-plugin-react: 7.32.1(eslint@8.32.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.32.0) @@ -14777,8 +14749,8 @@ packages: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 - is-core-module: 2.11.0 - resolve: 1.22.2 + is-core-module: 2.13.0 + resolve: 1.22.4 transitivePeerDependencies: - supports-color dev: true @@ -15093,38 +15065,6 @@ packages: - supports-color dev: true - /eslint-plugin-import@2.27.5(eslint@8.32.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - dependencies: - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.32.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.30.5)(eslint-import-resolver-node@0.3.7)(eslint@8.32.0) - has: 1.0.3 - is-core-module: 2.11.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.2 - semver: 6.3.0 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - /eslint-plugin-jest@27.2.1(eslint@8.32.0)(typescript@5.0.2): resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -15535,7 +15475,7 @@ packages: dependencies: acorn: 8.8.2 acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.3 dev: true /esprima@4.0.1: @@ -15961,6 +15901,7 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 + dev: true /fast-glob@3.3.1: resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} @@ -15971,7 +15912,6 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 - dev: true /fast-json-parse@1.0.3: resolution: {integrity: sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==} @@ -16740,14 +16680,6 @@ packages: /get-func-name@2.0.0: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - /get-intrinsic@1.2.0: - resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - dev: true - /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -17067,7 +16999,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -22980,8 +22912,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.21.1 + define-properties: 1.2.0 + es-abstract: 1.22.1 dev: true /objectorarray@1.0.5: @@ -25505,7 +25437,7 @@ packages: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true