Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: deno-lint-ignore-line to ignore the linter warning for the same line #27584

Open
dandv opened this issue Jan 8, 2025 · 1 comment
Labels
lint Issues related to deno lint suggestion suggestions for new features (yet to be agreed)

Comments

@dandv
Copy link

dandv commented Jan 8, 2025

Reason

Adding a new // deno-lint-ignore comment line before an offending line of code, is useful to draw attention. But when the ignore issue is minor, ideally attention should not be drawn, by simply adding the comment after the statement, without creating a new line for it.

Before

import {
  getFirestore,
  // deno-lint-ignore no-unused-vars -- Firestore is used as a return type but https://github.com/denoland/deno/issues/27583#issue-2774370928
  Firestore,
} from 'firebase-admin/firestore';

After

import { getFirestore, Firestore } from 'firebase-admin/firestore';  // deno-lint-ignore-line no-unused-vars -- Firestore is used as a return type but https://github.com/denoland/deno/issues/27583#issue-2774370928

Prior art

ESLint offers // eslint-disable-line in addition to // eslint-disable-next-line.

@dsherret dsherret added suggestion suggestions for new features (yet to be agreed) lint Issues related to deno lint labels Jan 8, 2025
@dsherret
Copy link
Member

dsherret commented Jan 8, 2025

I personally don't think this should be done because it adds more complexity to deno lint and it makes linting slower by having to check for more places for ignore comments (though, probably doesn't really matter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lint Issues related to deno lint suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

2 participants