Skip to content

Commit 535b73e

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into feature/application-template
2 parents 8f27b8f + 7e0e787 commit 535b73e

File tree

294 files changed

+13141
-5054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+13141
-5054
lines changed

.eslintignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.eslintrc.cjs
2+
scripts/*.cjs
23

34
# Files with ESLint errors/warnings
45
src/Common/AddCDButton/AddCDButton.tsx
@@ -13,19 +14,16 @@ src/Common/Checkbox.tsx
1314
src/Common/ClipboardButton/__tests__/ClipboardButton.test.tsx
1415
src/Common/CodeEditor/CodeEditor.tsx
1516
src/Common/Common.service.ts
16-
src/Common/CustomInput/CustomInput.tsx
1717
src/Common/CustomTagSelector/PropagateTagInfo.tsx
1818
src/Common/CustomTagSelector/TagDetails.tsx
1919
src/Common/CustomTagSelector/TagLabelValueSelector.tsx
2020
src/Common/CustomTagSelector/ValidationRules.ts
2121
src/Common/DebouncedSearch/DebouncedSearch.tsx
2222
src/Common/DebouncedSearch/Utils.ts
2323
src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx
24-
src/Common/DeleteComponentModal/DeleteComponent.tsx
2524
src/Common/DevtronProgressing/DevtronProgressing.tsx
2625
src/Common/Dialogs/ConfirmationDialog.tsx
2726
src/Common/Dialogs/DialogForm.tsx
28-
src/Common/Dialogs/ForceDeleteDialog.tsx
2927
src/Common/DraggableWrapper/DraggableButton.tsx
3028
src/Common/DraggableWrapper/DraggableWrapper.tsx
3129
src/Common/Drawer/Drawer.tsx
@@ -42,7 +40,6 @@ src/Common/Modals/VisibleModal2.tsx
4240
src/Common/MultiSelectCustomization.tsx
4341
src/Common/PopupMenu.tsx
4442
src/Common/Progressing.tsx
45-
src/Common/RJSF/Form.tsx
4643
src/Common/RJSF/config.ts
4744
src/Common/RJSF/templates/ArrayFieldTemplate.tsx
4845
src/Common/RJSF/templates/BaseInput.tsx

.eslintrc.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ module.exports = {
122122
{
123123
name: 'react-toastify',
124124
message: 'Please use "ToastManager.showToast" instead.',
125-
}
125+
},
126+
],
127+
patterns: [
128+
{
129+
group: ['IconBase'],
130+
message: 'Please use "Icon" component instead.',
131+
},
126132
],
127133
},
128134
],

.husky/pre-commit

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,35 @@
1717

1818
. "$(dirname "$0")/_/husky.sh"
1919

20-
npx tsc --noEmit
21-
npm run lint-staged
20+
echo "Running pre-commit hook..."
21+
22+
# Check for changes in the Icon folder
23+
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E 'IconV2/|generate-icon.cjs' || true)
24+
25+
if [ -n "$CHANGED_FILES" ]; then
26+
echo "Changes detected in the Icon folder or icon generation script. Running icon generation script..."
27+
28+
if ! npm run generate-icon; then
29+
echo "Error: Icon generation script failed."
30+
exit 1
31+
fi
32+
33+
echo "Icon.tsx updated. Adding to commit."
34+
git add src/Shared/Components/Icon/Icon.tsx
35+
else
36+
echo "No changes in the IconsV2 folder. Skipping icon generation."
37+
fi
38+
39+
# TypeScript check
40+
if ! npx tsc --noEmit; then
41+
echo "Error: TypeScript check failed."
42+
exit 1
43+
fi
44+
45+
# Lint-staged
46+
if ! npm run lint-staged; then
47+
echo "Error: Lint-staged failed."
48+
exit 1
49+
fi
50+
51+
echo "Pre-commit hook completed successfully."

0 commit comments

Comments
 (0)