Relax eslint

This commit is contained in:
Elliot DeNolf
2018-09-27 01:08:47 -04:00
parent 17f78725f4
commit cdd8097331

View File

@@ -1,209 +1,221 @@
const OFF = 0, WARN = 1, ERROR = 2; const OFF = 0,
WARN = 1,
ERROR = 2;
module.exports = exports = { module.exports = exports = {
"extends": ["eslint:recommended", "plugin:react/recommended"], extends: ["eslint:recommended", "plugin:react/recommended"],
"env": { env: {
"browser": true, browser: true,
"commonjs": true, commonjs: true,
"node": true, node: true,
"es6": true, es6: true,
"jest": true jest: true
}, },
"parserOptions": { parserOptions: {
"sourceType": "module", sourceType: "module",
"ecmaVersion": 6, ecmaVersion: 6,
"ecmaFeatures": { ecmaFeatures: {
"spread": true, spread: true,
"destructuring": true, destructuring: true,
"experimentalObjectRestSpread": true, experimentalObjectRestSpread: true
}, }
}, },
"rules": { rules: {
// Possible Errors (overrides from recommended set) // // Possible Errors (overrides from recommended set)
"no-extra-parens": ERROR, // "no-extra-parens": ERROR,
"no-unexpected-multiline": ERROR, // "no-unexpected-multiline": ERROR,
//
// Best Practices // // Best Practices
//
// Allowed a getter without setter, but all setters require getters // // Allowed a getter without setter, but all setters require getters
"accessor-pairs": [ ERROR, { // "accessor-pairs": [
"getWithoutSet": false, // ERROR,
"setWithoutGet": true // {
}], // getWithoutSet: false,
"block-scoped-var": WARN, // setWithoutGet: true
"consistent-return": ERROR, // }
"curly": ERROR, // ],
"default-case": WARN, // "block-scoped-var": WARN,
// the dot goes with the property when doing multiline // "consistent-return": ERROR,
"dot-location": [ WARN, "property" ], // curly: ERROR,
"dot-notation": WARN, // "default-case": WARN,
"eqeqeq": [ ERROR, "smart" ], // // the dot goes with the property when doing multiline
"guard-for-in": WARN, // "dot-location": [WARN, "property"],
"no-alert": ERROR, // "dot-notation": WARN,
"no-caller": ERROR, // eqeqeq: [ERROR, "smart"],
"no-case-declarations": WARN, // "guard-for-in": WARN,
"no-div-regex": WARN, // "no-alert": ERROR,
"no-else-return": WARN, // "no-caller": ERROR,
"no-empty-pattern": WARN, // "no-case-declarations": WARN,
"no-eq-null": WARN, // "no-div-regex": WARN,
"no-eval": ERROR, // "no-else-return": WARN,
"no-extend-native": ERROR, // "no-empty-pattern": WARN,
"no-extra-bind": WARN, // "no-eq-null": WARN,
"no-floating-decimal": WARN, // "no-eval": ERROR,
"no-implicit-coercion": [ WARN, { // "no-extend-native": ERROR,
"boolean": true, // "no-extra-bind": WARN,
"number": true, // "no-floating-decimal": WARN,
"string": true // "no-implicit-coercion": [
}], // WARN,
"no-implied-eval": ERROR, // {
"no-invalid-this": ERROR, // boolean: true,
"no-iterator": ERROR, // number: true,
"no-labels": WARN, // string: true
"no-lone-blocks": WARN, // }
"no-loop-func": ERROR, // ],
"no-magic-numbers": OFF, // "no-implied-eval": ERROR,
"no-multi-spaces": ERROR, // "no-invalid-this": ERROR,
"no-multi-str": WARN, // "no-iterator": ERROR,
"no-native-reassign": ERROR, // "no-labels": WARN,
"no-new-func": ERROR, // "no-lone-blocks": WARN,
"no-new-wrappers": ERROR, // "no-loop-func": ERROR,
"no-new": ERROR, // "no-magic-numbers": OFF,
"no-octal-escape": ERROR, // "no-multi-spaces": ERROR,
"no-param-reassign": ERROR, // "no-multi-str": WARN,
"no-process-env": WARN, // "no-native-reassign": ERROR,
"no-proto": ERROR, // "no-new-func": ERROR,
"no-redeclare": ERROR, // "no-new-wrappers": ERROR,
"no-return-assign": ERROR, // "no-new": ERROR,
"no-script-url": ERROR, // "no-octal-escape": ERROR,
"no-self-compare": ERROR, // "no-param-reassign": ERROR,
"no-throw-literal": ERROR, // "no-process-env": WARN,
"no-unused-expressions": ERROR, // "no-proto": ERROR,
"no-useless-call": ERROR, // "no-redeclare": ERROR,
"no-useless-concat": ERROR, // "no-return-assign": ERROR,
"no-void": WARN, // "no-script-url": ERROR,
// Produce warnings when something is commented as TODO or FIXME // "no-self-compare": ERROR,
"no-warning-comments": [ WARN, { // "no-throw-literal": ERROR,
"terms": [ "FIXME" ], // "no-unused-expressions": ERROR,
"location": "start" // "no-useless-call": ERROR,
}], // "no-useless-concat": ERROR,
"no-with": WARN, // "no-void": WARN,
"radix": WARN, // // Produce warnings when something is commented as TODO or FIXME
"vars-on-top": ERROR, // "no-warning-comments": [
// Enforces the style of wrapped functions // WARN,
"wrap-iife": [ ERROR, "outside" ], // {
"yoda": ERROR, // terms: ["FIXME"],
// location: "start"
// Strict Mode - for ES6, never use strict. // }
"strict": [ ERROR, "never" ], // ],
// "no-with": WARN,
// Variables // radix: WARN,
"init-declarations": [ ERROR, "always" ], // "vars-on-top": ERROR,
"no-catch-shadow": WARN, // // Enforces the style of wrapped functions
// "wrap-iife": [ERROR, "outside"],
// yoda: ERROR,
//
// // Strict Mode - for ES6, never use strict.
// strict: [ERROR, "never"],
//
// // Variables
// "init-declarations": [ERROR, "always"],
// "no-catch-shadow": WARN,
"no-delete-var": ERROR, "no-delete-var": ERROR,
"no-label-var": ERROR, "no-label-var": ERROR,
"no-shadow-restricted-names": ERROR, // "no-shadow-restricted-names": ERROR,
"no-shadow": WARN, "no-shadow": WARN,
// We require all vars to be initialized (see init-declarations) // We require all vars to be initialized (see init-declarations)
// If we NEED a var to be initialized to undefined, it needs to be explicit // If we NEED a var to be initialized to undefined, it needs to be explicit
"no-undef-init": OFF, "no-undef-init": OFF,
"no-undef": ERROR, // "no-undef": ERROR,
"no-undefined": OFF, // "no-undefined": OFF,
"no-unused-vars": WARN, "no-unused-vars": WARN,
// Disallow hoisting - let & const don't allow hoisting anyhow // Disallow hoisting - let & const don't allow hoisting anyhow
"no-use-before-define": ERROR, "no-use-before-define": ERROR,
// Node.js and CommonJS // // Node.js and CommonJS
"callback-return": [ WARN, [ "callback", "next" ]], // "callback-return": [WARN, ["callback", "next"]],
"global-require": ERROR, // "global-require": ERROR,
"handle-callback-err": WARN, // "handle-callback-err": WARN,
"no-mixed-requires": WARN, // "no-mixed-requires": WARN,
"no-new-require": ERROR, // "no-new-require": ERROR,
// Use path.concat instead // // Use path.concat instead
"no-path-concat": ERROR, // "no-path-concat": ERROR,
"no-process-exit": ERROR, // "no-process-exit": ERROR,
"no-restricted-modules": OFF, // "no-restricted-modules": OFF,
"no-sync": WARN, // "no-sync": WARN,
//
// ECMAScript 6 support // // ECMAScript 6 support
"arrow-body-style": OFF, // "arrow-body-style": OFF,
"arrow-parens": OFF, // "arrow-parens": OFF,
"arrow-spacing": [ ERROR, { "before": true, "after": true }], // "arrow-spacing": [ERROR, { before: true, after: true }],
"constructor-super": ERROR, // "constructor-super": ERROR,
"generator-star-spacing": [ ERROR, "before" ], // "generator-star-spacing": [ERROR, "before"],
// "no-arrow-condition": ERROR, // // "no-arrow-condition": ERROR,
"no-class-assign": ERROR, // "no-class-assign": ERROR,
"no-const-assign": ERROR, // "no-const-assign": ERROR,
"no-dupe-class-members": ERROR, "no-dupe-class-members": ERROR,
"no-this-before-super": ERROR, "no-this-before-super": ERROR,
"no-var": WARN, // "no-var": WARN,
"object-shorthand": OFF, // "object-shorthand": OFF,
"prefer-arrow-callback": WARN, "prefer-arrow-callback": WARN,
"prefer-spread": WARN, "prefer-spread": WARN,
"prefer-template": WARN, // "prefer-template": WARN,
"require-yield": ERROR, // "require-yield": ERROR,
//
// Stylistic - everything here is a warning because of style. // // Stylistic - everything here is a warning because of style.
"array-bracket-spacing": [ WARN, "always" ], // "array-bracket-spacing": [WARN, "always"],
"block-spacing": [ WARN, "always" ], // "block-spacing": [WARN, "always"],
"brace-style": [ WARN, "1tbs", { "allowSingleLine": true } ], // "brace-style": [WARN, "1tbs", { allowSingleLine: true }],
"camelcase": WARN, camelcase: WARN,
"comma-spacing": [ WARN, { "before": false, "after": true } ], "comma-spacing": [WARN, { before: false, after: true }],
"comma-style": [ WARN, "last" ], // "comma-style": [WARN, "last"],
"computed-property-spacing": [ WARN, "never" ], // "computed-property-spacing": [WARN, "never"],
"consistent-this": [ WARN, "self" ], // "consistent-this": [WARN, "self"],
"eol-last": WARN, // "eol-last": WARN,
"func-names": WARN, // "func-names": WARN,
"func-style": ["error", "declaration", { "allowArrowFunctions": true }], // "func-style": ["error", "declaration", { allowArrowFunctions: true }],
"id-length": [ WARN, { "min": 0, "max": 32 } ], // "id-length": [WARN, { min: 0, max: 32 }],
"indent": [ WARN, 2 ], // indent: [WARN, 2],
"jsx-quotes": [ WARN, "prefer-double" ], // "jsx-quotes": [WARN, "prefer-double"],
"keyword-spacing": [ WARN, { "before": true, "after": true} ], // "keyword-spacing": [WARN, { before: true, after: true }],
// "linebreak-style": [ WARN, "unix" ], // // "linebreak-style": [ WARN, "unix" ],
"lines-around-comment": [ WARN, { "beforeBlockComment": true } ], // "lines-around-comment": [WARN, { beforeBlockComment: true }],
"max-depth": [ WARN, 8 ], // "max-depth": [WARN, 8],
"max-len": OFF, // "max-len": OFF,
"max-nested-callbacks": [ WARN, 8 ], // "max-nested-callbacks": [WARN, 8],
"max-params": [ WARN, 8 ], "max-params": [WARN, 8],
"new-cap": WARN, "new-cap": WARN,
"new-parens": WARN, // "new-parens": WARN,
"no-array-constructor": WARN, // "no-array-constructor": WARN,
"no-bitwise": OFF, // "no-bitwise": OFF,
"no-confusing-arrow": ERROR, // "no-confusing-arrow": ERROR,
"no-continue": OFF, // "no-continue": OFF,
"no-console": OFF, "no-console": OFF,
"no-inline-comments": OFF, // "no-inline-comments": OFF,
"no-lonely-if": WARN, // "no-lonely-if": WARN,
"no-mixed-spaces-and-tabs": WARN, "no-mixed-spaces-and-tabs": WARN,
"no-multiple-empty-lines": WARN, // "no-multiple-empty-lines": WARN,
"no-negated-condition": OFF, // "no-negated-condition": OFF,
"no-nested-ternary": WARN, // "no-nested-ternary": WARN,
"no-new-object": WARN, // "no-new-object": WARN,
"no-plusplus": OFF, // "no-plusplus": OFF,
"no-spaced-func": WARN, // "no-spaced-func": WARN,
"no-ternary": OFF, // "no-ternary": OFF,
"no-trailing-spaces": WARN, "no-trailing-spaces": WARN,
"no-underscore-dangle": WARN, // "no-underscore-dangle": WARN,
"no-unneeded-ternary": WARN, // "no-unneeded-ternary": WARN,
"object-curly-spacing": [ WARN, "always" ], // "object-curly-spacing": [WARN, "always"],
"one-var": OFF, // "one-var": OFF,
"operator-assignment": OFF, // "operator-assignment": OFF,
"operator-linebreak": OFF, // "operator-linebreak": OFF,
"padded-blocks": [ WARN, "never" ], // "padded-blocks": [WARN, "never"],
"quote-props": [ WARN, "consistent-as-needed" ], // "quote-props": [WARN, "consistent-as-needed"],
"quotes": [ WARN, "single" ], quotes: [WARN, "single"],
"semi-spacing": [ WARN, { "before": false, "after": true }], "semi-spacing": [WARN, { before: false, after: true }]
"semi": [ ERROR, "always" ], // semi: [ERROR, "always"],
"sort-vars": OFF, // "sort-vars": OFF,
"space-before-blocks": [ WARN, "always" ], // "space-before-blocks": [WARN, "always"],
"space-before-function-paren": [ WARN, "never" ], // "space-before-function-paren": [WARN, "never"],
"space-in-parens": [ WARN, "never" ], // "space-in-parens": [WARN, "never"],
"space-infix-ops": [ WARN, { "int32Hint": true } ], // "space-infix-ops": [WARN, { int32Hint: true }],
"space-return-throw-case": OFF, // "space-return-throw-case": OFF,
"space-unary-ops": ERROR, // "space-unary-ops": ERROR,
"spaced-comment": [ WARN, "always" ], // "spaced-comment": [WARN, "always"],
"wrap-regex": WARN, // "wrap-regex": WARN,
//
// React-specific overridesf // // React-specific overridesf
"react/display-name": OFF, // "react/display-name": OFF,
"react/prop-types": OFF // "react/prop-types": OFF
}}; }
};