packages: setup husky
This commit is contained in:
parent
fb768e164d
commit
dd89340477
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
yarn precommit
|
||||
@ -4,7 +4,7 @@
|
||||
"bracketSpacing": true,
|
||||
"htmlWhitespaceSensitivity": "ignore",
|
||||
"insertPragma": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"bracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"printWidth": 100,
|
||||
"proseWrap": "preserve",
|
||||
|
||||
@ -183,12 +183,15 @@ const overrideRender: Partial<Record<keyof typeof map, RenderProps>> = {
|
||||
const graphType = $calculation.element('radioGraphType').getValue();
|
||||
|
||||
switch (graphType) {
|
||||
case 100_000_001:
|
||||
case 100_000_001: {
|
||||
return <span>Тип дегрессии</span>;
|
||||
case 100_000_003:
|
||||
}
|
||||
case 100_000_003: {
|
||||
return <span>Тип сезонности</span>;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
return <span>{titles.selectSeasonType}</span>;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint -- --fix",
|
||||
"start": "next start",
|
||||
"graphql:codegen": "graphql-codegen --config .graphqlrc.yml",
|
||||
"graphql:download-schema": "dotenv -e .env.local node ./scripts/graphql-download-schema.js",
|
||||
@ -37,6 +38,7 @@
|
||||
"superjson": "^1.12.1",
|
||||
"tools": "*",
|
||||
"ui": "*",
|
||||
"use-debounce": "^9.0.2",
|
||||
"zod": "^3.20.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -38,7 +38,9 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
|
||||
return;
|
||||
}
|
||||
|
||||
const { data: { lead }, } = await apolloClient.query<
|
||||
const {
|
||||
data: { lead },
|
||||
} = await apolloClient.query<
|
||||
CRMTypes.GetOpportunityByLeadQuery,
|
||||
CRMTypes.GetOpportunityByLeadQueryVariables
|
||||
>({
|
||||
@ -78,7 +80,9 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
|
||||
const leadid = $calculation.element('selectLead').getValue();
|
||||
|
||||
if (leadid) {
|
||||
const { data: { lead }, } = await apolloClient.query<
|
||||
const {
|
||||
data: { lead },
|
||||
} = await apolloClient.query<
|
||||
CRMTypes.GetOpportunityByLeadQuery,
|
||||
CRMTypes.GetOpportunityByLeadQueryVariables
|
||||
>({
|
||||
@ -94,7 +98,9 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
|
||||
}
|
||||
|
||||
if (opportunityid) {
|
||||
const { data: { opportunity }, } = await apolloClient.query<
|
||||
const {
|
||||
data: { opportunity },
|
||||
} = await apolloClient.query<
|
||||
CRMTypes.GetLeadidByOpportunityQuery,
|
||||
CRMTypes.GetLeadidByOpportunityQueryVariables
|
||||
>({
|
||||
@ -133,7 +139,9 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
|
||||
() => $calculation.element('selectLead').getValue(),
|
||||
async (leadid) => {
|
||||
if (leadid) {
|
||||
const { data: { quotes }, } = await apolloClient.query<
|
||||
const {
|
||||
data: { quotes },
|
||||
} = await apolloClient.query<
|
||||
CRMTypes.GetQuotesByLeadQuery,
|
||||
CRMTypes.GetQuotesByLeadQueryVariables
|
||||
>({
|
||||
|
||||
@ -12,16 +12,17 @@
|
||||
"dev": "turbo run dev --parallel",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
|
||||
"lint": "turbo run lint",
|
||||
"lint:fix": "turbo run lint:fix",
|
||||
"test": "turbo run test",
|
||||
"prepare": "husky install",
|
||||
"precommit": "yarn prettier && yarn lint:fix && yarn test"
|
||||
"precommit": "yarn format && yarn lint:fix && yarn test"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"dotenv-cli": "^6.0.0",
|
||||
"eslint-config-custom": "*",
|
||||
"husky": "^8.0.3",
|
||||
"prettier": "latest",
|
||||
"prettier": "^2.8.2",
|
||||
"turbo": "latest"
|
||||
},
|
||||
"packageManager": "yarn@1.22.17",
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
module.exports = {
|
||||
roots: ["<rootDir>"],
|
||||
roots: ['<rootDir>'],
|
||||
transform: {
|
||||
"^.+\\.tsx?$": "ts-jest",
|
||||
'^.+\\.tsx?$': 'ts-jest',
|
||||
},
|
||||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||
modulePathIgnorePatterns: [
|
||||
"<rootDir>/test/__fixtures__",
|
||||
"<rootDir>/node_modules",
|
||||
"<rootDir>/dist",
|
||||
'<rootDir>/test/__fixtures__',
|
||||
'<rootDir>/node_modules',
|
||||
'<rootDir>/dist',
|
||||
],
|
||||
preset: "ts-jest",
|
||||
preset: 'ts-jest',
|
||||
};
|
||||
|
||||
@ -14,6 +14,10 @@
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": []
|
||||
},
|
||||
"lint:fix": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": []
|
||||
},
|
||||
"dev": {
|
||||
"cache": false
|
||||
},
|
||||
|
||||
@ -6518,10 +6518,10 @@ prettier-linter-helpers@^1.0.0:
|
||||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier@latest:
|
||||
version "2.7.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
|
||||
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
|
||||
prettier@^2.8.2:
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160"
|
||||
integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==
|
||||
|
||||
pretty-format@^29.3.1:
|
||||
version "29.3.1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user