diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 11:10:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 11:10:36 +0900 |
commit | b1a6f374dca078dee2406ebe049715b826e37ca2 (patch) | |
tree | 5367c48648e2018f55f12d847baba94559e10040 /src/settings/components/index.tsx | |
parent | b2dcdedad729ff7087867da50e20578f9fc8fb29 (diff) | |
parent | da72c2ddd916d79d134662e3985b53a4ac78af7a (diff) |
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'src/settings/components/index.tsx')
-rw-r--r-- | src/settings/components/index.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/settings/components/index.tsx b/src/settings/components/index.tsx index 3eb2dbe..f4f0326 100644 --- a/src/settings/components/index.tsx +++ b/src/settings/components/index.tsx @@ -96,7 +96,7 @@ class SettingsComponent extends React.Component<Props> { render() { let fields = null; - let disabled = this.props.error.length > 0; + const disabled = this.props.error.length > 0; if (this.props.source === 'form') { fields = this.renderFormFields(this.props.form!!); } else if (this.props.source === 'json') { @@ -131,7 +131,7 @@ class SettingsComponent extends React.Component<Props> { } bindKeymapsForm(value: FormKeymaps) { - let data = new SettingData({ + const data = new SettingData({ source: this.props.source, form: (this.props.form as FormSettings).buildWithKeymaps(value), }); @@ -139,7 +139,7 @@ class SettingsComponent extends React.Component<Props> { } bindSearchForm(value: any) { - let data = new SettingData({ + const data = new SettingData({ source: this.props.source, form: (this.props.form as FormSettings).buildWithSearch( FormSearch.fromJSON(value)), @@ -148,7 +148,7 @@ class SettingsComponent extends React.Component<Props> { } bindBlacklistForm(blacklist: Blacklist) { - let data = new SettingData({ + const data = new SettingData({ source: this.props.source, form: (this.props.form as FormSettings).buildWithBlacklist(blacklist), }); @@ -156,7 +156,7 @@ class SettingsComponent extends React.Component<Props> { } bindPropertiesForm(value: any) { - let data = new SettingData({ + const data = new SettingData({ source: this.props.source, form: (this.props.form as FormSettings).buildWithProperties( Properties.fromJSON(value)) @@ -165,7 +165,7 @@ class SettingsComponent extends React.Component<Props> { } bindJson(_name: string, value: string) { - let data = new SettingData({ + const data = new SettingData({ source: this.props.source, json: JSONTextSettings.fromText(value), }); @@ -173,13 +173,13 @@ class SettingsComponent extends React.Component<Props> { } bindSource(_name: string, value: string) { - let from = this.props.source; + const from = this.props.source; if (from === 'form' && value === 'json') { this.props.dispatch(settingActions.switchToJson( this.props.form as FormSettings)); this.save(); } else if (from === 'json' && value === 'form') { - let b = window.confirm(DO_YOU_WANT_TO_CONTINUE); + const b = window.confirm(DO_YOU_WANT_TO_CONTINUE); if (!b) { this.forceUpdate(); return; @@ -191,7 +191,7 @@ class SettingsComponent extends React.Component<Props> { } save() { - let { source, json, form } = this.props.store.getState(); + const { source, json, form } = this.props.store.getState(); this.props.dispatch(settingActions.save( new SettingData({ source, json, form }), )); |