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