Last active
August 10, 2016 02:11
-
-
Save gedalos/f0ce2df304709a2a828fda23bf287c41 to your computer and use it in GitHub Desktop.
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
module.exports = { | |
"parseOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"globalReturn": false, // allow return statements in the global scope | |
"impliedStrict": false, // enable global strict mode (if ecmaVersion is 5 or greater) | |
"jsx": false, // enable JSX | |
"experimentalObjectRestSpread": false // enable support for the experimental object rest/spread properties | |
} | |
}, | |
"env": { | |
"browser": true, // - browser global variables. | |
"node": true, // - Node.js global variables and Node.js scoping. | |
"commonjs": false, // - CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack). | |
"shared-node-browser": false, // - Globals common to both Node and Browser. | |
"es6": true, // - enable all ECMAScript 6 features except for modules. | |
"worker": false, // - web workers global variables. | |
"amd": false, // - defines require() and define() as global variables as per the amd spec. | |
"mocha": false, // - adds all of the Mocha testing global variables. | |
"jasmine": false, // - adds all of the Jasmine testing global variables for version 1.3 and 2.0. | |
"jest": false, // - Jest global variables. | |
"phantomjs": false, // - PhantomJS global variables. | |
"protractor": false, // - Protractor global variables. | |
"qunit": false, // - QUnit global variables. | |
"jquery": false, // - jQuery global variables. | |
"prototypejs": false, // - Prototype.js global variables. | |
"shelljs": false, // - ShellJS global variables. | |
"meteor": false, // - Meteor global variables. | |
"mongo": false, // - MongoDB global variables. | |
"applescript": false, // - AppleScript global variables. | |
"nashorn": false, // - Java 8 Nashorn global variables. | |
"serviceworker": false, // - Service Worker global variables. | |
"atomtest": false, // - Atom test helper globals. | |
"embertest": false, // - Ember test helper globals. | |
"webextensions": false, // - WebExtensions globals. | |
"greasemonkey": false // - GreaseMonkey globals. | |
}, | |
"globals": {}, | |
"plugins": [], | |
"rules": { | |
////////// Possible Errors ////////// | |
"no-cond-assign": 2, // disallow assignment operators in conditional expressions | |
"no-console": 2, // disallow the use of console | |
"no-constant-condition": 2, // disallow constant expressions in conditions | |
"no-control-regex": 2, // disallow control characters in regular expressions | |
"no-debugger": 2, // disallow the use of debugger | |
"no-dupe-args": 2, // disallow duplicate arguments in function definitions | |
"no-dupe-keys": 2, // disallow duplicate keys in object literals | |
"no-duplicate-case": 2, // disallow duplicate case labels | |
"no-empty-character-class": 2, // disallow empty character classes in regular expressions | |
"no-empty": 2, // disallow empty block statements | |
"no-ex-assign": 2, // disallow reassigning exceptions in catch clauses | |
"no-extra-boolean-cast": 2, // disallow unnecessary boolean casts | |
"no-extra-parens": 0, // disallow unnecessary parentheses | |
"no-extra-semi": 2, // disallow unnecessary semicolons | |
"no-func-assign": 2, // disallow reassigning function declarations | |
"no-inner-declarations": 2, // disallow function or var declarations in nested blocks | |
"no-invalid-regexp": 2, // disallow invalid regular expression strings in RegExp constructors | |
"no-irregular-whitespace": 2, // disallow irregular whitespace outside of strings and comments | |
"no-negated-in-lhs": 2, // disallow negating the left operand in in expressions | |
"no-obj-calls": 2, // disallow calling global object properties as functions | |
"no-prototype-builtins": 0, // disallow calling some Object.prototype methods directly on objects | |
"no-regex-spaces": 2, // disallow multiple spaces in regular expressions | |
"no-sparse-arrays": 2, // disallow sparse arrays | |
"no-unexpected-multiline": 2, // disallow confusing multiline expressions | |
"no-unreachable": 2, // disallow unreachable code after return, throw, continue, and break statements | |
"no-unsafe-finally": 2, // disallow control flow statements in finally blocks | |
"use-isnan": 2, // require calls to isNaN() when checking for NaN | |
"valid-jsdoc": 0, // enforce valid JSDoc comments | |
"valid-typeof": 2, // enforce comparing typeof expressions against valid strings | |
////////// Best Practices ////////// | |
"accessor-pairs": 0, // enforce getter and setter pairs in objects | |
"array-callback-return": 0, // enforce return statements in callbacks of array methods | |
"block-scoped-var": 0, // enforce the use of variables within the scope they are defined | |
"complexity": 0, // enforce a maximum cyclomatic complexity allowed in a program | |
"consistent-return": 0, // require return statements to either always or never specify values | |
"curly": 0, // enforce consistent brace style for all control statements | |
"default-case": 0, // require default cases in switch statements | |
"dot-location": 0, // enforce consistent newlines before and after dots | |
"dot-notation": 0, // enforce dot notation whenever possible | |
"eqeqeq": 0, // require the use of === and !== | |
"guard-for-in": 0, // require for-in loops to include an if statement | |
"no-alert": 0, // disallow the use of alert, confirm, and prompt | |
"no-caller": 0, // disallow the use of arguments.caller or arguments.callee | |
"no-case-declarations": 2, // disallow lexical declarations in case clauses | |
"no-div-regex": 0, // disallow division operators explicitly at the beginning of regular expressions | |
"no-else-return": 0, // disallow else blocks after return statements in if statements | |
"no-empty-function": 0, // disallow empty functions | |
"no-empty-pattern": 2, // disallow empty destructuring patterns | |
"no-eq-null": 0, // disallow null comparisons without type-checking operators | |
"no-eval": 0, // disallow the use of eval() | |
"no-extend-native": 0, // disallow extending native types | |
"no-extra-bind": 0, // disallow unnecessary calls to .bind() | |
"no-extra-label": 0, // disallow unnecessary labels | |
"no-fallthrough": 2, // disallow fallthrough of case statements | |
"no-floating-decimal": 0, // disallow leading or trailing decimal points in numeric literals | |
"no-implicit-coercion": 0, // disallow shorthand type conversions | |
"no-implicit-globals": 0, // disallow var and named function declarations in the global scope | |
"no-implied-eval": 0, // disallow the use of eval()-like methods | |
"no-invalid-this": 0, // disallow this keywords outside of classes or class-like objects | |
"no-iterator": 0, // disallow the use of the __iterator__ property | |
"no-labels": 0, // disallow labeled statements | |
"no-lone-blocks": 0, // disallow unnecessary nested blocks | |
"no-loop-func": 0, // disallow function declarations and expressions inside loop statements | |
"no-magic-numbers": 0, // disallow magic numbers | |
"no-multi-spaces": 0, // disallow multiple spaces | |
"no-multi-str": 0, // disallow multiline strings | |
"no-native-reassign": 2, // disallow assignments to native objects or read-only global variables | |
"no-new-func": 0, // disallow new operators with the Function object | |
"no-new-wrappers": 0, // disallow new operators with the String, Number, and Boolean objects | |
"no-new": 0, // disallow new operators outside of assignments or comparisons | |
"no-octal-escape": 0, // disallow octal escape sequences in string literals | |
"no-octal": 2, // disallow octal literals | |
"no-param-reassign": 0, // disallow reassigning function parameters | |
"no-proto": 0, // disallow the use of the __proto__ property | |
"no-redeclare": 2, // disallow var redeclaration | |
"no-return-assign": 0, // disallow assignment operators in return statements | |
"no-script-url": 0, // disallow javascript: urls | |
"no-self-assign": 2, // disallow assignments where both sides are exactly the same | |
"no-self-compare": 0, // disallow comparisons where both sides are exactly the same | |
"no-sequences": 0, // disallow comma operators | |
"no-throw-literal": 0, // disallow throwing literals as exceptions | |
"no-unmodified-loop-condition": 0, // disallow unmodified loop conditions | |
"no-unused-expressions": 0, // disallow unused expressions | |
"no-unused-labels": 2, // disallow unused labels | |
"no-useless-call": 0, // disallow unnecessary calls to .call() and .apply() | |
"no-useless-concat": 0, // disallow unnecessary concatenation of literals or template literals | |
"no-useless-escape": 0, // disallow unnecessary escape characters | |
"no-void": 0, // disallow void operators | |
"no-warning-comments": 0, // disallow specified warning terms in comments | |
"no-with": 0, // disallow with statements | |
"radix": 0, // enforce the consistent use of the radix argument when using parseInt() | |
"vars-on-top": 0, // require var declarations be placed at the top of their containing scope | |
"wrap-iife": 0, // require parentheses around immediate function invocations | |
"yoda": 0, // require or disallow “Yoda” conditions | |
////////// Strict Mode ////////// | |
"strict": 0, // controls location of Use Strict Directives | |
////////// Variables ////////// | |
"init-declarations": 0, // require or disallow initialization in var declarations | |
"no-catch-shadow": 0, // disallow catch clause parameters from shadowing variables in the outer scope | |
"no-delete-var": 2, // disallow deleting variables | |
"no-label-var": 0, // disallow labels that share a name with a variable | |
"no-restricted-globals": 0, // disallow specified global variables | |
"no-shadow-restricted-names": 0, // disallow identifiers from shadowing restricted names | |
"no-shadow": 0, // disallow var declarations from shadowing variables in the outer scope | |
"no-undef-init": 0, // disallow initializing variables to undefined | |
"no-undef": 2, // disallow the use of undeclared variables unless mentioned in /*global */ comments | |
"no-undefined": 0, // disallow the use of undefined as an identifier | |
"no-unused-vars": 2, // disallow unused variables | |
"no-use-before-define": 0, // disallow the use of variables before they are defined | |
////////// Node.js ////////// | |
"callback-return": 0, // require return statements after callbacks | |
"global-require": 0, // require require() calls to be placed at top-level module scope | |
"handle-callback-err": 0, // require error handling in callbacks | |
"no-mixed-requires": 0, // disallow require calls to be mixed with regular var declarations | |
"no-new-require": 0, // disallow new operators with calls to require | |
"no-path-concat": 0, // disallow string concatenation with __dirname and __filename | |
"no-process-env": 0, // disallow the use of process.env | |
"no-process-exit": 0, // disallow the use of process.exit() | |
"no-restricted-modules": 0, // disallow specified modules when loaded by require | |
"no-sync": 0, // disallow synchronous methods | |
////////// Stylistic Issues ////////// | |
"array-bracket-spacing": [2, "always"], // enforce consistent spacing inside array brackets | |
"block-spacing": 2, // enforce consistent spacing inside single-line blocks | |
"brace-style": 2, // enforce consistent brace style for blocks | |
"camelcase": 2, // enforce camelcase naming convention | |
"comma-dangle": [2, "always"], // require or disallow trailing commas | |
"comma-spacing": 2, // enforce consistent spacing before and after commas | |
"comma-style": 2, // enforce consistent comma style | |
"computed-property-spacing": [2, "always"], // enforce consistent spacing inside computed property brackets | |
"consistent-this": [2, "that"], // enforce consistent naming when capturing the current execution context | |
"eol-last": 2, // enforce at least one newline at the end of files | |
"func-names": 0, // require or disallow named function expressions | |
"func-style": 0, // enforce the consistent use of either function declarations or expressions | |
"id-blacklist": 0, // disallow specified identifiers | |
"id-length": 0, // enforce minimum and maximum identifier lengths | |
"id-match": 0, // require identifiers to match a specified regular expression | |
"indent": 2, // enforce consistent indentation | |
"jsx-quotes": 0, // enforce the consistent use of either double or single quotes in JSX attributes | |
"key-spacing": 2, // enforce consistent spacing between keys and values in object literal properties | |
"keyword-spacing": 2, // enforce consistent spacing before and after keywords | |
"linebreak-style": [2, "unix"], // enforce consistent linebreak style | |
"lines-around-comment": [2, | |
{"beforeBlockComment": true, | |
"beforeLineComment": true | |
}], // require empty lines around comments | |
"max-depth": 2, // enforce a maximum depth that blocks can be nested | |
"max-len": 2, // enforce a maximum line length | |
"max-lines": 2, // enforce a maximum number of lines per file | |
"max-nested-callbacks": 2, // enforce a maximum depth that callbacks can be nested | |
"max-params": 2, // enforce a maximum number of parameters in function definitions | |
"max-statements-per-line": 2, // enforce a maximum number of statements allowed per line | |
"max-statements": 2, // enforce a maximum number of statements allowed in function blocks | |
"multiline-ternary": 2, // enforce newlines between operands of ternary expressions | |
"new-cap": [2, {"newIsCap": true}], // require constructor function names to begin with a capital letter | |
"new-parens": 2, // require parentheses when invoking a constructor with no arguments | |
"newline-after-var": 2, // require or disallow an empty line after var declarations | |
"newline-before-return": 2, // require an empty line before return statements | |
"newline-per-chained-call": 2, // require a newline after each call in a method chain | |
"no-array-constructor": 0, // disallow Array constructors | |
"no-bitwise": 0, // disallow bitwise operators | |
"no-continue": 0, // disallow continue statements | |
"no-inline-comments": 2, // disallow inline comments after code | |
"no-lonely-if": 2, // disallow if statements as the only statement in else blocks | |
"no-mixed-operators": 2, // disallow mixed binary operators | |
"no-mixed-spaces-and-tabs": 2, // disallow mixed spaces and tabs for indentation | |
"no-multiple-empty-lines": [2, {"max": 1}], // disallow multiple empty lines | |
"no-negated-condition": 0, // disallow negated conditions | |
"no-nested-ternary": 0, // disallow nested ternary expressions | |
"no-new-object": 0, // disallow Object constructors | |
"no-plusplus": 0, // disallow the unary operators ++ and -- | |
"no-restricted-syntax": 0, // disallow specified syntax | |
"no-spaced-func": 2, // disallow spacing between function identifiers and their applications | |
"no-tabs": 2, // Disallow tabs in file | |
"no-ternary": 0, // disallow ternary operators | |
"no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines | |
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers | |
"no-unneeded-ternary": 2, // disallow ternary operators when simpler alternatives exist | |
"no-whitespace-before-property": 2, // disallow whitespace before properties | |
"object-curly-newline": [2, "always"], // enforce consistent line breaks inside braces | |
"object-curly-spacing": [2, "always"], // enforce consistent spacing inside braces | |
"object-property-newline": 2, // enforce placing object properties on separate lines | |
"one-var-declaration-per-line": 0, // require or disallow newlines around var declarations | |
"one-var": 0, // enforce variables to be declared either together or separately in functions | |
"operator-assignment": [2, "always"], // require or disallow assignment operator shorthand where possible | |
"operator-linebreak": [2, "before"], // enforce consistent linebreak style for operators | |
"padded-blocks": 0, // require or disallow padding within blocks | |
"quote-props": [2, "always"], // require quotes around object literal property names | |
"quotes": [2, "single"], // enforce the consistent use of either backticks, double, or single quotes | |
"require-jsdoc": 0, // require JSDoc comments | |
"semi-spacing": [2, {"before": false, "after": true}], // enforce consistent spacing before and after semicolons | |
"semi": 0, // require or disallow semicolons instead of ASI | |
"sort-vars": 0, // require variables within the same declaration block to be sorted | |
"space-before-blocks": [2, "always"], // enforce consistent spacing before blocks | |
"space-before-function-paren": [2, "always"], // enforce consistent spacing before function definition opening parenthesis | |
"space-in-parens": [2, "always"], // enforce consistent spacing inside parentheses | |
"space-infix-ops": 2, // require spacing around operators | |
"space-unary-ops": [2, { | |
"words": true, | |
"nonwords": true | |
}], // enforce consistent spacing before or after unary operators | |
"spaced-comment": [2, "always"], // enforce consistent spacing after // or /* in a comment | |
"unicode-bom": 0, // require or disallow Unicode byte order mark (BOM) | |
"wrap-regex": 2, // require parenthesis around regex literals | |
////////// ECMAScript 6 ////////// | |
"arrow-body-style": 0, // require braces around arrow function bodies | |
"arrow-parens": 0, // require parentheses around arrow function arguments | |
"arrow-spacing": 0, // enforce consistent spacing before and after the arrow in arrow functions | |
"constructor-super": 2, // require super() calls in constructors | |
"generator-star-spacing": 0, // enforce consistent spacing around * operators in generator functions | |
"no-class-assign": 2, // disallow reassigning class members | |
"no-confusing-arrow": 0, // disallow arrow functions where they could be confused with comparisons | |
"no-const-assign": 2, // disallow reassigning const variables | |
"no-dupe-class-members": 2, // disallow duplicate class members | |
"no-duplicate-imports": 0, // disallow duplicate module imports | |
"no-new-symbol": 2, // disallow new operators with the Symbol object | |
"no-restricted-imports": 0, // disallow specified modules when loaded by import | |
"no-this-before-super": 2, // disallow this/super before calling super() in constructors | |
"no-useless-computed-key": 0, // disallow unnecessary computed property keys in object literals | |
"no-useless-constructor": 0, // disallow unnecessary constructors | |
"no-useless-rename": 0, // disallow renaming import, export, and destructured assignments to the same name | |
"no-var": 0, // require let or const instead of var | |
"object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals | |
"prefer-arrow-callback": 0, // require arrow functions as callbacks | |
"prefer-const": 0, // require const declarations for variables that are never reassigned after declared | |
"prefer-reflect": 0, // require Reflect methods where applicable | |
"prefer-rest-params": 0, // require rest parameters instead of arguments | |
"prefer-spread": 0, // require spread operators instead of .apply() | |
"prefer-template": 0, // require template literals instead of string concatenation | |
"require-yield": 2, // require generator functions to contain yield | |
"rest-spread-spacing": 0, // enforce spacing between rest and spread operators and their expressions | |
"sort-imports": 0, // enforce sorted import declarations within modules | |
"template-curly-spacing": 0, // require or disallow spacing around embedded expressions of template strings | |
"yield-star-spacing": 0 // require or disallow spacing around the * in yield* expressions | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment