Skip to content

Instantly share code, notes, and snippets.

View cherring07's full-sized avatar

Chris Herring cherring07

View GitHub Profile
"ordered-imports": [true, {
"grouped-imports": true,
"import-sources-order": "lowercase-last",
"named-imports-order": "lowercase-last"
"module-source-path": "basename"
}],
@cherring07
cherring07 / find-unused-js-files-by-folder-name.sh
Last active April 3, 2019 10:27
Find any Javascript files which are never imported based upon parent folder name (React style)
# Place in directory of choice (normally root of the react project)
# chmod u+x find-unused-js-files-by-folder-name.sh
# sh ./find-unused-js-files-by-folder-name.sh
JS_FILES=$(find ./ -type f -name "*.tsx" ! -path "./node_modules/*" ! -path "*.test.tsx")
RED="\033[41m"
NC="\033[0m"
LIGHT_RED="\033[0;31m"
for FILE in $JS_FILES; do