Skip to content

Use eslint to find unused directives

Lukas Eipert requested to merge leipert-eslint-report-unused-directives into master

What does this MR do?

In a lot of files we are using eslint-disable to overwrite our eslint settings. eslint has now an option --report-unused-disable-directives to find unused eslint-disable directives. We should use that option to find unnecessary disabled rules in our source code.

Example

Example of something that will throw an error now:

/* eslint-disable max-len */

//eslint-disable-next-line no-new
const foo = 5;
Edited by Lukas Eipert

Merge request reports

Loading