mightyiam / eslint-config-love

A TypeScript ESLint config that loves you
MIT License
774 stars 69 forks source link

eslint-comments/require-description is not suitable for generated code #1880

Closed darkbasic closed 15 hours ago

darkbasic commented 1 week ago

Almost every automatically generated code/typings starts with eslint-disable:

/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import

That makes it unsuitable for eslint-comments/require-description.

mightyiam commented 1 week ago

Yes, I suppose generated code should not be linted. And according to the first line in the example you provided, there's an attempt to prevent it from being linted. But this rule throws a wrench in that attempt.

So, I suggest not relying on those generated eslint-disable comments. They are a clever attempt, but it's probably safer to exclude the files themselves, assuming they are entirely generated.

mightyiam commented 15 hours ago

ESLint is not suitable for generated code.