Skip to content

The no-unsafe-regex rule is annoying #153

@sindresorhus

Description

@sindresorhus

Issuehunt badges

It matches way too many regexes to be useful. And it's unclear what's wrong with the regexes and how to fix it.

It matches simple regex like:

https://github.com/xojs/stylelint-config-xo/blob/9c49d0bbf96a433ec6b2eef83875acadd26ba78f/index.js#L4

const customError = /^(?:[A-Z][a-z\d]*)*Error$/;

const disableRegex = /^eslint-disable(-next-line|-line)?($|(\s+(@[\w-]+\/[\w-]+\/)?[\w-]+)?)/;

And many many more.


IssueHunt Summary

fisker fisker has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions