Advertisement
Guest User

.eslintrc

a guest
May 30th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 17.91 KB | None | 0 0
  1. parserOptions:
  2.     ecmaVersion: 6
  3.  
  4. env:
  5.     node: true               # Node.js global variables and Node.js-specific rules
  6.     es6: true                # Required for things like Promise constructors to be recognized
  7.  
  8. rules:
  9.     # Possible Errors
  10.  
  11.     comma-dangle: ["error", "never"]           # disallow trailing commas
  12.     no-cond-assign: ["error", "always"]       # disallow assignment operators in conditional expressions
  13.     no-console: "warn"                         # disallow the use of console
  14.     no-constant-condition: "error"             # disallow constant expressions in conditions
  15.     no-control-regex: "error"                  # disallow control characters in regular expressions
  16.     no-debugger: "error"                       # disallow the use of debugger
  17.     no-dupe-args: "error"                      # disallow duplicate arguments in function definitions
  18.     no-dupe-keys: "error"                      # disallow duplicate keys in object literals
  19.     no-duplicate-case: "error"                 # disallow duplicate case labels
  20.     no-empty: "error"                          # disallow empty block statements
  21.     no-empty-character-class: "error"          # disallow empty character classes in regular expressions
  22.     no-ex-assign: "error"                      # disallow reassigning exceptions in catch clauses
  23.     no-extra-boolean-cast: "error"             # disallow unnecessary boolean casts
  24.     no-extra-parens: 0                         # disallow unnecessary parentheses
  25.     no-extra-semi: "error"                     # disallow unnecessary semicolons
  26.     no-func-assign: "error"                    # disallow reassigning function declarations
  27.     no-inner-declarations: "error"             # disallow function or var declarations in nested blocks
  28.     no-invalid-regexp: "error"                 # disallow invalid regular expression strings in RegExp constructors
  29.     no-irregular-whitespace: "error"           # disallow irregular whitespace outside of strings and comments
  30.     no-negated-in-lhs: "error"                 # disallow negating the left operand in in expressions
  31.     no-obj-calls: "error"                      # disallow calling global object properties as functions
  32.     no-regex-spaces: "error"                   # disallow multiple spaces in regular expression literals
  33.     no-sparse-arrays: "error"                  # disallow sparse arrays
  34.     no-unexpected-multiline: "error"           # disallow confusing multiline expressions
  35.     no-unreachable: "error"                    # disallow unreachable code after return, throw, continue, and break statements
  36.     no-unsafe-finally: "error"                 # disallow control flow statements in finally blocks
  37.     use-isnan: "error"                         # require calls to isNaN() when checking for NaN
  38.     valid-jsdoc: 0                             # enforce valid JSDoc comments
  39.     valid-typeof: "error"                      # enforce comparing typeof expressions against valid strings
  40.  
  41.  
  42.     # Best Practice
  43.  
  44.     accessor-pairs: "error"                    # enforces getter/setter pairs in objects (off by default)
  45.     block-scoped-var: "error"                  # treat var statements as if they were block scoped (off by default)
  46.     complexity: 0                              # specify the maximum cyclomatic complexity allowed in a program (off by default)
  47.     consistent-return: 0                       # require return statements to either always or never specify values
  48.     curly: ["error", "all"]                    # specify curly brace conventions for all control statements
  49.     default-case: "error"                      # require default case in switch statements (off by default)
  50.     dot-notation: "error"                      # encourages use of dot notation whenever possible
  51.     dot-location: ["error", "property"]        # enforces consistent newlines before or after dots (off by default)
  52.     eqeqeq: "error"                            # require the use of === and !==
  53.     guard-for-in: "error"                      # make sure for-in loops have an if statement (off by default)
  54.     no-alert: "error"                          # disallow the use of alert, confirm, and prompt
  55.     no-caller: "error"                         # disallow use of arguments.caller or arguments.callee
  56.     no-confusing-arrow: "error"                # disallow arrow functions where they could be confused with comparisons
  57.     no-div-regex: "error"                      # disallow division operators explicitly at beginning of regular expression (off by default)
  58.     no-else-return: "error"                    # disallow else after a return in an if (off by default)
  59.     no-eq-null: "error"                        # disallow comparisons to null without a type-checking operator (off by default)
  60.     no-eval: "error"                           # disallow use of eval()
  61.     no-extend-native: "error"                  # disallow adding to native types
  62.     no-extra-bind: "error"                     # disallow unnecessary function binding
  63.     no-fallthrough: "error"                    # disallow fallthrough of case statements
  64.     no-floating-decimal: "error"               # disallow the use of leading or trailing decimal points in numeric literals (off by default)
  65.     no-implied-eval: "error"                   # disallow use of eval()-like methods
  66.     no-iterator: "error"                       # disallow usage of __iterator__ property
  67.     no-labels: "error"                         # disallow use of labeled statements
  68.     no-lone-blocks: "error"                    # disallow unnecessary nested blocks
  69.     no-loop-func: "error"                      # disallow creation of functions within loops
  70.     no-multi-spaces: "error"                   # disallow use of multiple spaces
  71.     no-multi-str: "error"                      # disallow use of multiline strings
  72.     no-native-reassign: "error"                # disallow reassignments of native objects
  73.     no-new-func: "error"                       # disallow use of new operator for Function object
  74.     no-new-wrappers: "error"                   # disallows creating new instances of String, Number, and Boolean
  75.     no-new: "error"                            # disallow use of new operator when not part of the assignment or comparison
  76.     no-octal-escape: "error"                   # disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251";
  77.     no-octal: "error"                          # disallow use of octal literals
  78.     no-param-reassign: 0                       # disallow reassignment of function parameters (off by default)
  79.     no-process-env: 0                          # disallow use of process.env (off by default)
  80.     no-proto: "error"                          # disallow usage of __proto__ property
  81.     no-redeclare: "error"                      # disallow declaring the same variable more then once
  82.     no-return-assign: "error"                  # disallow use of assignment in return statement
  83.     no-script-url: "error"                     # disallow use of javascript: urls
  84.     no-self-compare: "error"                   # disallow comparisons where both sides are exactly the same (off by default)
  85.     no-sequences: "error"                      # disallow use of comma operator
  86.     no-throw-literal: "error"                  # restrict what can be thrown as an exception (off by default)
  87.     no-unused-expressions: "error"             # disallow usage of expressions in statement position
  88.     no-void: "error"                           # disallow use of void operator (off by default)
  89.     no-warning-comments: "warn"                # disallow usage of configurable erroring terms in comments, e.g. TODO or FIXME (off by default)
  90.     no-with: "error"                           # disallow use of the with statement
  91.     radix: "error"                             # require use of the second argument for parseInt() (off by default)
  92.     vars-on-top: "error"                       # requires to declare all vars on top of their containing scope (off by default)
  93.     wrap-iife: "error"                         # require immediate function invocation to be wrapped in parentheses (off by default)
  94.     yoda: 0                                    # require or disallow Yoda conditions
  95.  
  96.  
  97.     # Strict Mode
  98.  
  99.     strict: "error"          # controls location of Use Strict Directives
  100.  
  101.  
  102.     # Variables
  103.  
  104.     no-catch-shadow: "error"                   # disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment)
  105.     no-delete-var: 0                           # disallow deletion of variables
  106.     no-label-var: "error"                      # disallow labels that share a name with a variable
  107.     no-shadow: "error"                         # disallow declaration of variables already declared in the outer scope
  108.     no-shadow-restricted-names: "error"        # disallow shadowing of names such as arguments
  109.     no-undef: "error"                          # disallow use of undeclared variables unless mentioned in a /*global */ block
  110.     no-undef-init: "error"                     # disallow use of undefined when initializing variables
  111.     no-undefined: 0                            # disallow use of undefined variable (off by default)
  112.     no-unused-vars: "error"                    # disallow declaration of variables that are not used in the code
  113.     no-use-before-define: ["error", "nofunc"]  # disallow use of variables before they are defined
  114.  
  115.  
  116.     # Node.js
  117.  
  118.     handle-callback-err: "warn"        # enforces error handling in callbacks (off by default) (on by default in the node environment)
  119.     no-mixed-requires: "error"         # disallow mixing regular variable and require declarations (off by default) (on by default in the node environment)
  120.     no-new-require: "error"            # disallow use of new operator with the require function (off by default) (on by default in the node environment)
  121.     no-path-concat: "error"            # disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment)
  122.     no-process-exit: 0                 # disallow process.exit() (on by default in the node environment)
  123.     no-restricted-modules: 0           # restrict usage of specified node modules (off by default)
  124.     no-sync: "warn"                    # disallow use of synchronous methods (off by default)
  125.  
  126.  
  127.     # Stylistic Issues
  128.  
  129.     array-bracket-spacing: ["error", "never"]                                  # enforce spacing inside array brackets (off by default)
  130.     brace-style: ["error", "1tbs"]                                             # enforce one true brace style (off by default)
  131.     camelcase: "error"                                                         # require camel case names
  132.     comma-spacing: ["error", {before: false, after: true}]                     # enforce spacing before and after comma
  133.     comma-style: ["error", "last"]                                             # enforce one true comma style (off by default)
  134.     computed-property-spacing: ["error", "never"]                              # require or disallow padding inside computed properties (off by default)
  135.     consistent-this: ["error", "that"]                                         # enforces consistent naming when capturing the current execution context (off by default)
  136.     eol-last: "error"                                                          # enforce newline at the end of file, with no multiple empty lines
  137.     func-names: 0                                                              # require function expressions to have a name (off by default)
  138.     func-style: 0                                                              # enforces use of function declarations or expressions (off by default)
  139.     indent: ["error", 4]                                                       # this option sets a specific tab width for your code (off by default)
  140.     key-spacing: ["error", {beforeColon: false, afterColon: true}]             # enforces spacing between keys and values in object literal properties
  141.     lines-around-comment: 0                                                    # enforces empty lines around comments (off by default)
  142.     linebreak-style: ["error", "unix"]                                         # disallow mixed 'LF' and 'CRLF' as linebreaks (off by default)
  143.     max-nested-callbacks: ["error", 5]                                         # require a capital letter for constructors
  144.     new-parens: "error"                                                        # allow/disallow an empty newline after var statement (off by default)
  145.     no-array-constructor: "error"                                              # disallow use of the Array constructor
  146.     no-continue: "error"                                                       # disallow use of the continue statement (off by default)
  147.     no-inline-comments: 0                                                      # disallow comments inline after code (off by default)
  148.     no-lonely-if: "error"                                                      # disallow if as the only statement in an else block (off by default)
  149.     no-mixed-spaces-and-tabs: "error"                                          # disallow mixed spaces and tabs for indentation
  150.     no-multiple-empty-lines: 0                                                 # disallow multiple empty lines (off by default)
  151.     no-nested-ternary: "error"                                                 # disallow nested ternary expressions (off by default)
  152.     no-new-object: 0                                                           # disallow use of the Object constructor
  153.     no-spaced-func: "error"                                                    # disallow space between function identifier and application
  154.     no-ternary: 0                                                              # disallow the use of ternary operators (off by default)
  155.     no-trailing-spaces: "error"                                                # disallow trailing whitespace at the end of lines
  156.     no-underscore-dangle: "error"                                              # disallow dangling underscores in identifiers
  157.     one-var: 0                                                                 # allow just one var statement per function (off by default)
  158.     operator-assignment: ["error", "always"]                                   # require assignment operator shorthand where possible or prohibit it entirely (off by default)
  159.     operator-linebreak: ["error", "before"]                                    # enforce operators to be placed before or after line breaks (off by default)
  160.     padded-blocks: 0                                                           # enforce padding within blocks (off by default)
  161.     quote-props: 0                                                             # require quotes around object literal property names (off by default)
  162.     quotes: ["error", "double", {allowTemplateLiterals: true}]                 # specify whether double or single quotes should be used
  163.     semi-spacing: ["error", {before: false, after: true}]                      # enforce spacing before and after semicolons
  164.     semi: ["error", "always"]                                                  # require or disallow use of semicolons instead of ASI
  165.     sort-vars: 0                                                               # sort variables within the same declaration block (off by default)
  166.     keyword-spacing: ["error", {before: true, after: true}]                    # require a space before or after certain keywords
  167.     space-before-blocks: ["error", "always"]                                   # require or disallow space before blocks (off by default)
  168.     space-before-function-paren: ["error", {anonymous: always, named: never}]  # require or disallow space before function opening parenthesis (off by default)
  169.     space-in-parens: ["error", "never"]                                        # require or disallow spaces inside parentheses (off by default)
  170.     space-infix-ops: "error"                                                   # require spaces around operators
  171.     space-unary-ops: "error"                                                   # require or disallow spaces before/after unary operators (words on by default, nonwords off by default)
  172.     spaced-comment: ["error", "always"]                                        # require or disallow a space immediately following the # or /* in a comment (off by default)
  173.     wrap-regex: "error"                                                        # require regex literals to be wrapped in parentheses (off by default)
  174.  
  175.  
  176.     # ECMAScript 6
  177.  
  178.     constructor-super: "error"         # verify super() callings in constructors (off by default)
  179.     generator-star-spacing: 0          # enforce the spacing around the * in generator functions (off by default)
  180.     no-this-before-super: "error"      # disallow to use this/super before super() calling in constructors (off by default)
  181.     no-var: "error"                    # require let or const instead of var (off by default)
  182.     object-shorthand: 0                # require method and property shorthand syntax for object literals (off by default)
  183.     prefer-const: "error"              # suggest using of const declaration for variables that are never modified after declared (off by default)
  184.  
  185.  
  186.     # Legacy
  187.  
  188.     max-depth: ["error", 5]            # specify the maximum depth that blocks can be nested (off by default)
  189.     max-len: ["error", 120]            # specify the maximum length of a line in your program (off by default)
  190.     max-params: ["error", 4]           # limits the number of parameters that can be used in the function declaration. (off by default)
  191.     max-statements: 0                  # specify the maximum number of statement allowed in a function (off by default)
  192.     no-bitwise: "error"                # disallow use of bitwise operators (off by default)
  193.     no-plusplus: "error"               # disallow use of unary operators, ++ and -- (off by default)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement