question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected lint error when using "bypass" in a comment

See original GitHub issue

Lint error The use of the word "bypass" is not allowed, particularly with regards to bypassSecurityTrustHTML() and similar functions in Angular. was thrown when “bypass” was used in a comment. This is unexpected. It should be possible to use the word in comments.

Helpful info to solve the issue:

  • We can use the word “bypass” anywhere except for the following cases:
    • Function
    • Class
    • All kinds of identifiers
  • The lint check currently exists lint general_purpose_linter file (here), and it should either be modified or moved to third party linters to solve the issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
sajalasaticommented, Feb 25, 2021

@DubeySandeep As per offline discussion, kindly leave a comment here verifying if need this regex check or not. Thanks!

1reaction
sajalasaticommented, Feb 19, 2021

@OBITORASU Sorry for delayed response. Appreciate the effort you have put to explore the solutions and explaining it. But I am not sure if the approach (i.e the regex modification) you are suggesting would be the correct way. @DubeySandeep would you like to loop in here? One plausible way could be to shift the check from the general purpose linter to individual third party linters because I think we could implement it more easily there as per our requirements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

warning Unexpected any. Specify a different type @typescript ...
Something that works for me when trying to bypass the same rule, specially for overloading methods is to use: // eslint-disable-next-line if ...
Read more >
How to deal with lint warning "Unexpected any. Specify a ...
You can disable (and re-enable specific) eslint warnings at the line, block, file, an project levels. Here's how to disable the warning for ......
Read more >
lint-staged throwing errors on pre-commit hook #11249 - GitHub
The only situation where that becomes a problem is where a maintainer wants to use Node 12 while doing a commit locally but...
Read more >
Common issues and solutions - mypy 0.991 documentation
You can use the form # type: ignore[<code>] to only ignore specific errors on the line. This way you are less likely to...
Read more >
no-console - ESLint - Pluggable JavaScript Linter
In general, calls using console should be stripped before being pushed to ... eslint no-console: "error" */ console.log("Log a debug level message.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found