Skip to content

Instantly share code, notes, and snippets.

@lucaronca
Last active August 13, 2018 13:46
Show Gist options
  • Save lucaronca/bcef5170e2a8fccf8aec6f7fa753c180 to your computer and use it in GitHub Desktop.
Save lucaronca/bcef5170e2a8fccf8aec6f7fa753c180 to your computer and use it in GitHub Desktop.
#!/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