eslint-config-walmart
Advanced tools
Comparing version 1.1.1 to 2.0.0
"use strict"; | ||
module.exports = { | ||
"extends": "walmart/configurations/es5", | ||
"env": { | ||
"browser": true | ||
extends: "walmart/configurations/es5", | ||
env: { | ||
browser: true | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
"walmart/configurations/es5", | ||
"walmart/rules/eslint/node/on" | ||
], | ||
"env": { | ||
"node": true | ||
extends: ["walmart/configurations/es5", "walmart/rules/eslint/node/on"], | ||
env: { | ||
node: true | ||
}, | ||
"rules": { | ||
"strict": [2, "global"] | ||
rules: { | ||
strict: [2, "global"] | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
"walmart/configurations/es5" | ||
], | ||
"env": { | ||
"mocha": true | ||
extends: ["walmart/configurations/es5"], | ||
env: { | ||
mocha: true | ||
}, | ||
"rules": { | ||
rules: { | ||
"max-nested-callbacks": 0, | ||
@@ -12,0 +10,0 @@ "no-magic-numbers": 0 |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
extends: [ | ||
"walmart/rules/eslint/best-practices/on", | ||
@@ -14,15 +14,15 @@ "walmart/rules/eslint/errors/on", | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 5, | ||
"sourceType": "script", | ||
"ecmaFeatures": {} | ||
parserOptions: { | ||
ecmaVersion: 5, | ||
sourceType: "script", | ||
ecmaFeatures: {} | ||
}, | ||
"env": { | ||
"amd": true | ||
env: { | ||
amd: true | ||
}, | ||
"globals": { | ||
"module": false, | ||
"process": false | ||
globals: { | ||
module: false, | ||
process: false | ||
}, | ||
"rules": {} | ||
rules: {} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"extends": "walmart/configurations/es6", | ||
"env": { | ||
"browser": true | ||
extends: "walmart/configurations/es6", | ||
env: { | ||
browser: true | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
"walmart/configurations/es6-node" | ||
], | ||
"env": { | ||
"mocha": true, | ||
"phantomjs": true | ||
extends: ["walmart/configurations/es6-node"], | ||
env: { | ||
mocha: true, | ||
phantomjs: true | ||
}, | ||
"globals": { | ||
"expect": true, | ||
"sandbox": true | ||
globals: { | ||
expect: true, | ||
sandbox: true | ||
}, | ||
"rules": { | ||
rules: { | ||
"max-nested-callbacks": 0, | ||
@@ -17,0 +15,0 @@ "no-unused-expressions": 0, |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
"walmart/configurations/es6", | ||
"walmart/rules/eslint/node/on" | ||
], | ||
"env": { | ||
"node": true | ||
extends: ["walmart/configurations/es6", "walmart/rules/eslint/node/on"], | ||
env: { | ||
node: true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "script", | ||
"ecmaFeatures": { | ||
"impliedStrict": false | ||
parserOptions: { | ||
sourceType: "script", | ||
ecmaFeatures: { | ||
impliedStrict: false | ||
} | ||
}, | ||
"globals": {}, | ||
"rules": { | ||
globals: {}, | ||
rules: { | ||
// verify super() callings in constructors | ||
@@ -30,4 +27,4 @@ "constructor-super": 0, | ||
// require that all functions are run in strict mode | ||
"strict": [2, "global"] | ||
strict: [2, "global"] | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"extends": "walmart/configurations/es6-react", | ||
"env": { | ||
"mocha": true, | ||
"phantomjs": true | ||
extends: "walmart/configurations/es6-react", | ||
env: { | ||
mocha: true, | ||
phantomjs: true | ||
}, | ||
"rules": { | ||
rules: { | ||
"max-nested-callbacks": 0, | ||
@@ -11,0 +11,0 @@ "no-magic-numbers": 0 |
"use strict"; | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"extends": [ | ||
"walmart/configurations/es6", | ||
"walmart/rules/react/on" | ||
], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
parser: "babel-eslint", | ||
extends: ["walmart/configurations/es6", "walmart/rules/react/on"], | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
"globals": { | ||
"fetch": false | ||
globals: { | ||
fetch: false | ||
}, | ||
"rules": { | ||
rules: { | ||
"no-extra-parens": 0, | ||
@@ -19,0 +16,0 @@ "no-var": 2 |
"use strict"; | ||
module.exports = { | ||
"extends": "walmart/configurations/es6", | ||
"env": { | ||
"mocha": true, | ||
"phantomjs": true | ||
extends: "walmart/configurations/es6", | ||
env: { | ||
mocha: true, | ||
phantomjs: true | ||
}, | ||
"rules": { | ||
rules: { | ||
"max-nested-callbacks": 0, | ||
@@ -11,0 +11,0 @@ "no-magic-numbers": 0 |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
"walmart/configurations/es5", | ||
"walmart/rules/eslint/es6/on" | ||
], | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"impliedStrict": true | ||
extends: ["walmart/configurations/es5", "walmart/rules/eslint/es6/on"], | ||
parser: "babel-eslint", | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: "module", | ||
ecmaFeatures: { | ||
impliedStrict: true | ||
} | ||
}, | ||
"env": { | ||
"es6": true | ||
env: { | ||
es6: true | ||
}, | ||
"globals": {}, | ||
"rules": {} | ||
globals: {}, | ||
rules: {} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"extends": [ | ||
extends: [ | ||
"walmart/rules/eslint/best-practices/off", | ||
@@ -13,10 +13,10 @@ "walmart/rules/eslint/errors/off", | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 5, | ||
"sourceType": "script", | ||
"ecmaFeatures": {} | ||
parserOptions: { | ||
ecmaVersion: 5, | ||
sourceType: "script", | ||
ecmaFeatures: {} | ||
}, | ||
"env": {}, | ||
"globals": {}, | ||
"rules": {} | ||
env: {}, | ||
globals: {}, | ||
rules: {} | ||
}; |
{ | ||
"name": "eslint-config-walmart", | ||
"description": "A set of default eslint configurations, Walmart Labs style.", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"author": "Eric Baer <me@ericbaer.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/walmartlabs/eslint-config-walmart", |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// Enforces getter/setter pairs in objects | ||
@@ -12,7 +12,7 @@ "accessor-pairs": 0, | ||
// specify the maximum cyclomatic complexity allowed in a program | ||
"complexity": 0, | ||
complexity: 0, | ||
// require return statements to either always or never specify values | ||
"consistent-return": 0, | ||
// specify curly brace conventions for all control statements | ||
"curly": 0, | ||
curly: 0, | ||
// require default case in switch statements | ||
@@ -25,3 +25,3 @@ "default-case": 0, | ||
// require the use of === and !== | ||
"eqeqeq": 0, | ||
eqeqeq: 0, | ||
// make sure for-in loops have an if statement | ||
@@ -129,3 +129,3 @@ "guard-for-in": 0, | ||
// require use of the second argument for parseInt() | ||
"radix": 0, | ||
radix: 0, | ||
// requires to declare all vars on top of their containing scope | ||
@@ -136,4 +136,4 @@ "vars-on-top": 0, | ||
// require or disallow Yoda conditions | ||
"yoda": 0 | ||
yoda: 0 | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// Enforces getter/setter pairs in objects | ||
@@ -12,15 +12,15 @@ "accessor-pairs": 0, | ||
// specify the maximum cyclomatic complexity allowed in a program | ||
"complexity": [2, 11], | ||
complexity: [2, 11], | ||
// require return statements to either always or never specify values | ||
"consistent-return": 2, | ||
// specify curly brace conventions for all control statements | ||
"curly": [2, "all"], | ||
// specify curly brace conventions for multi-line control statements | ||
curly: [2, "multi-line"], | ||
// require default case in switch statements | ||
"default-case": 0, | ||
// enforces consistent newlines before or after dots | ||
"dot-location": 0, | ||
// enforces consistent newlines before dots | ||
"dot-location": [2, "property"], | ||
// encourages use of dot notation whenever possible | ||
"dot-notation": [2, { "allowKeywords": true }], | ||
"dot-notation": [2, { allowKeywords: true }], | ||
// require the use of === and !== | ||
"eqeqeq": 2, | ||
eqeqeq: 2, | ||
// make sure for-in loops have an if statement | ||
@@ -67,3 +67,3 @@ "guard-for-in": 0, | ||
// disallow use of labeled statements | ||
"no-labels": [2, {"allowLoop": true, "allowSwitch": true}], | ||
"no-labels": [2, { allowLoop: true, allowSwitch: true }], | ||
// disallow unnecessary nested blocks | ||
@@ -74,3 +74,3 @@ "no-lone-blocks": 2, | ||
// disallow the use of magic numbers | ||
"no-magic-numbers": [2, {"ignore": [-1, 0, 1]}], | ||
"no-magic-numbers": [2, { ignore: [-1, 0, 1] }], | ||
// disallow use of multiple spaces | ||
@@ -130,3 +130,3 @@ "no-multi-spaces": 2, | ||
// require use of the second argument for parseInt() | ||
"radix": 0, | ||
radix: 0, | ||
// requires to declare all vars on top of their containing scope | ||
@@ -137,4 +137,4 @@ "vars-on-top": 0, | ||
// require or disallow Yoda conditions | ||
"yoda": [2, "never"] | ||
yoda: [2, "never"] | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// disallow trailing commas in object literals | ||
@@ -6,0 +6,0 @@ "comma-dangle": 0, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// disallow trailing commas in object literals | ||
@@ -32,3 +32,3 @@ "comma-dangle": [2, "never"], | ||
// disallow unnecessary parentheses | ||
"no-extra-parens": 2, | ||
"no-extra-parens": 0, | ||
// disallow unnecessary semicolons | ||
@@ -35,0 +35,0 @@ "no-extra-semi": 2, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// require braces in arrow function body | ||
@@ -6,0 +6,0 @@ "arrow-body-style": 0, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// require braces in arrow function body | ||
"arrow-body-style": 0, | ||
// require parens in arrow function arguments | ||
"arrow-parens": 2, | ||
"arrow-parens": [2, "as-needed"], | ||
// require space before/after arrow function's arrow | ||
@@ -10,0 +10,0 @@ "arrow-spacing": 2, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// enforce return after a callback | ||
@@ -6,0 +6,0 @@ "callback-return": 0, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// enforce return after a callback | ||
@@ -6,0 +6,0 @@ "callback-return": 2, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// require that all functions are run in strict mode | ||
"strict": 0 | ||
strict: 0 | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// require that all functions are run in strict mode | ||
"strict": [2, "never"] | ||
strict: [2, "never"] | ||
} | ||
}; |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// enforce spacing inside array brackets | ||
@@ -12,3 +12,3 @@ "array-bracket-spacing": 0, | ||
// require camel case names | ||
"camelcase": 0, | ||
camelcase: 0, | ||
// enforce spacing before and after comma | ||
@@ -35,3 +35,3 @@ "comma-spacing": 0, | ||
// this option sets a specific tab width for your code | ||
"indent": 0, | ||
indent: 0, | ||
// specify whether double or single quotes should be used in JSX attributes | ||
@@ -122,7 +122,7 @@ "jsx-quotes": 0, | ||
// specify whether double or single quotes should be used | ||
"quotes": 0, | ||
quotes: 0, | ||
// Require JSDoc comment | ||
"require-jsdoc": 0, | ||
// require or disallow use of semicolons instead of ASI | ||
"semi": 0, | ||
semi: 0, | ||
// enforce spacing before and after semicolons | ||
@@ -129,0 +129,0 @@ "semi-spacing": 0, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// enforce spacing inside array brackets | ||
@@ -10,5 +10,5 @@ "array-bracket-spacing": 0, | ||
// enforce one true brace style | ||
"brace-style": [2, "1tbs", { "allowSingleLine": true }], | ||
"brace-style": [2, "1tbs", { allowSingleLine: true }], | ||
// require camel case names | ||
"camelcase": 2, | ||
camelcase: 2, | ||
// enforce spacing before and after comma | ||
@@ -35,9 +35,9 @@ "comma-spacing": 2, | ||
// this option sets a specific tab width for your code | ||
"indent": [2, 2], | ||
indent: 0, | ||
// specify whether double or single quotes should be used in JSX attributes | ||
"jsx-quotes": [2, "prefer-double"], | ||
// enforces spacing between keys and values in object literal properties | ||
"key-spacing": [2, { "beforeColon": false, "afterColon": true }], | ||
"key-spacing": [2, { beforeColon: false, afterColon: true }], | ||
// enforce spacing before and after keywords | ||
"keyword-spacing": [2, {"before": true, "after": true}], | ||
"keyword-spacing": [2, { before: true, after: true }], | ||
// disallow mixed "LF" and "CRLF" as linebreaks | ||
@@ -50,3 +50,3 @@ "linebreak-style": [0, "unix"], | ||
// specify the maximum length of a line in your program | ||
"max-len": [2, 100, 2, {"ignoreUrls": true, "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\("}], | ||
"max-len": 0, | ||
// specify the maximum depth callbacks can be nested | ||
@@ -83,3 +83,3 @@ "max-nested-callbacks": [2, 3], | ||
// disallow multiple empty lines | ||
"no-multiple-empty-lines": [2, {"max": 2}], | ||
"no-multiple-empty-lines": [2, { max: 2 }], | ||
// disallow negated conditions | ||
@@ -108,5 +108,5 @@ "no-negated-condition": 0, | ||
// require or disallow padding inside curly braces | ||
"object-curly-spacing": [0, "never"], | ||
// enforce placing object properties on separate lines | ||
"object-property-newline": 0, | ||
"object-curly-spacing": [0, "always"], | ||
// enforce placing object properties on separate lines or all on same line | ||
"object-property-newline": [2, { allowMultiplePropertiesPerLine: true }], | ||
// allow just one var statement per function | ||
@@ -123,11 +123,11 @@ "one-var": [2, "never"], | ||
// require quotes around object literal property names | ||
"quote-props": 0, | ||
"quote-props": [2, "as-needed"], | ||
// specify whether double or single quotes should be used | ||
"quotes": [2, "double"], | ||
quotes: [2, "double", { allowTemplateLiterals: true }], | ||
// Require JSDoc comment | ||
"require-jsdoc": 0, | ||
// require or disallow use of semicolons instead of ASI | ||
"semi": 2, | ||
semi: 2, | ||
// enforce spacing before and after semicolons | ||
"semi-spacing": [2, {"before": false, "after": true}], | ||
"semi-spacing": [2, { before: false, after: true }], | ||
// enforce sorting import declarations within module | ||
@@ -140,3 +140,3 @@ "sort-imports": 0, | ||
// require or disallow space before function opening parenthesis | ||
"space-before-function-paren": [2, {"anonymous": "always", "named": "never" }], | ||
"space-before-function-paren": 0, | ||
// require or disallow spaces inside parentheses | ||
@@ -147,3 +147,3 @@ "space-in-parens": [2, "never"], | ||
// Require or disallow spaces before/after unary operators | ||
"space-unary-ops": [2, { "words": true, "nonwords": false }], | ||
"space-unary-ops": [2, { words: true, nonwords: false }], | ||
// require or disallow a space immediately following the // or /* in a comment | ||
@@ -150,0 +150,0 @@ "spaced-comment": 0, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// enforce or disallow variable initializations at definition | ||
@@ -6,0 +6,0 @@ "init-declarations": 0, |
"use strict"; | ||
module.exports = { | ||
"rules": { | ||
rules: { | ||
// enforce or disallow variable initializations at definition | ||
@@ -26,3 +26,3 @@ "init-declarations": 0, | ||
// disallow declaration of variables that are not used in the code | ||
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}], | ||
"no-unused-vars": [2, { vars: "all", args: "after-used" }], | ||
// disallow use of variables before they are defined | ||
@@ -29,0 +29,0 @@ "no-use-before-define": 2 |
"use strict"; | ||
module.exports = { | ||
"plugins": [ | ||
"filenames" | ||
], | ||
"rules": { | ||
plugins: ["filenames"], | ||
rules: { | ||
// Enforce dash-cased filenames | ||
@@ -9,0 +7,0 @@ "filenames/match-regex": 0, |
"use strict"; | ||
module.exports = { | ||
"plugins": [ | ||
"filenames" | ||
], | ||
"rules": { | ||
plugins: ["filenames"], | ||
rules: { | ||
// Enforce dash-cased filenames | ||
@@ -9,0 +7,0 @@ "filenames/match-regex": [2, "^[a-z0-9\\-\\.]+$", true], |
"use strict"; | ||
module.exports = { | ||
"plugins": [ | ||
"react" | ||
], | ||
"rules": { | ||
plugins: ["react"], | ||
rules: { | ||
// Prevent missing displayName in a React component definition | ||
@@ -9,0 +7,0 @@ "react/display-name": 0, |
"use strict"; | ||
module.exports = { | ||
"plugins": [ | ||
"react" | ||
], | ||
"rules": { | ||
plugins: ["react"], | ||
rules: { | ||
// Prevent missing displayName in a React component definition | ||
@@ -9,0 +7,0 @@ "react/display-name": 0, |
Sorry, the diff of this file is too big to display
162903
1318