1
0
mirror of https://github.com/lensapp/lens.git synced 2024-09-20 22:07:31 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Alex Andreev
76d3a4b180
Adding eslint-plugin-react-hooks (#2811) 2021-05-20 12:01:01 -04:00
Jari Kolehmainen
f8b939bf59
Check license header using eslint (#2780)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-05-17 09:43:53 -04:00
Sebastian Malton
9563ead2e6
Fixing Singleton typing to correctly return child class (#1914)
- Add distinction between `getInstance` and `getInstanceOrCreate` since
  it is not always possible to create an instance (since you might not
  know the correct arguments)

- Remove all the `export const *Store = *Store.getInstance<*Store>();`
  calls as it defeats the purpose of `Singleton`. Plus with the typing
  changes the appropriate `*Store.getInstance()` is "short enough".

- Special case the two extension export facades to not need to use
  `getInstanceOrCreate`. Plus since they are just facades it is always
  possible to create them.

- Move some other types to be also `Singleton`'s: ExtensionLoader,
  ExtensionDiscovery, ThemeStore, LocalizationStore, ...

- Fixed dev-run always using the same port with electron inspect

- Update Store documentation with new recommendations about creating
  instances of singletons

- Fix all unit tests to create their dependent singletons

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-04-21 09:59:59 -04:00
Sebastian Malton
2e2283bcc9
enfore unix line endings and always ending files with line endings (#1997)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-01-21 08:09:41 -05:00
Sebastian Malton
f3f9f08c0a
lint whole repo (#1600)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-12-02 17:22:10 +08:00
Panu Horsmalahti
dcf253e7d5
Add eslint rule padding-line-between-statements (#1593)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-12-02 09:55:52 +02:00
Panu Horsmalahti
335778aeef
Enforce template strings in eslint (#1574)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-30 15:35:16 +02:00
Sebastian Malton
7451869c25
add no-unused and react/recommended to eslint (#1523)
* add no-unused-vars and no-unused-imports

* added quotes: double, and remove ignore pattern

* move itif and describeif into utils

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-11-27 08:48:38 -05:00
Panu Horsmalahti
ff93760dc4
Enable object-shorthand rule (#1500)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-24 13:16:35 +02:00
Sebastian Malton
daade3b899
add extensions to lint & lint:fix (#1490)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-11-23 12:55:00 -05:00
Sebastian Malton
43976f5bd9
fix SwitchCase indent rule in eslint (#1454)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-11-19 15:15:49 -05:00
Panu Horsmalahti
460dfe4d2b Use @typescript-eslint/semi.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-19 18:12:52 +02:00
Panu Horsmalahti
1477bb8274 Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-19 16:35:04 +02:00
Jari Kolehmainen
596e60a6f3
Generate extension-api .d.ts and .js files using tsc (#1387)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-11-16 15:09:16 +02:00
chh
484de2ec21
Add +/- buttons in scale deployment popup screen (#1191)
* Add @testing-library/jest-dom and @testing-library/react for writing test cases

* Make eslint check __mocks__/*.ts files

* Mock electron.ipcRenderer.on to prevent errors in React compoment test cases

* Mock <Trans /> from @lingui/macro as a component simplely returns children components

* Use optional chaining operator (?.) to avoid TypeError: Cannot read property 'replicas' of undefined

* Add jest-fetch-mock for mocking global.fetch, activate for all test cases in jest.setup.ts

* Add basic tests for <DeploymentScaleDialog /> to ensure it initialises/renders without errors

* Add +/- button for changing desired replicas, and its test cases

* Adjust the styles of +/- buttons container to make sure it aligns with the slider

* Refactor after rebase from master

* Use var defined in vars.scss

* Add flex align-center to slider-container and remove margin-top: -4px

* Use <Icon /> to replace <i/>

* Add flex gaps to plus-minus-container

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
2020-11-03 20:30:36 +08:00
Lauri Nevala
1f41cc800b
Add extensions/api.d.ts to .eslintignore (#1157)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-10-27 17:08:08 +02:00
Jari Kolehmainen
99db7aca19
Allow extensions to register kube-object menus + details (#1108)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-10-22 21:41:20 +03:00
Jari Kolehmainen
c566c85351
Move tracker to telemetry extension (#1092)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-10-19 11:56:08 +03:00
Roman
5daf53e6cb
Extensions-api: initial hello-world example (#817)
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
2020-09-09 16:19:02 +03:00
Roman
5670312c47
Migrating Vue components to React and stores refactoring (#585)
Signed-off-by: Roman <ixrock@gmail.com>

Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
2020-08-20 08:53:07 +03:00
Roman
b7974827d2
Lens restructure (#540)
Signed-off-by: Roman <ixrock@gmail.com>
2020-06-30 14:35:16 +03:00
Jari Kolehmainen
c91f608346
Lint dashboard app automatically (#529)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-06-26 12:05:41 +03:00
Jari Kolehmainen
f23da9ccad
Bundle helm3 binary (#220)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-04-06 18:18:18 +03:00
Jari Kolehmainen
1d0815abd2
Lens app source code (#119)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-03-15 09:52:02 +02:00