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"
}],
"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-indent": ["error", 2, { checkAttributes: true, indentLogicalExpressions: true }],
"quotes": "off",
"@typescript-eslint/quotes": ["error", "single", { "allowTemplateLiterals": true, "avoidEscape": true }],

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

Loading…
Cancel
Save