UNPKG

pg-safe-numbers

Version:
105 lines (104 loc) 8.95 kB
--- extends: 'eslint:recommended' parser: babel-eslint env: node: true mocha: true es6: true rules: accessor-pairs: 2 # Rule to flag wrapping non-iife in parens (default 0) block-scoped-var: 2 # Rule to check for "block scoped" variables by binding context (default 0) brace-style: [1, 1tbs, {allowSingleLine: true}] # Rule to flag block statements that do not use the one true brace style (default [0,"1tbs"]) camelcase: [2, {properties: never}] # Rule to flag non-camelcased identifiers (default 0) comma-spacing: [1, {before: false, after: true}] # Comma spacing - validates spacing before and after comma (default 0) comma-style: [1, last] # Comma style - enforces comma styles of two types: last and first (default 0) computed-property-spacing: [1, never] # Disallows or enforces spaces inside computed properties. (default [0,"never"]) consistent-return: 2 # Rule to flag consistent return values (default 0) consistent-this: [1, self] # Rule to enforce consistent naming of "this" context variables (default [0,"that"]) constructor-super: 1 # A rule to verify `super()` callings in constructor. (default 0) curly: [2, all] # Rule to flag statements without curly braces (default [0,"all"]) default-case: 2 # require default case in switch statements (default 0) dot-notation: [2, {allowPattern: '^[a-z]+(_[a-z]+)+$'}] # Rule to warn about using dot notation instead of square bracket notation when possible. (default [0,{"allowKeywords":true}]) eol-last: 1 # Require file to end with single newline. (default 0) eqeqeq: [2, smart] # Rule to flag statements that use != and == instead of !== and === (default 0) guard-for-in: 2 # Rule to flag for-in loops without if statements inside (default 0) handle-callback-err: 2 # Ensure handling of errors when we know they exist. (default 0) indent: [1, 2, {SwitchCase: 1}] # This option sets a specific tab width for your code (default 0) key-spacing: [1, {beforeColon: false, afterColon: true}] # Rule to specify spacing of object literal keys and values (default [0,{"beforeColon":false,"afterColon":true}]) linebreak-style: 1 # Rule to forbid mixing LF and LFCR line breaks. (default [0,"unix"]) lines-around-comment: [1, {beforeBlockComment: true, beforeLineComment: false}] # Enforces empty lines around comments. (default 0) max-depth: [1, 6] # A rule to set the maximum depth block can be nested in a function. (default [0,4]) max-len: [1, 120] # Rule to check for max length on a line. (default [0,80,4]) max-nested-callbacks: [1, 5] # Rule to enforce a maximum number of nested callbacks. (default [0,2]) max-params: [1, 5] # Rule to flag when a function has too many parameters (default [0,3]) max-statements: [1, 50] # A rule to set the maximum number of statements in a function. (default [0,10]) new-cap: [1, {capIsNewExceptions: [DECIMAL, ENUM, CHAR]}] # Rule to flag use of constructors without capital letters (default 0) new-parens: 1 # Rule to flag when using constructor without parentheses (default 0) no-alert: 2 # Rule to flag use of alert, confirm, prompt (default 0) no-array-constructor: 1 # Disallow construction of dense arrays using the Array constructor (default 0) no-caller: 2 # Rule to flag use of arguments.callee and arguments.caller. (default 0) no-div-regex: 2 # Rule to check for ambiguous div operator in regexes (default 0) no-else-return: 2 # Rule to flag `else` after a `return` in `if` (default 0) no-eval: 2 # Rule to flag use of eval() statement (default 0) no-extend-native: 2 # Rule to flag adding properties to native object's prototypes. (default 0) no-extra-bind: 2 # Rule to flag unnecessary bind calls (default 0) no-extra-parens: 2 # Disallow parenthesising higher precedence subexpressions. (default 0) no-floating-decimal: 2 # Rule to flag use of a leading/trailing decimal point in a numeric literal (default 0) no-implied-eval: 2 # Rule to flag use of implied eval via setTimeout and setInterval (default 0) no-iterator: 2 # Rule to flag usage of __iterator__ property (default 0) no-label-var: 2 # Rule to flag labels that are the same as an identifier (default 0) no-labels: 2 # Disallow Labeled Statements (default 0) no-lone-blocks: 2 # Rule to flag blocks with no reason to exist (default 0) no-lonely-if: 1 # Rule to disallow if as the only statmenet in an else block (default 0) no-loop-func: 2 # Rule to flag creation of function inside a loop (default 0) no-mixed-requires: 2 # Rule to enforce grouped require statements for Node.JS (default [0,false]) no-multi-spaces: 1 # Disallow use of multiple spaces. (default 0) no-multi-str: 2 # Rule to flag when using multiline strings (default 0) no-multiple-empty-lines: 1 # Disallows multiple blank lines. (default [0,{"max":2}]) no-native-reassign: 2 # Rule to flag when re-assigning native objects (default 0) no-nested-ternary: 1 # Rule to flag nested ternary expressions (default 0) no-new: 2 # Rule to flag statements with function invocation preceded by (default 0) no-new-func: 2 # Rule to flag when using new Function (default 0) no-new-object: 1 # A rule to disallow calls to the Object constructor (default 0) no-new-require: 2 # Rule to disallow use of new operator with the `require` function (default 0) no-new-wrappers: 2 # Rule to flag when using constructor for wrapper objects (default 0) no-octal-escape: 2 # Rule to flag octal escape sequences in string literals. (default 0) no-param-reassign: 1 # Disallow reassignment of function parameters. (default 0) no-path-concat: 2 # Disallow string concatenation when using __dirname and __filename (default 0) no-process-env: 2 # Disallow the use of process.env() (default 0) no-process-exit: 2 # Disallow the use of process.exit() (default 0) no-proto: 2 # Rule to flag usage of __proto__ property (default 0) no-restricted-modules: [2, winston, moment-timezone, colors] # Restrict usage of specified node modules. (default 0) no-return-assign: 2 # Rule to flag when return statement contains assignment (default 0) no-script-url: 2 # Rule to flag when using javascript: urls (default 0) no-self-compare: 2 # Rule to flag comparison where left part is the same as the right (default 0) no-sequences: 2 # Rule to flag use of comma operator (default 0) no-shadow: 2 # Rule to flag on declaring variables already declared in the outer scope (default 0) no-shadow-restricted-names: 2 # Disallow shadowing of NaN, undefined, and Infinity (ES5 section 15.1.1) (default 0) no-spaced-func: 1 # Rule to check that spaced function application (default 0) no-this-before-super: 1 # A rule to disallow using `this`/`super` before `super()`. (default 0) no-throw-literal: 2 # Rule to restrict what can be thrown as an exception. (default 0) no-trailing-spaces: 1 # Disallow trailing spaces at the end of lines. (default 0) no-undef-init: 2 # Rule to flag when initializing to undefined (default 0) no-undefined: 2 # Rule to flag references to the undefined variable. (default 0) no-unexpected-multiline: 2 # Rule to spot scenarios where a newline looks like it is ending a statement, but is not. (default 0) no-unused-expressions: 2 # Flag expressions in statement position that do not side effect (default 0) no-use-before-define: 2 # Rule to flag use of variables before they are defined (default 0) no-var: 1 # Rule to check for the usage of var. (default 0) no-void: 2 # Rule to disallow use of void operator. (default 0) no-with: 2 # Rule to flag use of with statement (default 0) one-var: [1, never] # A rule to control the use of single variable declarations. (default [0,"always"]) operator-linebreak: [1, after] # Operator linebreak - enforces operator linebreak style of two types: after and before (default 0) quotes: [1, single] # A rule to choose between single and double quote marks (default [0,"double"]) radix: 2 # Rule to flag use of parseInt without a radix argument (default 0) semi: [1, always] # Rule to flag missing semicolons. (default 0) semi-spacing: [1, {before: false, after: true}] # Validates spacing before and after semicolon (default [0,{"before":false,"after":true}]) space-before-blocks: [1, always] # A rule to ensure whitespace before blocks. (default [0,"always"]) space-in-parens: [1, never] # Disallows or enforces spaces inside of parentheses. (default [0,"never"]) space-infix-ops: 1 # Require spaces around infix operators (default 0) space-unary-ops: 1 # This rule shoud require or disallow spaces before or after unary operations. (default [0,{"words":true,"nonwords":false}]) spaced-comment: [1, always] # Source code for spaced-comments rule (default 0) strict: [2, never] # Rule to control usage of strict mode directives. (default 0) wrap-iife: 2 # Rule to flag when IIFE is not wrapped in parens (default 0) yoda: 2 # Rule to require or disallow yoda comparisons (default [0,"never"])