Closed romainquellec closed 7 years ago
So, prettier is responsible for moving your comments to a different line because that line is too long (see here). So by the time eslint comes along to fix things, the code it's already on a newline and eslint isn't going to put it back. Even if you didn't have prettier, that line would result in a max-len
linting error (unless you've disabled that rule).
So here's what I suggest. Instead of using eslint-disable-line
use eslint-disable-next-line
like this:
// eslint-disable-next-line react/prefer-stateless-function
export class Map extends React.PureComponent {
}
I think that looks cleaner anyway :)
I'm going to go ahead and close this as there's nothing that can/should be done from this tool's perspective.
Hi !
Got a classic package.json config like :
"eslintConfig": { "parser": "babel-eslint", "extends": "airbnb",
plus
"no-inline-comments": 0,
But still, my comments are not allowed to be inlined. I'm using react-boilerplate and they are a lot of code like this :
export class Map extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
Do you have the same behavior ? Did I forget another rule ?
Thank you.