Skip to content

Commit 2b8ef1b

Browse files
author
Kristofer Sommestad
committed
Merge pull request #5 from Springworks/chore/update-eslint
Update eslint to 0.23.0
2 parents 67e1950 + 6b42d5d commit 2b8ef1b

File tree

3 files changed

+16
-33
lines changed

3 files changed

+16
-33
lines changed

babel.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ module.exports = {
2424
"no-var": 1,
2525

2626
// require method and property shorthand syntax for object literals (off by default)
27-
"object-shorthand": [1, "always"]
27+
"object-shorthand": [1, "always"],
28+
29+
// suggest using of const declaration for variables that are never modified after declared (off by default)
30+
"prefer-const": 1
2831

2932
}
3033
};

index.js

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
"no-extra-boolean-cast": 2,
5151

5252
// disallow unnecessary parentheses (off by default)
53-
"no-extra-parens": 1,
53+
"no-extra-parens": 2,
5454

5555
// disallow unnecessary semicolons
5656
"no-extra-semi": 2,
@@ -210,7 +210,7 @@ module.exports = {
210210
"no-octal-escape": 2,
211211

212212
// disallow reassignment of function parameters (off by default)
213-
"no-param-reassign": 1,
213+
"no-param-reassign": 2,
214214

215215
// disallow use of process.env (off by default)
216216
"no-process-env": 0,
@@ -337,7 +337,7 @@ module.exports = {
337337
*/
338338

339339
// this option sets a specific tab width for your code (off by default)
340-
"indent": [1, 2, {"indentSwitchCase": true}],
340+
"indent": [2, 2, {"indentSwitchCase": true}],
341341

342342
// enforce one true brace style (off by default)
343343
"brace-style": [2, "stroustrup"],
@@ -357,6 +357,9 @@ module.exports = {
357357
// enforce one true comma style (off by default)
358358
"comma-style": [2, "last"],
359359

360+
// require or disallow padding inside computed properties (off by default)
361+
"computed-property-spacing": [2, "never"],
362+
360363
// enforces consistent naming when capturing the current execution context (off by default)
361364
"consistent-this": [1, "self"],
362365

@@ -406,7 +409,7 @@ module.exports = {
406409
"new-parens": 2,
407410

408411
// allow/disallow an empty newline after var statement (off by default)
409-
"newline-after-var": [0, "always"],
412+
"newline-after-var": [1, "always"],
410413

411414
// disallow use of the Array constructor
412415
"no-array-constructor": 2,
@@ -447,11 +450,8 @@ module.exports = {
447450
// disallow the use of Boolean literals in conditional expressions (off by default)
448451
"no-unneeded-ternary": 2,
449452

450-
// disallow wrapping of non-IIFE statements in parens
451-
"no-wrap-func": 2,
452-
453453
// require or disallow padding inside curly braces (off by default)
454-
"object-curly-spacing": [1, "always"],
454+
"object-curly-spacing": [2, "always"],
455455

456456
// allow just one var statement per function (off by default)
457457
"one-var": 0,
@@ -463,7 +463,7 @@ module.exports = {
463463
"operator-linebreak": [2, "after"],
464464

465465
// enforce padding within blocks (off by default)
466-
"padded-blocks": [1, "never"],
466+
"padded-blocks": [2, "never"],
467467

468468
// require quotes around object literal property names (off by default)
469469
"quote-props": [2, "as-needed"],
@@ -495,26 +495,6 @@ module.exports = {
495495
// require or disallow space before function opening parenthesis (off by default)
496496
"space-before-function-paren": [2, "never"],
497497

498-
// require or disallow spaces inside brackets (off by default)
499-
"space-in-brackets": [
500-
0,
501-
"never",
502-
{
503-
// sets the spacing of a single value inside of square brackets of an array
504-
"singleValue": false,
505-
// sets the spacings between the curly braces and square brackets of object literals that are the first or last element in an array
506-
"objectsInArrays": false,
507-
// sets the spacing between the square brackets of array literals that are the first or last element in an array
508-
"arraysInArrays": false,
509-
// sets the spacing between the square bracket and the curly brace of an array literal that is the last element in an object
510-
"arraysInObjects": false,
511-
// sets the spacing between the curly brace of an object literal that is the last element in an object and the curly brace of the containing object
512-
"objectsInObjects": true,
513-
// sets the spacing in square brackets of computed member expressions
514-
"propertyName": false
515-
}
516-
],
517-
518498
// require or disallow spaces inside parentheses (off by default)
519499
"space-in-parens": [2, "never"],
520500

@@ -527,8 +507,8 @@ module.exports = {
527507
// Require or disallow spaces before/after unary operators (words on by default, nonwords off by default)
528508
"space-unary-ops": 2,
529509

530-
// require or disallow a space immediately following the // in a line comment (off by default)
531-
"spaced-line-comment": [1, "always"],
510+
// require or disallow a space immediately following the // or /* in a comment (off by default)
511+
"spaced-comment": [1, "always"],
532512

533513
// require regex literals to be wrapped in parentheses (off by default)
534514
"wrap-regex": 1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "Springworks",
77
"license": "MIT",
88
"peerDependencies": {
9-
"eslint": ">=0.22.1 <1.0.0",
9+
"eslint": ">=0.23.0 <1.0.0",
1010
"eslint-plugin-mocha": ">=0.2.2 <1.0.0"
1111
},
1212
"keywords": [

0 commit comments

Comments
 (0)