mysticatea / eslint-plugin-eslint-comments

Additional ESLint rules for directive comments of ESLint.
https://mysticatea.github.io/eslint-plugin-eslint-comments/
MIT License
354 stars 44 forks source link

Support ESlint 4.0 #1

Closed jscharett closed 7 years ago

jscharett commented 7 years ago

Looks like 4.0 has some breaking changes as it no longer supports LineComment and BlockComment events. Any plans on supporting 4.0?

mysticatea commented 7 years ago

Thank you for the report!

I have not realized it since I have not upgraded ESLint to 4.0 yet by peerDependencies problems. I'll fix it.

jscharett commented 6 years ago

Seems that rules no-use and no-unlimited-disable are throwing errors when running. Getting "Warning: Invalid location Use --force to continue" in the console when those rules are enabled. I'm using eslint 4.0 with grunt-eslint.

mysticatea commented 6 years ago

It's not a problem of this plugin. ESLint should work with the location and ESLint does not have --force option.

jscharett commented 6 years ago

Looks like its an incompatability between this plugin and the eslint-plugin-html. In your utils.toForceLocation method, you return a column value of -1 and the html plugin is checking for a 'valid' column value in its TransformableString.locationToIndex method. Whats the reason for returning a column value of -1?

mysticatea commented 6 years ago

Because it's necessary. The reports of no-unlimited-disable can exist on the line of //eslint-disable-line since the purpose of the rule is that it prevents //eslint-disable-line. In that case, the reports don't work since the line has been disabled. So the rule needs to avoid the disabling of directive comments. ESLint allows the negative locations.