Skip to content

Instantly share code, notes, and snippets.

@philsinatra
Created November 14, 2019 14:54
Show Gist options
  • Save philsinatra/866170bb4db606eff41cb58f8119205a to your computer and use it in GitHub Desktop.
Save philsinatra/866170bb4db606eff41cb58f8119205a to your computer and use it in GitHub Desktop.
Basic ESLint configuration file for quick JS projects/examples
module.exports = {
env: {
browser: true,
es6: true
},
extends: "eslint:recommended",
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
parserOptions: {
ecmaVersion: 2018,
sourceType: "module"
},
rules: {
camelcase: 1,
"comma-dangle": 0,
"consistent-return": 0,
"func-names": 0,
import: 0,
"import/no-extraneous-dependencies": 0,
indent: ["error", 2],
"linebreak-style": ["error", "unix"],
"no-case-declarations": 0,
"no-console": 0,
"no-continue": 0,
"no-plusplus": [
"error",
{
allowForLoopAfterthoughts: true
}
],
"no-restricted-syntax": 0,
"no-tabs": 0,
"no-unused-vars": [
1,
{
argsIgnorePattern: "^err"
}
],
"object-curly-spacing": ["error", "never"],
quotes: ["error", "single"],
semi: ["error", "never"]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment