Created
March 16, 2017 07:35
-
-
Save dingo-d/364173ae0b4f9c2883d2386123045d03 to your computer and use it in GitHub Desktop.
Full WordPress coding standard lint rules - includes style guide recommendations and error checks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": true, | |
"globals": { | |
"_": false, | |
"$": false, | |
"Backbone": false, | |
"JSON": false, | |
"jQuery": false, | |
"wp": false | |
}, | |
"env": { | |
"browser": true, | |
"node": true, | |
"jquery": true, | |
"es6": true | |
}, | |
"rules": { | |
"array-bracket-spacing": [ "error", "always", { "singleValue": false, "objectsInArrays": true, "arraysInArrays": true } ], | |
"block-scoped-var": "warning", | |
"block-spacing": "error", | |
"brace-style": [ "error", "1tbs" ], | |
"camelcase": [ "error" ], | |
"comma-spacing": [ "error", { "before": false, "after": true } ], | |
"curly": "error", | |
"default-case": "error", | |
"eol-last": [ "error", "always" ], | |
"eqeqeq": [ "error", "smart" ], | |
"func-call-spacing": [ "error", "never" ], | |
"indent": [ "error", "tab", { "SwitchCase": true, "MemberExpression": true, "ArrayExpression": true, "ObjectExpression": true } ], | |
"init-declarations": [ "warning", "always", { "ignoreForLoopInit": true } ], | |
"key-spacing": [ "error", { "beforeColon": false, "afterColon": true, "singleLine": { "beforeColon": false, "afterColon": true }, "multiLine": { "beforeColon": false, "afterColon": true }, "align": { "beforeColon": false, "afterColon": true, "on": "colon" } } ], | |
"keyword-spacing": ["error", { "before": true, "after": true }], | |
"lines-around-comment": [ "error", { "beforeBlockComment": true, "beforeLineComment": true, "allowBlockStart": true } ], | |
"newline-per-chained-call": [ "error", { "ignoreChainWithDepth": 2 } ], | |
"no-alert": "warning", | |
"no-array-constructor": "error", | |
"no-eval": "error", | |
"no-extra-semi": "error", | |
"no-compare-neg-zero": "error", | |
"no-cond-assign": "error", | |
"no-console": "error", | |
"no-constant-condition": [ "warning", { "checkLoops": false } ], | |
"no-debugger": "error", | |
"no-delete-var": "error", | |
"no-dupe-args": "error", | |
"no-dupe-keys": "error", | |
"no-duplicate-case": "error", | |
"no-else-return": "error", | |
"no-empty": "error", | |
"no-empty-function": "warning", | |
"no-eq-null": "watning", | |
"no-extra-boolean-cast": "warning", | |
"no-fallthrough": "error", | |
"no-func-assign": "error", | |
"no-global-assign": "error", | |
"no-implicit-coercion": "warning", | |
"no-implicit-globals": "warning", | |
"no-inner-declarations": ["error", "var"], | |
"no-lonely-if": "error", | |
"no-loop-func": "warning", | |
"no-mixed-spaces-and-tabs": [ "error", "smart-tabs" ], | |
"no-multi-spaces": "error", | |
"no-new-object": "error", | |
"no-obj-calls": "error", | |
"no-octal": "error", | |
"no-octal-escape": "error", | |
"no-redeclare": "error", | |
"no-return-assign": "error", | |
"no-self-assign": "error", | |
"no-self-compare": "error", | |
"no-sparse-arrays": "error", | |
"no-trailing-spaces": [ "error", { "skipBlankLines": false } ], | |
"no-undef": "error", | |
"no-undefined": "error", | |
"no-unexpected-multiline": "error", | |
"no-unneeded-ternary": "error", | |
"no-unreachable": "error", | |
"no-unsafe-negation": "warning", | |
"no-unused-vars": "error", | |
"no-use-before-define": "error", | |
"no-useless-concat": "error", | |
"no-useless-return": "error", | |
"object-curly-newline": [ "error", { "multiline": true } ], | |
"object-curly-spacing": [ "error", "always" ], | |
"object-property-newline": [ "error", { "allowMultiplePropertiesPerLine": true } ], | |
"one-var-declaration-per-line": [ "error", "initializations" ], | |
"operator-linebreak": [ "error", "after" ], | |
"quote-props": [ "error", "as-needed" ], | |
"quotes": [ "error", "single" ], | |
"radix": [ "error", "as-needed" ], | |
"semi": [ "error", "always", { "omitLastInOneLineBlock": true } ], | |
"semi-spacing": [ "error", { "before": false, "after": true } ], | |
"space-before-function-paren": [ "error", "never" ], | |
"space-in-parens": [ "error", "always", { "exceptions": [ "()", "{}", "[]", "empty" ] } ], | |
"space-infix-ops": "error", | |
"space-unary-ops": [ "error", { "words": true, "nonwords": false, "overrides": { "!": true } } ], | |
"spaced-comment": [ "error", "always" ], | |
"use-isnan": "warning", | |
"valid-typeof": "error", | |
"vars-on-top": "warning", | |
"wrap-iife": [ "warning", "outside" ], | |
"yoda": [ "error", "always", { "onlyEquality": true } ], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment