Skip to content

Instantly share code, notes, and snippets.

@sagarkbhatt
Created May 4, 2017 12:14
Show Gist options
  • Save sagarkbhatt/cec2ce7890d7f71296b23d937cd59faa to your computer and use it in GitHub Desktop.
Save sagarkbhatt/cec2ce7890d7f71296b23d937cd59faa to your computer and use it in GitHub Desktop.
Eslintrc + rules + custom + wp
{
"env": {
"browser": true
},
"plugins": [
"html"
],
"settings": {
"html/html-extensions": [".html", ".vue", ".php"]
},
"globals": {
"_": false,
"Backbone": false,
"jQuery": false,
"wp": false,
"__dirname": true,
"rtwp":true
},
"parser": "babel-eslint",
"rules": {
"array-bracket-spacing": [ "error", "always" ],
"brace-style": [ "error", "1tbs" ],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": [ "error", "always" ],
"constructor-super": "error",
"dot-notation": "error",
"eol-last": "error",
"func-call-spacing": "error",
"indent": [ "error", "tab", { "SwitchCase": 1 } ],
"key-spacing": "error",
"keyword-spacing": "error",
"no-alert": "error",
"no-bitwise": "error",
"no-console": "error",
"no-const-assign": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-eval": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": [ "error", { "max": 1 } ],
"no-multi-spaces": "error",
"no-negated-in-lhs": "error",
"no-nested-ternary": "error",
"no-redeclare": "error",
"no-shadow": "error",
"no-undef-init": "error",
"no-unreachable": "error",
"no-unsafe-negation": "error",
"no-use-before-define": [ "error", "nofunc" ],
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-return": "error",
"no-var": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": [ "error", "always" ],
"one-var": "off",
"prefer-const": "error",
"semi": "error",
"semi-spacing": "error",
"space-before-blocks": [ "error", "always" ],
"space-before-function-paren": [ "error", "never" ],
"space-in-parens": [ "error", "always" ],
"space-infix-ops": [ "error", { "int32Hint": false } ],
"space-unary-ops": [ "error", {
"overrides": {
"!": true
}
} ],
"template-curly-spacing": [ "error", "always" ],
"valid-jsdoc": [ "error", { "requireReturn": false } ],
"valid-typeof": "error",
"yoda": [0]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment