diff --git a/.eslintignore b/.eslintignore
index a8603104af..ed12b5b637 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1 +1,2 @@
node_modules/**
+cypress-tests/**
\ No newline at end of file
diff --git a/frontend/src/Editor/Viewer/ViewerNavigation.jsx b/frontend/src/Editor/Viewer/ViewerNavigation.jsx
index da17ac2f06..6c07fded0c 100644
--- a/frontend/src/Editor/Viewer/ViewerNavigation.jsx
+++ b/frontend/src/Editor/Viewer/ViewerNavigation.jsx
@@ -31,7 +31,9 @@ export const ViewerNavigation = ({ isMobileDevice, pages, currentPageId, switchP
>
- {_.truncate(page.name, { length: 18 })}
+
+ {_.truncate(page.name, { length: 18 })}
+
diff --git a/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx b/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx
index 8381244010..85fdb4c0c5 100644
--- a/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx
+++ b/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx
@@ -54,7 +54,7 @@ export const GlobalDataSourcesPage = ({ darkMode }) => {
}
};
- const environmentChanged = (env, dataSourceId) => {
+ const environmentChanged = (env) => {
setCurrentEnvironment(env);
};
diff --git a/frontend/src/ManageGroupPermissions/ManageGroupPermissions.jsx b/frontend/src/ManageGroupPermissions/ManageGroupPermissions.jsx
index beb832064b..a3cf9c2049 100644
--- a/frontend/src/ManageGroupPermissions/ManageGroupPermissions.jsx
+++ b/frontend/src/ManageGroupPermissions/ManageGroupPermissions.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { authenticationService, groupPermissionService } from '@/_services';
+import { groupPermissionService } from '@/_services';
import { ConfirmDialog } from '@/_components';
import { toast } from 'react-hot-toast';
import { Link } from 'react-router-dom';
diff --git a/frontend/src/MarketplacePage/index.jsx b/frontend/src/MarketplacePage/index.jsx
index 3505f202aa..510f177dd4 100644
--- a/frontend/src/MarketplacePage/index.jsx
+++ b/frontend/src/MarketplacePage/index.jsx
@@ -6,6 +6,7 @@ import { MarketplacePlugins } from './MarketplacePlugins';
import { marketplaceService, pluginsService, authenticationService } from '@/_services';
import { toast } from 'react-hot-toast';
import { useNavigate } from 'react-router-dom';
+import config from 'config';
const MarketplacePage = ({ darkMode, switchDarkMode }) => {
const [active, setActive] = React.useState('installed');
@@ -14,7 +15,7 @@ const MarketplacePage = ({ darkMode, switchDarkMode }) => {
const [fetchingInstalledPlugins, setFetching] = React.useState(false);
const { admin } = authenticationService.currentSessionValue;
- const ENABLE_MARKETPLACE_DEV_MODE = window.public_config?.ENABLE_MARKETPLACE_DEV_MODE == 'true';
+ const ENABLE_MARKETPLACE_DEV_MODE = config.ENABLE_MARKETPLACE_DEV_MODE == 'true';
const navigate = useNavigate();
diff --git a/frontend/src/SettingsPage/SettingsPage.jsx b/frontend/src/SettingsPage/SettingsPage.jsx
index 5beef8a181..d880d88e36 100644
--- a/frontend/src/SettingsPage/SettingsPage.jsx
+++ b/frontend/src/SettingsPage/SettingsPage.jsx
@@ -6,8 +6,8 @@ import Layout from '@/_ui/Layout';
function SettingsPage(props) {
const currentSession = authenticationService.currentSessionValue;
+ const email = currentSession?.current_user.email;
const [firstName, setFirstName] = React.useState(currentSession?.current_user.first_name);
- const [email, setEmail] = React.useState(currentSession?.current_user.email);
const [lastName, setLastName] = React.useState(currentSession?.current_user.last_name);
const [currentpassword, setCurrentPassword] = React.useState('');
const [newPassword, setNewPassword] = React.useState('');
diff --git a/frontend/src/_components/OrganizationManager/EditOrganization.jsx b/frontend/src/_components/OrganizationManager/EditOrganization.jsx
index f916bc27e0..f50c36e529 100644
--- a/frontend/src/_components/OrganizationManager/EditOrganization.jsx
+++ b/frontend/src/_components/OrganizationManager/EditOrganization.jsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import { authenticationService, organizationService } from '@/_services';
+import { organizationService } from '@/_services';
import AlertDialog from '@/_ui/AlertDialog';
import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
diff --git a/marketplace/.eslintrc b/marketplace/.eslintrc
new file mode 100644
index 0000000000..fd27db3742
--- /dev/null
+++ b/marketplace/.eslintrc
@@ -0,0 +1,46 @@
+{
+ "env": {
+ "node": true,
+ "jest": true
+ },
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
+ "ignorePatterns": [".eslintrc"],
+ "parser": "@typescript-eslint/parser",
+ "overrides": [
+ {
+ "files": ["*.ts"],
+ "parserOptions": {
+ "project": ["./tsconfig.json"],
+ "tsconfigRootDir": "."
+ }
+ }
+ ],
+ "plugins": ["@typescript-eslint", "jest", "prettier"],
+ "rules": {
+ "prettier/prettier": [
+ "error",
+ {
+ "semi": true,
+ "trailingComma": "es5",
+ "printWidth": 120,
+ "singleQuote": true
+ }
+ ],
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "none" }],
+ "@typescript-eslint/no-var-requires": "off",
+ "@typescript-eslint/no-empty-function": 0,
+ "@typescript-eslint/ban-types": [
+ "error",
+ {
+ "types": {
+ "object": false
+ },
+ "extendDefaults": true
+ }
+ ]
+ }
+}
diff --git a/marketplace/.eslintrc.js b/marketplace/.eslintrc.js
deleted file mode 100644
index 947e9e34dc..0000000000
--- a/marketplace/.eslintrc.js
+++ /dev/null
@@ -1,56 +0,0 @@
-module.exports = {
- env: {
- node: true,
- jest: true,
- },
- extends: [
- 'eslint:recommended',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:prettier/recommended',
- ],
- ignorePatterns: ['.eslintrc.js'],
- parser: '@typescript-eslint/parser',
- parserOptions: {
- ecmaVersion: 12,
- sourceType: 'module',
- project: ['./tsconfig.json'],
- },
- overrides: [
- {
- files: ['*.ts'],
- parserOptions: {
- project: ['./tsconfig.json'],
- tsconfigRootDir: __dirname,
- },
- },
- ],
- plugins: ['@typescript-eslint', 'jest', 'prettier'],
- rules: {
- 'prettier/prettier': [
- 'error',
- {
- semi: true,
- trailingComma: 'es5',
- printWidth: 120,
- singleQuote: true,
- },
- ],
- '@typescript-eslint/no-floating-promises': ['error'],
- '@typescript-eslint/interface-name-prefix': 'off',
- '@typescript-eslint/explicit-function-return-type': 'off',
- '@typescript-eslint/explicit-module-boundary-types': 'off',
- '@typescript-eslint/no-explicit-any': 'off',
- '@typescript-eslint/no-unused-vars': ['error', { vars: 'all', args: 'none' }],
- '@typescript-eslint/no-var-requires': 'off',
- '@typescript-eslint/no-empty-function': 0,
- '@typescript-eslint/ban-types': [
- 'error',
- {
- types: {
- object: false,
- },
- extendDefaults: true,
- },
- ],
- },
-};
diff --git a/marketplace/.gitignore b/marketplace/.gitignore
index 754237f0a1..0f9d9cc1e8 100644
--- a/marketplace/.gitignore
+++ b/marketplace/.gitignore
@@ -14,6 +14,4 @@ dist
*.tsbuildinfo
*.tabl.json
*.swp
-*.snk
-client.js
-server.ts
\ No newline at end of file
+*.snk
\ No newline at end of file
diff --git a/marketplace/plugins/github/lib/index.ts b/marketplace/plugins/github/lib/index.ts
index efe163588a..1257b85fe9 100644
--- a/marketplace/plugins/github/lib/index.ts
+++ b/marketplace/plugins/github/lib/index.ts
@@ -1,14 +1,12 @@
import { QueryError, QueryResult, QueryService, ConnectionTestResult } from '@tooljet-marketplace/common';
import { SourceOptions, QueryOptions, Operation } from './types';
-import { Octokit } from 'octokit'
-import { getUserInfo, getRepo, getRepoIssues, getRepoPullRequests} from './query_operations'
+import { Octokit } from 'octokit';
+import { getUserInfo, getRepo, getRepoIssues, getRepoPullRequests } from './query_operations';
export default class Github implements QueryService {
-
-
async run(sourceOptions: SourceOptions, queryOptions: QueryOptions, dataSourceId: string): Promise {
const operation: Operation = queryOptions.operation;
- const octokit:Octokit = await this.getConnection(sourceOptions);
+ const octokit: Octokit = await this.getConnection(sourceOptions);
let result = {};
try {
@@ -16,11 +14,11 @@ export default class Github implements QueryService {
case Operation.GetUserInfo:
result = await getUserInfo(octokit, queryOptions);
break;
-
+
case Operation.GetRepo:
result = await getRepo(octokit, queryOptions);
break;
-
+
case Operation.GetRepoIssues:
result = await getRepoIssues(octokit, queryOptions);
break;
@@ -29,14 +27,13 @@ export default class Github implements QueryService {
result = await getRepoPullRequests(octokit, queryOptions);
break;
- default:
+ default:
throw new QueryError('Query could not be completed', 'Invalid operation', {});
}
} catch (error) {
throw new QueryError('Query could not be completed', error.message, {});
}
-
-
+
return {
status: 'ok',
data: result,
@@ -47,18 +44,16 @@ export default class Github implements QueryService {
const octokit = await this.getConnection(sourceOptions);
try {
- const { status } = await octokit.rest.users.getAuthenticated();
- if(status) {
+ const { status } = await octokit.rest.users.getAuthenticated();
+ if (status) {
return {
status: 'ok',
- }
+ };
}
-
-
} catch (error) {
return {
status: 'failed',
- message: 'Invalid credentials'
+ message: 'Invalid credentials',
};
}
}
diff --git a/marketplace/plugins/github/lib/query_operations.ts b/marketplace/plugins/github/lib/query_operations.ts
index a9265738f3..d0d7e06511 100644
--- a/marketplace/plugins/github/lib/query_operations.ts
+++ b/marketplace/plugins/github/lib/query_operations.ts
@@ -1,49 +1,35 @@
-import { Octokit } from 'octokit'
-import { QueryOptions } from './types'
-
+import { Octokit } from 'octokit';
+import { QueryOptions } from './types';
export async function getUserInfo(octokit: Octokit, options: QueryOptions): Promise