Last active
August 13, 2018 13:46
-
-
Save lucaronca/bcef5170e2a8fccf8aec6f7fa753c180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for package_json_path in `find ./packages -name package.json`; do | |
eslint_content="{ | |
\"rules\": { | |
\"import/no-extraneous-dependencies\": [ | |
\"error\", | |
{ | |
\"packageDir\": \"${package_json_path//package.json}\", | |
\"devDependencies\": [\"**/*.test.js\", \"**/*.stories.js\"] | |
} | |
] | |
} | |
}" | |
echo "$eslint_content" > ${package_json_path//package.json}.eslintrc | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment