1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Tools: Enforce and apply eslint rules prefer-const and no-var

This commit is contained in:
Laurent Cozic
2020-03-13 23:46:14 +00:00
parent 92bee549a1
commit d0d2bad7f4
189 changed files with 1387 additions and 1377 deletions

View File

@ -36,7 +36,7 @@ class ScreenHeaderComponent extends React.PureComponent {
const theme = themeStyle(themeId);
let styleObject = {
const styleObject = {
container: {
flexDirection: 'column',
backgroundColor: theme.raisedBackgroundColor,
@ -299,11 +299,11 @@ class ScreenHeaderComponent extends React.PureComponent {
}
let key = 0;
let menuOptionComponents = [];
const menuOptionComponents = [];
if (!this.props.noteSelectionEnabled) {
for (let i = 0; i < this.props.menuOptions.length; i++) {
let o = this.props.menuOptions[i];
const o = this.props.menuOptions[i];
if (o.isDivider) {
menuOptionComponents.push(<View key={`menuOption_${key++}`} style={this.styles().divider} />);
@ -408,7 +408,7 @@ class ScreenHeaderComponent extends React.PureComponent {
/>
);
} else {
let title = 'title' in this.props && this.props.title !== null ? this.props.title : '';
const title = 'title' in this.props && this.props.title !== null ? this.props.title : '';
return <Text style={this.styles().titleText}>{title}</Text>;
}
};