I’m getting an error (eslint): Line 199 exceeds maximum line length of 120. (max-len)
Why doesn’t this inline comment work?
JavaScript
x
6
1
{/* eslint-disable-next-line max-len */}
2
<Chip ref="code" style={styles.chip}backgroundColor={this.state.filterSelected['School Code'] && blue300}onTouchTap={this.handleTouchTap} >
3
<Avatar size={32}>C</Avatar>
4
School Code
5
</Chip>
6
Advertisement
Answer
eslint-disable-line
and eslint-disable-next-line
are only in inline comments.
There is currently an open issue for this in eslint
So you would have to write it as the following:
JavaScript
1
7
1
{
2
// eslint-disable-next-line max-len
3
}<Chip ref="code" style={styles.chip}backgroundColor={this.state.filterSelected['School Code'] && blue300}onTouchTap={this.handleTouchTap} >
4
<Avatar size={32}>C</Avatar>
5
School Code
6
</Chip>
7