Skip to content

Instantly share code, notes, and snippets.

@jlafitte
Last active June 24, 2021 05:48
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 jlafitte/ccc695f244ceb473a530fbdc130c0296 to your computer and use it in GitHub Desktop.
Save jlafitte/ccc695f244ceb473a530fbdc130c0296 to your computer and use it in GitHub Desktop.
Idiomatic ESLint
//Put this in your home directory... Unless you need project specific settings
{
"extends": "idiomatic",
"rules": {
"quotes": ["warn","double"],
"space-in-parens": ["warn","never"],
"array-bracket-spacing": ["warn","never"],
"computed-property-spacing": ["warn","never"],
"one-var-declaration-per-line": ["warn","initializations"],
"semi": ["error","always",{
"omitLastInOneLineBlock": false
}],
"one-var": ["warn",{
"initialized": "never",
"uninitialized": "always"
}],
"indent": ["warn", 2, {
"SwitchCase": 1
}]
}
}
npm install -g eslint@5.x https://github.com/BrandExtract/eslint-config-idiomatic.git
# You can add the following command in your crontab to update automagically.
curl "https://gist.githubusercontent.com/jlafitte/ccc695f244ceb473a530fbdc130c0296/raw/.eslintrc" > ~/.eslintrc
# cron example
# 0 12 * * * curl -s "https://gist.githubusercontent.com/jlafitte/ccc695f244ceb473a530fbdc130c0296/raw/a863715446f948a06eeef73279e999cbb600b465/.eslintrc" > ~/.eslintrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment