Fix pre-commit

This commit is contained in:
Paulo Gustavo Veiga 2023-01-13 23:08:01 -08:00
parent 0194407c7c
commit 86536ac8d2
5 changed files with 34 additions and 68 deletions

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
yarn lint-staged

4
.husky/pre-push Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
yarn lint && yarn test

View File

@ -8,7 +8,8 @@
"playground": "lerna run playground --stream", "playground": "lerna run playground --stream",
"test": "lerna run test --stream", "test": "lerna run test --stream",
"test:unit": "lerna run test:unit --stream", "test:unit": "lerna run test:unit --stream",
"test:integration": "lerna run test:integration --stream" "test:integration": "lerna run test:integration --stream",
"prepare": "husky install"
}, },
"private": true, "private": true,
"devDependencies": { "devDependencies": {
@ -28,7 +29,7 @@
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"husky": "4", "husky": "^8.0.0",
"lerna": "^3.16.4", "lerna": "^3.16.4",
"lint-staged": "^10.5.4", "lint-staged": "^10.5.4",
"prettier": "^2.7.1", "prettier": "^2.7.1",

View File

@ -1,3 +1,20 @@
/*
* Copyright [2021] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useFetchAccount } from './../../redux/clientSlice'; import { useFetchAccount } from './../../redux/clientSlice';
import 'dayjs/locale/fr'; import 'dayjs/locale/fr';
import 'dayjs/locale/en'; import 'dayjs/locale/en';

View File

@ -6678,13 +6678,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"compare-versions@npm:^3.6.0":
version: 3.6.0
resolution: "compare-versions@npm:3.6.0"
checksum: 7492a50cdaa2c27f5254eee7c4b38856e1c164991bab3d98d7fd067fe4b570d47123ecb92523b78338be86aa221668fd3868bfe8caa5587dc3ebbe1a03d52b5d
languageName: node
linkType: hard
"component-emitter@npm:^1.2.1": "component-emitter@npm:^1.2.1":
version: 1.3.0 version: 1.3.0
resolution: "component-emitter@npm:1.3.0" resolution: "component-emitter@npm:1.3.0"
@ -9048,15 +9041,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"find-versions@npm:^4.0.0":
version: 4.0.0
resolution: "find-versions@npm:4.0.0"
dependencies:
semver-regex: ^3.1.2
checksum: 2b4c749dc33e3fa73a457ca4df616ac13b4b32c53f6297bc862b0814d402a6cfec93a0d308d5502eeb47f2c125906e0f861bf01b756f08395640892186357711
languageName: node
linkType: hard
"flat-cache@npm:^3.0.4": "flat-cache@npm:^3.0.4":
version: 3.0.4 version: 3.0.4
resolution: "flat-cache@npm:3.0.4" resolution: "flat-cache@npm:3.0.4"
@ -10202,24 +10186,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"husky@npm:4": "husky@npm:^8.0.0":
version: 4.3.8 version: 8.0.3
resolution: "husky@npm:4.3.8" resolution: "husky@npm:8.0.3"
dependencies:
chalk: ^4.0.0
ci-info: ^2.0.0
compare-versions: ^3.6.0
cosmiconfig: ^7.0.0
find-versions: ^4.0.0
opencollective-postinstall: ^2.0.2
pkg-dir: ^5.0.0
please-upgrade-node: ^3.2.0
slash: ^3.0.0
which-pm-runs: ^1.0.0
bin: bin:
husky-run: bin/run.js husky: lib/bin.js
husky-upgrade: lib/upgrader/bin.js checksum: 837bc7e4413e58c1f2946d38fb050f5d7324c6f16b0fd66411ffce5703b294bd21429e8ba58711cd331951ee86ed529c5be4f76805959ff668a337dbfa82a1b0
checksum: ac5e6c72053b2a25532f4137f4b036c9057a4b31980f41c7c2efe05e094d2e06b5c8adc0aafba5c6b70e204ab05d4a916233aec9dffc7a0ccfdd14d4b01c719b
languageName: node languageName: node
linkType: hard linkType: hard
@ -13810,15 +13782,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"opencollective-postinstall@npm:^2.0.2":
version: 2.0.3
resolution: "opencollective-postinstall@npm:2.0.3"
bin:
opencollective-postinstall: index.js
checksum: 0a68c5cef135e46d11e665d5077398285d1ce5311c948e8327b435791c409744d4a6bb9c55bd6507fb5f2ef34b0ad920565adcdaf974cbdae701aead6f32b396
languageName: node
linkType: hard
"opener@npm:^1.5.2": "opener@npm:^1.5.2":
version: 1.5.2 version: 1.5.2
resolution: "opener@npm:1.5.2" resolution: "opener@npm:1.5.2"
@ -14403,15 +14366,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"pkg-dir@npm:^5.0.0":
version: 5.0.0
resolution: "pkg-dir@npm:5.0.0"
dependencies:
find-up: ^5.0.0
checksum: b167bb8dac7bbf22b1d5e30ec223e6b064b84b63010c9d49384619a36734caf95ed23ad23d4f9bd975e8e8082b60a83395f43a89bb192df53a7c25a38ecb57d9
languageName: node
linkType: hard
"please-upgrade-node@npm:^3.2.0": "please-upgrade-node@npm:^3.2.0":
version: 3.2.0 version: 3.2.0
resolution: "please-upgrade-node@npm:3.2.0" resolution: "please-upgrade-node@npm:3.2.0"
@ -15867,13 +15821,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"semver-regex@npm:^3.1.2":
version: 3.1.4
resolution: "semver-regex@npm:3.1.4"
checksum: 3962105908e326aa2cd5c851a2f6d4cc7340d1b06560afc35cd5348d9fa5b1cc0ac0cad7e7cef2072bc12b992c5ae654d9e8d355c19d75d4216fced3b6c5d8a7
languageName: node
linkType: hard
"semver@npm:2 || 3 || 4 || 5, semver@npm:2.x || 3.x || 4 || 5, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.5.1, semver@npm:^5.6.0, semver@npm:^5.7.0, semver@npm:^5.7.1": "semver@npm:2 || 3 || 4 || 5, semver@npm:2.x || 3.x || 4 || 5, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.5.1, semver@npm:^5.6.0, semver@npm:^5.7.0, semver@npm:^5.7.1":
version: 5.7.1 version: 5.7.1
resolution: "semver@npm:5.7.1" resolution: "semver@npm:5.7.1"
@ -18245,13 +18192,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"which-pm-runs@npm:^1.0.0":
version: 1.1.0
resolution: "which-pm-runs@npm:1.1.0"
checksum: 39a56ee50886fb33ec710e3b36dc9fe3d0096cac44850d9ca0c6186c4cb824d6c8125f013e0562e7c94744e1e8e4a6ab695592cdb12555777c7a4368143d822c
languageName: node
linkType: hard
"which-typed-array@npm:^1.1.8": "which-typed-array@npm:^1.1.8":
version: 1.1.9 version: 1.1.9
resolution: "which-typed-array@npm:1.1.9" resolution: "which-typed-array@npm:1.1.9"
@ -18333,7 +18273,7 @@ __metadata:
eslint-plugin-import: ^2.26.0 eslint-plugin-import: ^2.26.0
eslint-plugin-react: ^7.31.10 eslint-plugin-react: ^7.31.10
eslint-plugin-react-hooks: ^4.6.0 eslint-plugin-react-hooks: ^4.6.0
husky: 4 husky: ^8.0.0
lerna: ^3.16.4 lerna: ^3.16.4
lint-staged: ^10.5.4 lint-staged: ^10.5.4
prettier: ^2.7.1 prettier: ^2.7.1