Skip to content

Instantly share code, notes, and snippets.

@skydiver
Last active March 6, 2019 01:11
Show Gist options
  • Save skydiver/ebca1cfaa9dade7bc76e67a03060f5bb to your computer and use it in GitHub Desktop.
Save skydiver/ebca1cfaa9dade7bc76e67a03060f5bb to your computer and use it in GitHub Desktop.
My VSCode project config
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = false
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = true
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
extends: ["standard"],
plugins: ["standard", "react"],
rules: {
"no-var": "error", // optional, recommended when using es6+
"no-unused-vars": 1, // recommended
"arrow-spacing": ["error", { before: true, after: true }], // recommended
indent: ["error", 2],
"comma-dangle": [
"error",
{
objects: "only-multiline",
arrays: "only-multiline",
imports: "never",
exports: "never",
functions: "never",
},
],
// Martín M.
quotes: ["error", "single"],
// options to emulate prettier setup
semi: ["error", "always"],
"eol-last": ["error", "never"],
"max-len": ["error", { code: 80 }],
"template-curly-spacing": ["error", "always"],
"arrow-parens": ["error", "as-needed"],
// standard.js
"space-before-function-paren": [
"error",
{
named: "always",
anonymous: "always",
asyncArrow: "always",
},
],
// standard plugin - options
"standard/object-curly-even-spacing": ["error", "either"],
"standard/array-bracket-even-spacing": ["error", "either"],
"standard/computed-property-even-spacing": ["error", "even"],
"standard/no-callback-literal": ["error", ["cb", "callback"]],
// react plugin - options
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
},
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 8, // optional, recommended 6+
},
}
{
"css": {
"allowed_file_extensions": [
"css",
"scss",
"sass",
"less"
],
"indent_size": 2
},
"js": {
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
"indent_size": 2
}
}
{
"files.associations": {
"*.js": "javascriptreact"
},
}
@skydiver
Copy link
Author

skydiver commented Jan 7, 2019

wget https://gist.githubusercontent.com/skydiver/ebca1cfaa9dade7bc76e67a03060f5bb/raw/.editorconfig &&
wget https://gist.githubusercontent.com/skydiver/ebca1cfaa9dade7bc76e67a03060f5bb/raw/.jsbeautifyrc &&
wget https://gist.githubusercontent.com/skydiver/ebca1cfaa9dade7bc76e67a03060f5bb/raw/.eslintrc.js &&
wget https://www.gitignore.io/api/node && mv node .gitignore &&
mkdir .vscode &&
wget -O .vscode/settings.json https://gist.githubusercontent.com/skydiver/ebca1cfaa9dade7bc76e67a03060f5bb/raw/settings.json

@skydiver
Copy link
Author

npm install --save-dev babel-eslint eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-react eslint-plugin-standard 

@skydiver
Copy link
Author

skydiver commented Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment