Lint prefer-const
This commit is contained in:
parent
f6e933ff8f
commit
06c63c7272
@ -29,7 +29,8 @@
|
|||||||
"comma-spacing": ["warn"],
|
"comma-spacing": ["warn"],
|
||||||
"camelcase": ["warn", {"ignoreDestructuring": true ,"properties": "never"}],
|
"camelcase": ["warn", {"ignoreDestructuring": true ,"properties": "never"}],
|
||||||
"eol-last": ["warn", "always"],
|
"eol-last": ["warn", "always"],
|
||||||
"no-multiple-empty-lines": ["warn", {"max": 1}]
|
"no-multiple-empty-lines": ["warn", {"max": 1}],
|
||||||
|
"prefer-const": "warn"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"jest",
|
"jest",
|
||||||
|
@ -52,7 +52,7 @@ class EditForm extends Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {}
|
this.state = {}
|
||||||
for (let field of props.fields) {
|
for (const field of props.fields) {
|
||||||
this.state[field.slug] = props[field.slug]
|
this.state[field.slug] = props[field.slug]
|
||||||
}
|
}
|
||||||
this.state.error = this.props.error || undefined;
|
this.state.error = this.props.error || undefined;
|
||||||
|
@ -16,8 +16,8 @@ const Overview = (props) => {
|
|||||||
return <Redirect to="/sign-up.html" />
|
return <Redirect to="/sign-up.html" />
|
||||||
}
|
}
|
||||||
|
|
||||||
let title = (props.mode === 'view')? 'View maps' : 'Add or edit data';
|
const title = (props.mode === 'view')? 'View maps' : 'Add or edit data';
|
||||||
let back = (props.mode === 'edit')? `/view/${dataLayer}.html` : undefined;
|
const back = (props.mode === 'edit')? `/view/${dataLayer}.html` : undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sidebar title={title} back={back}>
|
<Sidebar title={title} back={back}>
|
||||||
|
Loading…
Reference in New Issue
Block a user