Eslint: update rules and adjust code accordingly.

master
Tom Hacohen 5 years ago
parent 416ba70b51
commit ab5495e221

@ -56,8 +56,12 @@ module.exports = {
"beforeClosing": "never" "beforeClosing": "never"
}], }],
"react/jsx-boolean-value": ["error", "never"], "react/jsx-boolean-value": ["error", "never"],
"react/jsx-curly-spacing": ["error", "never"], "react/jsx-curly-spacing": ["error", { "when": "never", "children": true }],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-indent-props": ["error", 2],
"react/jsx-curly-brace-presence": ["error", "never"],
"react/jsx-key": ["error", { "checkFragmentShorthand": true }], "react/jsx-key": ["error", { "checkFragmentShorthand": true }],
"react/jsx-indent": ["error", 2, { checkAttributes: true, indentLogicalExpressions: true }],
"quotes": "off", "quotes": "off",
"@typescript-eslint/quotes": ["error", "single", { "allowTemplateLiterals": true, "avoidEscape": true }], "@typescript-eslint/quotes": ["error", "single", { "allowTemplateLiterals": true, "avoidEscape": true }],

@ -101,11 +101,9 @@ const ValueTypeComponent = (props: ValueTypeComponentProps) => {
<TypeSelector <TypeSelector
value={props.value.type} value={props.value.type}
types={props.types} types={props.types}
onChange={ onChange={(event: React.ChangeEvent<HTMLSelectElement>) => (
(event: React.ChangeEvent<HTMLSelectElement>) => (
props.onChange(props.name, event.target.value, props.value.value) props.onChange(props.name, event.target.value, props.value.value)
) )}
}
/> />
</React.Fragment> </React.Fragment>
); );

Loading…
Cancel
Save