Created
July 28, 2019 11:21
-
-
Save szkrd/1f557c13350bc3ecab4f7807f6d9152c to your computer and use it in GitHub Desktop.
node standard seed (standard, eslint, prettier)
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 | |
# EDITORCONFIG | |
# ============ | |
echo "\ | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
[*.md] | |
trim_trailing_whitespace = false">.editorconfig | |
# ESLINTRC | |
# ======== | |
cat << 'EOF' > .eslintrc | |
{ | |
"extends": [ | |
"standard", | |
"prettier" | |
], | |
"plugins": [ | |
"standard", | |
"prettier" | |
], | |
"env": { | |
"es6": true, | |
"node": true | |
}, | |
"rules": { | |
"prettier/prettier": "error" | |
} | |
} | |
EOF | |
# GITIGNORE | |
# ========= | |
echo "\ | |
node_modules | |
.idea | |
.vscode | |
.DS_Store | |
.mc | |
*.log | |
.env | |
.cache-loader">.gitignore | |
# PRETTIERRC | |
# ========== | |
cat << 'EOF' > .prettierrc | |
{ | |
"printWidth": 100, | |
"arrowParens": "always", | |
"semi": false, | |
"singleQuote": true | |
} | |
EOF | |
# NPM | |
# === | |
npm init --yes | |
npm i -DE eslint eslint-config-prettier eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-standard prettier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment