2.6.0 ESLint 4.3 & Jest
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 offrontend
- 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"
- Defined in
- 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 )
- Defined in