Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Do we want to add comments for ESLint warnings? #174

Closed
bobsilverberg opened this issue Feb 8, 2019 · 3 comments
Closed

Do we want to add comments for ESLint warnings? #174

bobsilverberg opened this issue Feb 8, 2019 · 3 comments

Comments

@bobsilverberg
Copy link
Contributor

When running ESLint on the current code base, we get the following warnings:

/addons-code-manager/src/test-helpers.spec.tsx
  14:33  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/addons-code-manager/src/test-helpers.tsx
  170:41  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  171:48  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 3 problems (0 errors, 3 warnings)

which all have to do with ShallowUntilTarget. I think our use of any in those cases makes sense, but it's a bit annoying to see these warnings every time we run ESLint.

How do folks feel about adding code comments to the files to ignore those specific warnings in those cases?

@willdurand
Copy link
Member

I think we should make this rule throw an error instead of a warning. We can still disable the rule if needed. The patch for this issue will determine whether each current warning needs to be fixed or ignored.

@kumar303
Copy link
Contributor

kumar303 commented Feb 8, 2019

I think we should make this rule throw an error instead of a warning. We can still disable the rule if needed.

I agree. This will make the rule much more helpful.

I think warnings are dangerous because they are easy to ignore and they clutter up the terminal which makes solving errors more difficult.

@willdurand
Copy link
Member

This has been fixed in #238.

@willdurand willdurand added this to the 2019.02.28 milestone Feb 22, 2019
@willdurand willdurand self-assigned this Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants