-
Notifications
You must be signed in to change notification settings - Fork 150
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
Linting fixes #1470
Merged
Merged
Linting fixes #1470
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Mar 1, 2023
Merged
goosewobbler
force-pushed
the
linting-main-fixes
branch
from
March 1, 2023 21:19
c9d817c
to
52d751e
Compare
mholtzman
reviewed
Mar 11, 2023
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.
looks good, just a couple comments. also I'm getting some TS compilation errors on this branch, do I need to change anything?
@mholtzman did you do a |
…into linting-main-fixes
mholtzman
approved these changes
Mar 16, 2023
mholtzman
pushed a commit
that referenced
this pull request
Mar 21, 2023
Co-authored-by: goosewobbler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addressing all low-hanging fruit linting issues - config in #1337
Note we are not addressing warnings at the moment - there are a lot of
any
types which we absolutely should replace as our use of TS in Frame expands and improves, but addressing this now requires a fair bit of work and also high levels of risk due to the amount of refactoring involved.Remaining issues to address before we can enforce linting, we can do this here or with follow-up PR(s):
react-hooks/rules-of-hooks
- React Hook "useCountdown" is called conditionally. React Hooks must be called in the exact same order in every component renderframe/resources/Components/Countdown/index.js
Line 4 in 52d751e
@typescript-eslint/ban-types
- Don't use{}
as a type.{}
actually means "any non-nullish value".frame/main/transaction/actions/index.ts
Line 11 in 52d751e
frame/main/externalData/coingecko/index.ts
Line 25 in 52d751e
@typescript-eslint/ban-types
- Don't useFunction
as a type. TheFunction
type accepts any function-like value.frame/main/externalData/balances/index.ts
Line 44 in 52d751e
@typescript-eslint/ban-ts-comment
- Do not use "@ts-ignore" because it alters compilation errorsframe/main/nebula/index.ts
Line 5 in 52d751e
frame/main/nebula/index.ts
Line 10 in 52d751e
no-async-promise-executor
- Promise executor functions should not be asyncframe/main/externalData/inventory/tokens.ts
Line 48 in 52d751e
@typescript-eslint/no-empty-function
- Unexpected empty method '_read' -frame/main/dapps/index.ts
Line 27 in 52d751e
no-undef
:frame/hardhat.config.js
Line 5 in 52d751e
frame/app/tray/Footer/index.js
Line 113 in 52d751e
frame/app/tray/Footer/index.js
Line 113 in 52d751e
frame/app/tray/Account/Requests/SignatureRequest/index.js
Line 8 in 52d751e
frame/app/dash/Main/index.js
Line 25 in 52d751e
react/no-find-dom-node
- Do not use findDOMNode. It doesn’t work with function components and is deprecated in StrictMode. See https://reactjs.org/docs/react-dom.html#finddomnodeframe/app/tray/AccountSelector/index.js
Line 32 in 52d751e
frame/app/tray/Account/index.js
Line 18 in 52d751e
no-empty
- Empty block statementframe/app/dash/Chains/Chain/ChainNew/index.js
Line 37 in 52d751e
react/no-direct-mutation-state
- Do not mutate state directly. Use setState()frame/app/tray/Account/Requests/TransactionRequest/AdjustFee/index.js
Line 271 in 52d751e
frame/app/dash/Accounts/Add/AddHardwareLattice/index.js
Line 70 in 52d751e