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

Chore: lint: eliminate eslint warnings #652

Merged
merged 5 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"no-multi-assign": 0,
"no-unneeded-ternary": ["error", { "defaultAssignment": true }],
"prefer-template": 0,
"no-unused-vars": 1,
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"no-trailing-spaces": 1,
"padded-blocks": 0,
"no-undef": 1,
Expand Down
5 changes: 3 additions & 2 deletions app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ class App extends Component<{
const themeVars = Object.assign(
stores.profile.currentThemeVars,
{
// show wingdings on dev builds when no font is set to easily find missing font bugs
// however, on production, we use Times New Roman which looks ugly but at least it's readable.
// show wingdings on dev builds when no font is set to easily find
// missing font bugshowever, on production, we use Times New Roman
// which looks ugly but at least it's readable.
'--default-font': environment.isDev() ? 'wingdings' : 'Times New Roman',
}
);
Expand Down
2 changes: 1 addition & 1 deletion app/api/ada/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ export default class AdaApi {
}

async getSelectedExplorer(
request: GetSelectedExplorerRequest
_request: GetSelectedExplorerRequest
): Promise<GetSelectedExplorerResponse> {
Logger.debug('AdaApi::getSelectedExplorer called');
try {
Expand Down
4 changes: 0 additions & 4 deletions app/components/settings/SettingsLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ type Props = {|

@observer
export default class SettingsLayout extends Component<Props> {
static defaultProps = {
children: undefined
};

render() {
const { menu, children } = this.props;
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import styles from './ThemeSettingsBlock.scss';
import { THEMES } from '../../../../themes';
import type { Theme } from '../../../../themes';
import ThemeThumbnail from '../display/ThemeThumbnail';
import environment from '../../../../environment';

const messages = defineMessages({
themeLabel: {
Expand Down
1 change: 0 additions & 1 deletion app/components/wallet/hwConnect/trezor/HelpLinkBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { defineMessages, intlShape } from 'react-intl';
import SvgInline from 'react-svg-inline';

import externalLinkSVG from '../../../../assets/images/link-external.inline.svg';
import { ProgressInfo } from '../../../../types/HWConnectStoreTypes';
import styles from '../common/HelpLinkBlock.scss';

const messages = defineMessages({
Expand Down
2 changes: 1 addition & 1 deletion app/containers/LoadingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class LoadingPage extends Component<InjectedProps> {
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a
href="#"
onClick={event => downloadLogs()}
onClick={_event => downloadLogs()}
>
{intl.formatMessage(globalMessages.downloadLogsLink)}
</a>
Expand Down
2 changes: 1 addition & 1 deletion app/containers/settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class Settings extends Component<InjectedContainerProps> {
classicTheme={profile.isClassicTheme}
>
<SettingsLayout menu={menu}>
{children}
{children || null /* the "|| null" part keeps flow happy */}
</SettingsLayout>
</Layout>
);
Expand Down
2 changes: 1 addition & 1 deletion app/themes/prebuilt/YoroiClassic.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default {
'--theme-system-error-overlay-text-color': '#fafbfc',

'--theme-topbar-active-item-bottom-border': '5px solid #daa49a',
'--theme-topbar-active-item-top-border': '5px solid transparent',
'--theme-topbar-active-item-top-border': '5px solid transparent',
'--theme-topbar-category-text-color': '#fafbfc',
'--theme-topbar-background-color-gradient-start': topbarGradient.start,
'--theme-topbar-background-color-gradient-end': topbarGradient.end,
Expand Down
2 changes: 1 addition & 1 deletion app/themes/prebuilt/YoroiModern.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export default {
'--theme-wallet-add-option-dialog-item-title-color': '#2B2C32',
'--theme-wallet-add-option-dialog-item-learn-more-block-bg-color': '#F5F7F9',
'--theme-wallet-add-option-dialog-item-learn-more-button-color': '#ADAEB6',
'--theme-wallet-add-option-dialog-item-learn-more-button-bg-color': '#F5F7F9',
'--theme-wallet-add-option-dialog-item-learn-more-button-bg-color': '#F5F7F9',
'--theme-wallet-add-translucent-color': 'rgba(255, 255, 255, 0.5)',
'--theme-wallet-add-footer-text-color': '#353535',

Expand Down