Skip to content

Commit 7086cee

Browse files
authored
Merge pull request #192 from RedisInsight/feature/remove_packages
#RIVS-283 - Replace the dependences
2 parents dbf5e07 + bb26354 commit 7086cee

File tree

34 files changed

+680
-5592
lines changed

34 files changed

+680
-5592
lines changed

.eslintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ node_modules
3434
.DS_Store
3535

3636
# App packaged
37-
storybook-static
3837
dist
3938
backend_dist
4039
scripts
@@ -52,7 +51,6 @@ package.json
5251
*.scss.d.ts
5352
yarn.lock
5453
pnpm-lock.yaml
55-
!.storybook
5654

5755
# E2E tests
58-
tests
56+
tests

.eslintrc.js

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ module.exports = {
66
browser: true,
77
},
88
extends: [
9+
'eslint:recommended',
10+
'plugin:react/recommended',
11+
'plugin:react-hooks/recommended',
12+
'airbnb-base',
913
'airbnb-typescript',
10-
'airbnb/hooks',
1114
'plugin:sonarjs/recommended',
12-
'plugin:storybook/recommended',
1315
// TODO: in a separate pull request enable and fix all classes sorting issues for tailwind
1416
// 'plugin:tailwindcss/recommended',
1517
],
@@ -47,21 +49,6 @@ module.exports = {
4749
code: 140,
4850
},
4951
],
50-
'jsx-a11y/label-has-associated-control': [
51-
2,
52-
{
53-
labelComponents: [
54-
'FormLabel',
55-
],
56-
labelAttributes: [
57-
'label',
58-
],
59-
controlComponents: [
60-
'input',
61-
],
62-
depth: 1,
63-
},
64-
],
6552
'class-methods-use-this': 'off',
6653
// https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports
6754
'react-refresh/only-export-components': ['warn'],
@@ -94,6 +81,13 @@ module.exports = {
9481
'object-curly-newline': 'off',
9582
'no-nested-ternary': 'off',
9683
'no-param-reassign': ['error', { props: false }],
84+
'default-param-last': 'off',
85+
'@typescript-eslint/default-param-last': 'off',
86+
'no-unsafe-optional-chaining': 'off',
87+
'function-paren-newline': 'off',
88+
'prefer-regex-literals': 'off',
89+
'react/display-name': 'off',
90+
'no-promise-executor-return': 'off',
9791
'sonarjs/no-duplicate-string': 'off',
9892
'sonarjs/cognitive-complexity': [1, 20],
9993
'sonarjs/no-identical-functions': [0, 5],

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ lerna-debug.log*
1919
coverage
2020
/.nyc_output
2121
**/coverage
22-
storybook-static
2322

2423
# IDEs and editors
2524
/.idea

.storybook/DocsContainer.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

.storybook/helpers.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

.storybook/main.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

.storybook/manager-head.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

.storybook/manager.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

.storybook/preview-head.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

.storybook/preview.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@
4040
"yarn.lock": true,
4141
"**/yarn.lock": true,
4242
"*.{css,sass,scss}.d.ts": true,
43-
"storybook-static": true,
4443
"pnpm-lock.yaml": true,
45-
"**/pnpm-lock.yaml": true,
46-
// "src/webviews/public/customThemes.css": true,
47-
".storybook/preview-head.html": true
44+
"**/pnpm-lock.yaml": true
4845
},
4946
"cSpell.words": ["githubocto", "tailwindcss", "webviews", "zustand"],
5047
"testing.automaticallyOpenPeekView": "never",

.vscodeignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ test-workspace
3636
.circleci
3737
.husky
3838
.idea
39-
.storybook
4039
.github
4140
.vscode
4241
*.local

package.json

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@
145145
"dev:key": "cross-env RI_DATA_ROUTE=main/key vite dev",
146146
"dev:sidebar": "cross-env RI_DATA_ROUTE=sidebar vite dev",
147147
"l10n:collect": "npx @vscode/l10n-dev export -o ./l10n ./src",
148-
"storybook:dev": "storybook dev -p 8081 --no-open",
149-
"storybook:build": "storybook build",
150148
"watch": "tsc -watch -p ./",
151149
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
152150
"lint:fix": "eslint . --fix --ext .js,.jsx,.ts,.tsx",
@@ -168,24 +166,12 @@
168166
"*.{js,jsx,ts,tsx}": "eslint --fix"
169167
},
170168
"devDependencies": {
171-
"@bithero/monaco-editor-vite-plugin": "^1.0.2",
172169
"@githubocto/tailwind-vscode": "^1.0.5",
173-
"@storybook/addon-docs": "^7.6.4",
174-
"@storybook/addon-interactions": "^7.6.4",
175-
"@storybook/addon-links": "^7.6.4",
176-
"@storybook/addon-storyshots": "^7.6.4",
177-
"@storybook/addon-themes": "^7.6.4",
178-
"@storybook/blocks": "^7.6.4",
179-
"@storybook/jest": "^0.2.3",
180-
"@storybook/manager-api": "^7.6.4",
181-
"@storybook/react": "^7.6.4",
182-
"@storybook/react-vite": "^7.6.16",
183-
"@storybook/testing-library": "^0.2.2",
184-
"@storybook/theming": "^7.6.4",
185170
"@tailwindcss/container-queries": "^0.1.1",
186171
"@testing-library/jest-dom": "^6.1.4",
187172
"@testing-library/react": "^14.0.0",
188173
"@types/cors": "^2.8.13",
174+
"@types/detect-port": "^1.3.5",
189175
"@types/file-saver": "^2.0.5",
190176
"@types/is-glob": "^4.0.3",
191177
"@types/json-bigint": "^1.0.4",
@@ -216,19 +202,17 @@
216202
"csv-stringify": "^6.5.1",
217203
"esbuild": "^0.19.5",
218204
"eslint": "^7.32.0",
219-
"eslint-config-airbnb": "^18.2.1",
220-
"eslint-config-airbnb-typescript": "^12.0.0",
205+
"eslint-config-airbnb-base": "^15.0.0",
206+
"eslint-config-airbnb-typescript": "^18.0.0",
221207
"eslint-import-resolver-webpack": "0.13.0",
222208
"eslint-plugin-compat": "^3.8.0",
223209
"eslint-plugin-import": "^2.22.0",
224210
"eslint-plugin-jest": "^25.7.0",
225-
"eslint-plugin-jsx-a11y": "6.4.1",
226211
"eslint-plugin-promise": "^4.2.1",
227-
"eslint-plugin-react": "^7.20.6",
228-
"eslint-plugin-react-hooks": "^4.0.8",
212+
"eslint-plugin-react": "^7.35.0",
213+
"eslint-plugin-react-hooks": "^4.6.2",
229214
"eslint-plugin-react-refresh": "^0.4.4",
230215
"eslint-plugin-sonarjs": "^0.23.0",
231-
"eslint-plugin-storybook": "^0.6.15",
232216
"eslint-plugin-tailwindcss": "^3.15.1",
233217
"googleapis": "^142.0.0",
234218
"html-entities": "^2.3.2",
@@ -239,7 +223,6 @@
239223
"lint-staged": "^15.0.2",
240224
"mkdirp": "^3.0.1",
241225
"msw": "^2.2.13",
242-
"msw-storybook-addon": "2.0.0--canary.122.b3ed3b1.0",
243226
"patch-package": "^8.0.0",
244227
"postcss": "^8.4.31",
245228
"postcss-nested": "^6.0.1",
@@ -249,10 +232,6 @@
249232
"react-refresh": "^0.14.0",
250233
"sass": "^1.69.5",
251234
"source-map-support": "^0.5.21",
252-
"storybook": "^7.6.4",
253-
"storybook-addon-themes": "^6.1.0",
254-
"storybook-addon-variants": "^0.2.0",
255-
"storybook-dark-mode": "^3.0.3",
256235
"supertest": "^6.3.3",
257236
"tailwindcss": "^3.4.3",
258237
"ts-mockito": "^2.6.1",
@@ -276,7 +255,7 @@
276255
"connection-string": "^4.4.0",
277256
"cors": "^2.8.5",
278257
"date-fns": "^2.30.0",
279-
"detect-port": "^1.5.1",
258+
"detect-port": "^1.6.1",
280259
"dotenv": "^16.4.5",
281260
"file-saver": "^2.0.5",
282261
"formik": "^2.4.5",

src/server/bootstrapBackendE2E.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ export async function startBackendE2E(logger: CustomLogger): Promise<any> {
5959
])
6060
} else {
6161
PSinst = cp.spawn(
62-
'node', [path.resolve(backendPath, 'main.js')],
63-
{
62+
'node', [path.resolve(backendPath, 'main.js')], {
6463
env:
6564
{
6665
NODE_ENV: 'production',

src/webviews/public/customThemes.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
2-
#storybook-root {
3-
display: flex;
4-
width: 100%;
5-
height: 100%;
6-
}
71
html,
82
body {
93
height: 100%;

src/webviews/src/components/scan-more/ScanMore.spec.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
import React from 'react'
22
import { instance, mock } from 'ts-mockito'
33
import { screen, fireEvent } from '@testing-library/react'
4-
import { composeStories } from '@storybook/react'
54
import { describe, it, vi } from 'vitest'
65

76
import { render } from 'testSrc/helpers'
87
import { Props, ScanMore } from './ScanMore'
9-
import * as stories from './ScanMore.stories'
108

119
// Every component that is returned maps 1:1 with the stories, but they already contain all decorators from story level, meta level and global level.
12-
const { Default } = composeStories(stories)
13-
14-
const scanMoreBtn = 'scan-more'
1510
const mockedProps = mock<Props>()
1611

1712
describe('ScanMore', () => {
1813
it('should render', () => {
1914
expect(render(<ScanMore {...instance(mockedProps)} />)).toBeTruthy()
2015
})
2116

22-
it('render Default story', () => {
23-
const { queryByTestId } = render(<Default />)
24-
expect(queryByTestId(scanMoreBtn)).toBeInTheDocument()
25-
})
26-
2717
it('should call "loadMoreItems"', () => {
2818
const handleClick = vi.fn()
2919

src/webviews/src/components/scan-more/ScanMore.stories.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)