-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
lint & fix #1808
Open
riccardobl
wants to merge
12
commits into
stackernews:master
Choose a base branch
from
riccardobl:eslint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
lint & fix #1808
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
eaccc4f
unused import
riccardobl 95867aa
invalid prop
riccardobl 7ff5480
disable sonarjs/no-identical-functions
riccardobl e3c6eab
avoid potential global shadowing
riccardobl 1468363
remove useless default assignments
riccardobl a01ba07
remove useless assignment
riccardobl 2f5cae4
remove dead code
riccardobl 97ea15b
make invalid prop valid
riccardobl 90297c5
refactor try catch
riccardobl ae9d7a7
remove eslint-disable
riccardobl 5a4d50a
eslint
riccardobl 6dca1d0
Merge branch 'master' into eslint
riccardobl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ export default function HiddenWalletSummary ({ abbreviate, fixedWidth }) { | |
|
||
return ( | ||
<span | ||
className='text-monospace' style={{ whiteSpace: 'pre-wrap' }} align='right' onPointerEnter={() => setHover(true)} onPointerLeave={() => setHover(false)} | ||
className='text-monospace' style={{ whiteSpace: 'pre-wrap', textAlign: 'right' }} onPointerEnter={() => setHover(true)} onPointerLeave={() => setHover(false)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is probably how it was intended, but this entire file looks like it is not being used anymore |
||
> | ||
{hover ? (abbreviate ? fixedWidthAbbrSats : numWithUnits(me.privates?.sats, { abbreviate: false, format: true })) : '******'} | ||
</span> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,8 +56,8 @@ export default function Invoice ({ | |
return <QrSkeleton {...props} /> | ||
} | ||
|
||
let variant = 'default' | ||
let status = 'waiting for you' | ||
let variant | ||
let status | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. other defaults are set in the else block |
||
let sats = invoice.satsRequested | ||
if (invoice.forwardedSats) { | ||
if (invoice.actionType === 'RECEIVE') { | ||
|
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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import globals from 'globals' | ||
import pluginJs from '@eslint/js' | ||
import pluginReact from 'eslint-plugin-react' | ||
import sonarjs from 'eslint-plugin-sonarjs' | ||
import pluginPromise from 'eslint-plugin-promise' | ||
|
||
export default [ | ||
{ | ||
files: ['**/*.{js,mjs,cjs,jsx}'] | ||
}, | ||
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } }, | ||
pluginJs.configs.recommended, | ||
pluginReact.configs.flat.recommended, | ||
sonarjs.configs.recommended, | ||
pluginPromise.configs['flat/recommended'], | ||
{ | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'no-console': 'off', | ||
eqeqeq: 'error', | ||
'react/prop-types': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'no-empty': 'off', | ||
'react/no-unescaped-entities': 'off', | ||
'react/display-name': 'off', | ||
'sonarjs/cognitive-complexity': 'off', | ||
'sonarjs/no-ignored-exceptions': 'off', | ||
'sonarjs/todo-tag': 'warn', | ||
'sonarjs/no-nested-conditional': 'off', | ||
'sonarjs/no-nested-template-literals': 'off', | ||
'sonarjs/no-small-switch': 'off', | ||
'sonarjs/regex-complexity': 'off', | ||
'sonarjs/no-clear-text-protocols': 'off', | ||
'sonarjs/x-powered-by': 'off', | ||
'sonarjs/no-inverted-boolean-check': 'off', | ||
'sonarjs/pseudo-random': 'warn', | ||
'sonarjs/public-static-readonly': 'off', | ||
'sonarjs/table-header': 'off', | ||
'sonarjs/no-invariant-returns': 'off', | ||
'sonarjs/no-os-command-from-path': 'off', | ||
'sonarjs/concise-regex': 'off', | ||
'sonarjs/duplicates-in-character-class': 'off', | ||
'sonarjs/updated-loop-counter': 'off', | ||
'sonarjs/no-nested-functions': 'off', | ||
'sonarjs/single-character-alternation': 'off', | ||
'sonarjs/no-nested-assignment': 'off', | ||
'sonarjs/no-redundant-assignments': 'off', | ||
'sonarjs/single-char-in-character-classes': 'off', | ||
'sonarjs/slow-regex': 'off', | ||
'sonarjs/anchor-precedence': 'off', | ||
'promise/always-return': 'off', | ||
'promise/no-nesting': 'off', | ||
'promise/catch-or-return': 'off', | ||
'sonarjs/no-identical-functions': 'warn' | ||
} | ||
}, | ||
{ | ||
ignores: ['.next/*', '**/*.spec.js', 'node_modules/*', 'sw/**', 'public'] | ||
}, | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'off' | ||
} | ||
} | ||
|
||
] |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
dead code?