Skip to content

Instantly share code, notes, and snippets.

@szkrd
Created July 28, 2019 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szkrd/1f557c13350bc3ecab4f7807f6d9152c to your computer and use it in GitHub Desktop.
Save szkrd/1f557c13350bc3ecab4f7807f6d9152c to your computer and use it in GitHub Desktop.
node standard seed (standard, eslint, prettier)
#!/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