Skip to content

Commit

Permalink
👌🏼 fix comments language and quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
arunachalam-monk committed Sep 6, 2024
1 parent e76d3f7 commit 1e17e79
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 49 deletions.
69 changes: 33 additions & 36 deletions configs/eslint-config-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,59 @@ const ERROR = 2;
module.exports = {
root: true,
extends: [
"@monkvision/eslint-config-base",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
'@monkvision/eslint-config-base',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
settings: {
"import/resolver": {
'import/resolver': {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
"prettier/prettier": ERROR,
"@typescript-eslint/lines-between-class-members": OFF,
"no-useless-constructor": OFF,
"@typescript-eslint/no-empty-function": [
ERROR,
{ allow: ["arrowFunctions"] },
],
"@typescript-eslint/no-empty-interface": OFF,
"@typescript-eslint/no-non-null-assertion": OFF,
"@typescript-eslint/no-unused-vars": [
'prettier/prettier': ERROR,
'@typescript-eslint/lines-between-class-members': OFF,
'no-useless-constructor': OFF,
'@typescript-eslint/no-empty-function': [ERROR, { allow: ['arrowFunctions'] }],
'@typescript-eslint/no-empty-interface': OFF,
'@typescript-eslint/no-non-null-assertion': OFF,
'@typescript-eslint/no-unused-vars': [
ERROR,
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"no-underscore-dangle": OFF,
"@typescript-eslint/naming-convention": [
'no-underscore-dangle': OFF,
'@typescript-eslint/naming-convention': [
ERROR,
{ selector: "interface", format: ["PascalCase"] },
{ selector: "enum", format: ["PascalCase"] },
{ selector: "typeAlias", format: ["PascalCase"] },
{ selector: 'interface', format: ['PascalCase'] },
{ selector: 'enum', format: ['PascalCase'] },
{ selector: 'typeAlias', format: ['PascalCase'] },
],
},
overrides: [
{
files: ["*.{ts,tsx}"],
files: ['*.{ts,tsx}'],
rules: {
"@typescript-eslint/no-shadow": [ERROR],
"no-shadow": OFF,
"no-undef": OFF,
'@typescript-eslint/no-shadow': [ERROR],
'no-shadow': OFF,
'no-undef': OFF,
},
},
{
files: ["test/**/*.{ts,tsx}"],
files: ['test/**/*.{ts,tsx}'],
rules: {
"import/first": OFF,
"import/order": OFF,
"@typescript-eslint/no-empty-function": OFF,
"@typescript-eslint/no-explicit-any": OFF,
"class-methods-use-this": OFF,
'import/first': OFF,
'import/order': OFF,
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-explicit-any': OFF,
'class-methods-use-this': OFF,
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function PhotoCapture({
customComplianceThresholdsPerSight,
useLiveCompliance = false,
allowSkipRetake = false,
addDamage = AddDamage.TWO_SHOT,
addDamage = AddDamage.PART_SELECT,
sightGuidelines,
enableTutorial = PhotoCaptureTutorialOption.FIRST_TIME_ONLY,
allowSkipTutorial = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export function PhotoCaptureHUD({
onCloseTutorial={onCloseTutorial}
allowSkipTutorial={allowSkipTutorial}
sightId={selectedSight.id}
addDamage={addDamage}
sightGuidelines={sightGuidelines}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type PhotoCaptureHUDElementsAddPartSelectShotProps = Pick<
*/
onCancel: PhotoCaptureHUDElementsProps['onCancelAddDamage'];
};

export function PhotoCaptureHUDElementsAddPartSelectShot({
onCancel,
onAddDamageParts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { DisplayText } from './DisplayText';
* Props of the PhotoCaptureHUDTutorial component.
*/
export interface PhotoCaptureHUDTutorialProps
extends Pick<CaptureAppConfig, 'allowSkipTutorial' | 'sightGuidelines'> {
extends Pick<CaptureAppConfig, 'allowSkipTutorial' | 'sightGuidelines' | 'addDamage'> {
/**
* The id of the sight.
*/
Expand Down Expand Up @@ -46,6 +46,7 @@ export function PhotoCaptureHUDTutorial({
sightId,
onNextTutorialStep,
onCloseTutorial,
addDamage,
}: PhotoCaptureHUDTutorialProps) {
const { t } = useTranslation();
const primaryColor = usePhotoCaptureHUDButtonBackground();
Expand All @@ -60,7 +61,7 @@ export function PhotoCaptureHUDTutorial({
sightId={sightId}
sightGuidelines={sightGuidelines}
enableSightGuidelines={currentTutorialStep === TutorialSteps.GUIDELINE}
addDamage={AddDamage.TWO_SHOT}
addDamage={addDamage}
/>
<Button
style={{ ...styles['closeButton'], ...getButtonStyle(allowSkipTutorial) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ export function usePictureTaken({
case PhotoCaptureMode.ADD_DAMAGE_2ND_SHOT:
uploadQueue.push({ mode: addDamageHandle.mode, picture });
break;
case PhotoCaptureMode.SIGHT:
case PhotoCaptureMode.ADD_DAMAGE_PART_SELECT:
uploadQueue.push({
mode: addDamageHandle.mode,
picture,
sightId: sightState.selectedSight.id,
tasks: tasksBySight?.[sightState.selectedSight.id] ?? sightState.selectedSight.tasks,
vehicleParts: addDamageHandle.vehicleParts,
});
break;
case PhotoCaptureMode.ADD_DAMAGE_PART_SELECT:
case PhotoCaptureMode.SIGHT:
uploadQueue.push({
mode: addDamageHandle.mode,
picture,
vehicleParts: addDamageHandle.vehicleParts,
sightId: sightState.selectedSight.id,
tasks: tasksBySight?.[sightState.selectedSight.id] ?? sightState.selectedSight.tasks,
});
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion packages/inspection-capture-web/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"closeupPictureCounter": "2 / 2 • Closeup Picture",
"infoBtn": "Aim the target at the damaged part then tap the shutter button",
"infoCloseup": "Take a closeup picture of the damage",
"selectParts": "Select the parts where you damage is",
"selectParts": "Select the parts where the damage is",
"accept": "Accept",
"cancel": "Cancel"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/inspection-capture-web/src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"damagedPartCounter": "1 / 2 • Pièce endommagée",
"closeupPictureCounter": "2 / 2 • Dégât en gros plan",
"infoBtn": "Placer le viseur sur la pièce endommagée puis enclencher le bouton capture de la photo",
"infoCloseup": "Prendre une photo en gros plan du dégât",
"selectParts": "Sélectionnez les pièces où vous endommagez",
"infoCloseup": "Veuillez prendre une photo en gros plan du dégât",
"selectParts": "Veuillez sélectionner les pièces endommagées",
"accept": "Accepter",
"cancel": "Annuler"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function createProps(): PhotoCaptureHUDTutorialProps {
allowSkipTutorial: false,
sightGuidelines: [],
sightId: 'test-sight-id',
addDamage: AddDamage.TWO_SHOT,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/network/src/api/image/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function getImageLabel(options: AddImageOptions): TranslationObject | undefined
const partsTranslation = options.vehicleParts.map((part) => vehiclePartLabels[part]);
return {
en: `Damage on ${partsTranslation.map((part) => part.en).join(', ')}`,
fr: `Dommages sur ${partsTranslation.map((part) => part.en).join(', ')}`,
fr: `Dégât sur ${partsTranslation.map((part) => part.en).join(', ')}`,
de: `Schaden an ${partsTranslation.map((part) => part.en).join(', ')}`,
nl: `Schade aan ${partsTranslation.map((part) => part.en).join(', ')}`,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export type CaptureAppConfig = CameraConfig &
/**
* Indicating if Add Damage type. If disabled, the `Add Damage` button will be hidden.
*
* @default AddDamage.TWO_SHOT
* @default AddDamage.PART_SELECT
*/
addDamage: AddDamage;
/**
Expand Down

0 comments on commit 1e17e79

Please sign in to comment.