Skip to content

Releases: asd-xiv/eslint-config

2.8.0 ESLint 4.7 & others

18 Sep 12:39
Compare
Choose a tag to compare

Updated main packages (eslint & flow-bin) & others that kept up with eslint 4.7 update

Changed

2.7.1 flowtype-errors

03 Aug 22:49
Compare
Choose a tag to compare

Added

Changed

2.6.0 ESLint 4.3 & Jest

22 Jul 22:41
Compare
Choose a tag to compare

Updated to ESLint 4.3 and added support for Jest testing framework.

Added

  • Plugin eslint-plugin-jest with rules in /rules/jest.js and part of frontend
  • ESLint rule prefer-numeric-literals: Disllow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
    • Defined in errors.js
    • Current value: "prefer-numeric-literals": "error"
  • ESLint rule prefer-destructuring: Prefer destructuring from arrays and objects.
    • Defined in variables.js
    • Current value:
      "prefer-destructuring": [
          "error", {
              object: true,
              array : true,
          }, {
              enforceForRenamedProperties: true,
          },
      ],
    • Sample:
      const array = [ 1,2,3,4,5 ]
      const lorem = {
          bar: "ipsum",
          foo: "dolor",
      }
      
      // const someIndex = 2
      // const foo = array[ someIndex ]
      const [ ,,foo ] = array
      
      // const bar = lorem.bar
      let { bar } = lorem;
      
      ( { bar } = {
          bar: 2,
          foo: 3,
      } );
      
      ( { foo: bar } = lorem )

2.5.1 Object Expression & Pattern

21 Jul 09:40
Compare
Choose a tag to compare

Changed

Updated rules/style.js:

Needed to satisfy:

const a = { }
const obj = {
    foo: "foo",
    bar: "bar",
    baz: "baz",
}
let {} = obj
const obj2 = {
    foo: "foo",
    bar: "bar",
    baz: "baz",
}
const { f } = obj
const { g, h } = obj
const {
    i,
    j,
} = obj
const e = {
    foo( { x, y } ) {
        dosomething()
    },
}
const h = ( opt = {} ) => ( {
    x: 2,
    y: opt,
} )

2.5.0 ESlint compat

16 Jul 18:15
Compare
Choose a tag to compare

Added eslint-plugin-compat to show browser compatibility (using caniuse) of certain functionalities, ex. fetch.

Added

Changed

  • Turn off react/require-optimization. Better put these kind of rules in your project's .eslintrc

2.4.0 - React support

13 Jul 19:02
Compare
Choose a tag to compare

Added

2.3.2 - Update ESLint 4.2

11 Jul 09:50
Compare
Choose a tag to compare

Added

  • ESLint 4.2: new rule getter-return - Enforces that a return statement is present in property getters.
    • Defined in error.js
    • Current value: "getter-return": "error"

Changed

  • ESLint 4.2 allows no-sync using sync methods on top level.

    • Defined in node.js
    • Current value:
    "no-sync": [
        "error", {
            allowAtRootLevel: true,
        },
    ],
  • no-unexpected-multiline to protect against edge cases of not using semicolons

    • Defined in error.js:
    • Current value: "no-unexpected-multiline": "error"