Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add no-unused and react/recommended to eslint #1523

Merged
merged 3 commits into from
Nov 27, 2020
Merged

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented Nov 25, 2020

Signed-off-by: Sebastian Malton sebastian@malton.name

@Nokel81 Nokel81 added the chore label Nov 25, 2020
@Nokel81 Nokel81 requested a review from a team November 25, 2020 14:15
@Nokel81 Nokel81 self-assigned this Nov 25, 2020
@Nokel81 Nokel81 force-pushed the eslint-no-unused branch 3 times, most recently from fb39d4b to 4c9c3a3 Compare November 25, 2020 16:07
Copy link
Contributor

@chenhunghan chenhunghan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this helps improve code readability a lot

Two points, please consider change:

  • react.version in .eslintrc.js
  • There is if (bundled) {} added in src/main/kubectl.ts, I am not sure added by mistake or not.

And these extra two, open for discussion I guess:

  • Add https://eslint.org/docs/rules/quotes
  • About sub rules of "unused-imports/no-unused-vars-ts", I personally prefer not to use _, as _ has many different meanings in different programming language. If a variable is not used, I would suggest just remove it, not adding _, so IMHO these two rules can be removed
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",

.eslintrc.js Outdated Show resolved Hide resolved
.eslintrc.js Show resolved Hide resolved
src/common/utils/debouncePromise.ts Outdated Show resolved Hide resolved
src/extensions/extensions-store.ts Show resolved Hide resolved
src/main/__test__/kube-auth-proxy.test.ts Outdated Show resolved Hide resolved
@@ -155,7 +155,7 @@ export abstract class ItemStore<T extends ItemObject = ItemObject> {

async removeSelectedItems?(): Promise<any>;

subscribe(...args: any[]) {
subscribe(..._args: any[]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just remove ...args is fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if someone wants to overload this function? I think a follow up PR making this an optional function would be better.

src/renderer/components/tooltip/tooltip.tsx Outdated Show resolved Hide resolved
src/renderer/components/menu/menu.tsx Outdated Show resolved Hide resolved
src/renderer/components/dock/pod-logs.tsx Outdated Show resolved Hide resolved
added quotes: double, and remove ignore pattern

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Copy link
Contributor

@chenhunghan chenhunghan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nokel81 Nokel81 merged commit 7451869 into master Nov 27, 2020
@Nokel81 Nokel81 deleted the eslint-no-unused branch November 27, 2020 13:48
@jakolehm jakolehm mentioned this pull request Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants