wsdl-tsclient icon indicating copy to clipboard operation
wsdl-tsclient copied to clipboard

[Featrure Request] Disable ESLint

Open ZimGil opened this issue 4 years ago • 5 comments

It would be nice if generated files would have a /* eslint-disable */ line in the top of the file.

Could be options dependent but I guess it could also be default as IMO it would be the standard expected behavior.

ZimGil avatar Jul 28 '21 14:07 ZimGil

We just use an .eslintignore file containing the directory of the generated types...

https://eslint.org/docs/user-guide/configuring/ignoring-code

pfumagalli avatar Mar 18 '22 10:03 pfumagalli

Same here - and yet it could be helpful in some cases.

For example, ts-proto does the same

ZimGil avatar Mar 23 '22 10:03 ZimGil

@pfumagalli @ZimGil Do you think it could be good idea to add an option for this? Or make it default similar to openapi-generator....

dderevjanik avatar Apr 16 '22 16:04 dderevjanik

I did small research regarding /* eslint-disable*/ in other projects like openapi-generator and it seems that some people don't care too much about linting their code and some do.

check this comment https://github.com/OpenAPITools/openapi-generator/issues/802#issuecomment-542044205 by @bodograumann . I think he has the point. Adding path of your generated client to .eslintignore is very easy.

What do you think?

dderevjanik avatar Apr 17 '22 13:04 dderevjanik

I agree that the best practice should be to add generated file to .eslintignore Yet I think that it could be nice to have it.

Of course it should be an option and we should not force anything.

As for the default value: IMHO - most cases would not want to lint generated files. On the other hand defaulting to true would be a breaking change :) so I vote on adding an option with a false as default.

ZimGil avatar Apr 17 '22 14:04 ZimGil