Last active
June 11, 2021 09:41
-
-
Save hexium310/a9839a13efc46f51d8429e9ba5c2b4c1 to your computer and use it in GitHub Desktop.
A .textlintrc generator
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
cat <<< $(jq '{ rules: [{ key: .devDependencies | keys | map(match("(@textlint-.+/)?textlint-rule-.+").string | gsub("^textlint-rule-"; ""))[], value: true }] | from_entries }' package.json | jq -s '.[1] * .[0]' .textlintrc.json -) > .textlintrc.json |
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
Write it to same file as it is, so the error occurs as following: | |
jq: error (at <stdin>:35): object ({"rules":{"...) and null (null) cannot be multiplied |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment