Skip to content

Commit

Permalink
Merge pull request #52 from devtron-labs/vite_exploration
Browse files Browse the repository at this point in the history
feat: Vite integration
  • Loading branch information
vivek-devtron authored Feb 13, 2024
2 parents f0467fd + c445837 commit 6cba110
Show file tree
Hide file tree
Showing 87 changed files with 11,243 additions and 11,288 deletions.
18 changes: 3 additions & 15 deletions .eslintignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.eslintrc.js
.eslintrc.cjs

# Files with ESLint errors/warnings
src/Common/AddCDButton/AddCDButton.tsx
Expand All @@ -9,42 +9,33 @@ src/Common/AppStatus/index.ts
src/Common/AppStatus/utils.ts
src/Common/BreadCrumb/BreadCrumb.tsx
src/Common/BreadCrumb/BreadcrumbStore.tsx
src/Common/BreadCrumb/Types.ts
src/Common/CIPipeline.Types.ts
src/Common/ChartVersionAndTypeSelector.tsx
src/Common/Checkbox.tsx
src/Common/ClipboardButton/ClipboardButton.tsx
src/Common/ClipboardButton/__tests__/ClipboardButton.test.tsx
src/Common/CodeEditor/CodeEditor.tsx
src/Common/Common.service.ts
src/Common/Constants.ts
src/Common/CustomInput/CustomInput.tsx
src/Common/CustomInput/Types.ts
src/Common/CustomInput/index.ts
src/Common/CustomTagSelector/PropagateTagInfo.tsx
src/Common/CustomTagSelector/ResizableTagTextArea.tsx
src/Common/CustomTagSelector/TagDetails.tsx
src/Common/CustomTagSelector/TagLabelSelect.tsx
src/Common/CustomTagSelector/TagLabelValueSelector.tsx
src/Common/CustomTagSelector/TagSelector.utils.ts
src/Common/CustomTagSelector/Types.ts
src/Common/CustomTagSelector/ValidationRules.ts
src/Common/CustomTagSelector/index.ts
src/Common/DebouncedSearch/DebouncedSearch.tsx
src/Common/DebouncedSearch/Utils.ts
src/Common/DebouncedSearch/__tests__/DebouncedSearch.test.tsx
src/Common/DeleteComponentModal/DeleteComponent.tsx
src/Common/DeleteComponentModal/types.ts
src/Common/DevtronProgressing/DevtronProgressing.tsx
src/Common/Dialogs/ConfirmationDialog.tsx
src/Common/Dialogs/DeleteDialog.tsx
src/Common/Dialogs/DialogForm.tsx
src/Common/Dialogs/ForceDeleteDialog.tsx
src/Common/Dialogs/Types.ts
src/Common/Dialogs/index.ts
src/Common/DraggableWrapper/DraggableButton.tsx
src/Common/DraggableWrapper/DraggableWrapper.tsx
src/Common/Drawer/Drawer.tsx
src/Common/EmptyState/EmptyState.tsx
src/Common/EmptyState/GenericEmptyState.tsx
src/Common/Error.tsx
src/Common/ErrorScreenNotFound.tsx
Expand All @@ -53,15 +44,13 @@ src/Common/Helper.tsx
src/Common/Hooks/UseClickOutside/UseClickOutside.tsx
src/Common/Hooks/UseSuperAdmin/UseSuperAdmin.tsx
src/Common/Hooks/UseWindowSize/UseWindowSize.tsx
src/Common/ImageTags.Types.ts
src/Common/ImageTags.tsx
src/Common/InfoColorBar/InfoColourbar.tsx
src/Common/Modals/Modal.tsx
src/Common/Modals/OpaqueModal.tsx
src/Common/Modals/VisibleModal.tsx
src/Common/Modals/VisibleModal2.tsx
src/Common/MultiSelectCustomization.tsx
src/Common/Policy.Types.ts
src/Common/PopupMenu.tsx
src/Common/Progressing.tsx
src/Common/RJSF/Form.tsx
Expand All @@ -87,10 +76,9 @@ src/Common/RadioGroup/RadioGroup.tsx
src/Common/Reload.tsx
src/Common/ResizableTextarea.tsx
src/Common/Security/ScanVulnerabilitiesTable.tsx
src/Common/Select/Select.tsx
src/Common/ServerError.ts
src/Common/TippyCustomized.tsx
src/Common/ToastBody.tsx
src/Common/Toggle/Toggle.tsx
src/Common/Types.ts
src/custom.d.ts
src/index.ts
110 changes: 110 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react', 'prettier'],
env: {
browser: true,
es2021: true,
},
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: ['./tsconfig.json'],
},
globals: {
JSX: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/eslint-recommended',
'airbnb',
'airbnb/hooks',
'prettier',
],
rules: {
'prettier/prettier': ['error'],
'linebreak-style': ['error', 'unix'],
'no-console': 'warn',
'no-var': 'error',
'no-duplicate-imports': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
// Since we are using typescript, we can disable the no-unused-vars rule for enum,etc
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'react/jsx-filename-extension': [
'error',
{
extensions: ['tsx'],
},
],
'react/jsx-props-no-spreading': 'off',
'react/prefer-stateless-function': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'no-underscore-dangle': 'off',
'import/no-extraneous-dependencies': [
'warn',
{
devDependencies: true,
},
],
'no-plusplus': [
'error',
{
allowForLoopAfterthoughts: true,
},
],
// Since we dont use prop-types, we can disable this rule
'react/require-default-props': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/function-component-definition': [
'warn',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
// additional rules:
'@typescript-eslint/no-floating-promises': 'error',
'import/extensions': [
'warn',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'no-undef': 'off',
},
},
],
settings: {
react: {
version: 'detect',
},
'import/resolver': {
node: {
moduleDirectory: ['src', 'node_modules'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
ignorePatterns: [".eslintrc.cjs", "vite.config.ts"],
}
109 changes: 0 additions & 109 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
Expand All @@ -22,8 +22,8 @@ jobs:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com/
Expand All @@ -36,8 +36,8 @@ jobs:
name: Publish to NPM Registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org/'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.0
v20.11.0
File renamed without changes.
Loading

0 comments on commit 6cba110

Please sign in to comment.