Skip to content

Instantly share code, notes, and snippets.

@kapowaz
Last active July 21, 2022 14:47
Show Gist options
  • Save kapowaz/ffbf9ef4e61364965dda77db1d431683 to your computer and use it in GitHub Desktop.
Save kapowaz/ffbf9ef4e61364965dda77db1d431683 to your computer and use it in GitHub Desktop.
eslint:report:disabled script — generate a report about which eslint rules you’re disabling, and how often
{
"scripts": {
"eslint:report:disabled": "grep -rohE --exclude-dir=node_modules --include \\*.jsx --include \\*.js --include \\*.tsx --include \\*.ts \"(?:eslint-disable(?:(?:-next)?-line)?) ([-a-z0-9\\/]+(,\\s?[-a-z0-9\\/]+)?)\" | sed -E 's/eslint-disable|eslint-disable-line|eslint-disable-next-line//g' | tr ',' '\\n' | tr -d ' ' | sort | uniq -c | sort -nr"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment