1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

fix script for linting changed files (#17028)

This commit is contained in:
Brad Decker 2023-01-20 09:16:58 -06:00 committed by GitHub
parent a19a5d60d3
commit c9bbfa46d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,7 @@
#! /bin/bash
# This file exists because yarn 2+ seems to not be able to use the yarn 1
# syntax in "scripts" to concatenate two commands output together using { }.
# This script simply outputs both and then normal pipe operator syntax can be
# used in the "scripts" key can be used to operate on the output.
git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ;

View File

@ -47,8 +47,8 @@
"lint:fix": "yarn lint:prettier:fix && yarn lint:eslint:fix && yarn lint:styles:fix", "lint:fix": "yarn lint:prettier:fix && yarn lint:eslint:fix && yarn lint:styles:fix",
"lint:prettier": "prettier --check -- **/*.json", "lint:prettier": "prettier --check -- **/*.json",
"lint:prettier:fix": "prettier --write -- **/*.json", "lint:prettier:fix": "prettier --write -- **/*.json",
"lint:changed": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint", "lint:changed": "./development/get-changed-file-names.sh | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint",
"lint:changed:fix": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint --fix", "lint:changed:fix": "./development/get-changed-file-names.sh | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint --fix",
"lint:changelog": "auto-changelog validate", "lint:changelog": "auto-changelog validate",
"lint:changelog:rc": "auto-changelog validate --rc", "lint:changelog:rc": "auto-changelog validate --rc",
"lint:eslint": "eslint . --ext js,ts,tsx,snap --cache", "lint:eslint": "eslint . --ext js,ts,tsx,snap --cache",