This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
How do I disable an ESLint rule? How do I find it's code? #164
Closed
Description
I need to use any
in a portion of my code because I'm receiving an API response that can have variable shape that is being inspected using reflection.
I have a type like this:
type Response = {
id: number;
title: string;
customJsonData: any;
}
I went to add // eslint-disable-next-line
over the customJsonData: any;
but by itself that doesn't do anything. I found this comment but I have no idea how to find the ESLint rule name from this output:
./src/App.tsx
[17, 15]: Type declaration of 'any' loses type-safety. Consider replacing it with a more precise type, the empty type ('{}'), or suppress this occurence.
The suggestion to search for keywords to learn more about each warning is ridiculous, but that may be coming from CRA, I don't know. Either way there is no clear way to tell how what code does a rule I want to temporarily silence have. Can this be fixed in CRA TS or is this a problem in CRA itself?
Metadata
Metadata
Assignees
Labels
No labels