Skip to content

Instantly share code, notes, and snippets.

@nelsonr
Created February 1, 2022 15:41
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 nelsonr/ba0d89ed7f3c349463d7024a33fbe119 to your computer and use it in GitHub Desktop.
Save nelsonr/ba0d89ed7f3c349463d7024a33fbe119 to your computer and use it in GitHub Desktop.
Custom ESLint config
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "script"
},
"rules": {
"curly": "warn",
"comma-spacing": "warn",
"brace-style": ["error", "1tbs"],
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn",
"quotes": ["warn", "single", "avoid-escape"],
"space-before-blocks": "warn",
"space-infix-ops": "error",
"space-in-parens": ["warn", "never"],
"keyword-spacing": "warn",
"space-before-function-paren": "warn",
"array-bracket-newline": [ "warn", { "multiline": true } ],
"padding-line-between-statements": [
"warn",
{ "blankLine": "always", "prev": "*", "next": "block-like" },
{ "blankLine": "always", "prev": "block-like", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "return" }
]
},
"globals": {
"$": "readonly",
"osAjaxBackend": "readonly",
"SilkUI": "readonly",
"jQuery": "readonly",
"OsNotifyWidget": "readonly"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment