You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following line in the generated parser (almost at the bottom): public record(pos: PosInfo, result: any, att: MatchAttempt) {
...causes eslint to complain about the use of any.
A workaround is to add this right before that line: // eslint-disable-next-line @typescript-eslint/no-explicit-any
When I'm iterating on a grammar and doing a lot of testing, I have to manually fix this every time I compile a new grammar version into a parser. It would be nice to have an option to insert this line automatically.
I could add the file to .eslintignore, but it seems safer to keep it on because I've had some deployment issues (Next/Vercel) when I've ignored linting on whole files.
The text was updated successfully, but these errors were encountered:
Personally I think the best option is to exclude autogenerated files from linting, as philosophically linting is intended for humans. (You wouldn't expect a code minimiser to respect linting for example).
However, I wonder if it would be possible for you to use the header to include a comment at the top of the file disabling the no-explicit-any for this file?
Alternatively can you use eslint overrides in the .eslintrc.js to disable no-explicit-any for this file?
Using:
The following line in the generated parser (almost at the bottom):
public record(pos: PosInfo, result: any, att: MatchAttempt) {
...causes eslint to complain about the use of
any
.A workaround is to add this right before that line:
// eslint-disable-next-line @typescript-eslint/no-explicit-any
When I'm iterating on a grammar and doing a lot of testing, I have to manually fix this every time I compile a new grammar version into a parser. It would be nice to have an option to insert this line automatically.
I could add the file to .eslintignore, but it seems safer to keep it on because I've had some deployment issues (Next/Vercel) when I've ignored linting on whole files.
The text was updated successfully, but these errors were encountered: