Function constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
this.getValue = () => {
const v = this.refs.input.value;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Using string literals in ref attributes is deprecated. Open
<Tooltip className="form-group mb-input" ref="tip">
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
'className' PropType is defined but prop is never used Open
className: PropTypes.string,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Using this.refs is deprecated. Open
const tip = this.refs.tip;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Prop type object
is forbidden Open
verify_code: PropTypes.object.isRequired,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Visible, non-interactive elements should not have mouse or keyboard event listeners Open
<div className="form-side" onClick={this.getCode}>
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Using this.refs is deprecated. Open
this.clearTip = () => this.refs.tip.clear();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "isEmail" is not required, but has no corresponding defaultProp declaration. Open
isEmail: PropTypes.bool,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Absolute imports should come before relative imports. Open
import intl from 'react-intl-universal';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Using string literals in ref attributes is deprecated. Open
type="text" ref="input" onChange={this.clearTip}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "className" is not required, but has no corresponding defaultProp declaration. Open
className: PropTypes.string,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Using this.refs is deprecated. Open
const v = this.refs.input.value;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Using this.refs is deprecated. Open
this.postErr = msg => this.refs.tip.postErr(msg);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/