-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fix linter warning #480
Fix linter warning #480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our philosophy on linters is that it should mostly be flagging things that are unambiguously bugs or patterns that lead to bugs.
Also, can we turn all warnings into errors so CI catches this in the future?
pnpm-lock.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the diff is massive due to this. can you revert? do you know if there's some way to not update this on pnpm install
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#483 should fix this
src/actions/files.js
Outdated
|
||
const FILE_NAMES = { | ||
qcameras: 'qcamera.ts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a large part of the diff, what's the rationale behind it? maybe we should just ignore it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the stylistic changes are from vscode auto-formatting the code, I'm going to revert these changes.
Is the PR good enough, there is no need to submit a new one ? I should probably work on something else ? |
Redid this PR keeping this in mind: "Our philosophy on linters is that it should mostly be flagging things that are unambiguously bugs or patterns that lead to bugs":
(I also ignored "class-methods-use-this" and "no-nested-ternary" since those patterns show up a lot in the codebase and don't seem like they match the philosophy. I can change those to warnings or refactor the relevant code if needed.) |
@@ -25,7 +25,7 @@ export default function reducer(_state, action) { | |||
let state = { ..._state }; | |||
let deviceIndex = null; | |||
switch (action.type) { | |||
case Types.ACTION_STARTUP_DATA: | |||
case Types.ACTION_STARTUP_DATA: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do these have brackets and the other cases don't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing this warning "Unexpected lexical declaration in case block" it was only for the blocks that had variables within case scope. Should I just ignore that warning or put brackets on the other cases as well?
Fixed all 43 linter warnings.
Fixes #478