Releases: asd-xiv/eslint-config
Releases · asd-xiv/eslint-config
2.8.0 ESLint 4.7 & others
Updated main packages (eslint
& flow-bin
) & others that kept up with eslint 4.7 update
Changed
2.7.1 flowtype-errors
Added
- New
eslint-plugin-flowtype-errors
to the flow config. It runs flow and passes the errors as linting error.
Changed
prefer-destructuring
- set rule to warn and disabled for objects (was a nuisance)- Removed
jest
from frontend bundle. Need to include it separately
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
2.5.1 Object Expression & Pattern
Changed
Updated rules/style.js
:
- changed
object-curly-newline
- added
object-property-newline
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
Added eslint-plugin-compat
to show browser compatibility (using caniuse) of certain functionalities, ex. fetch
.
Added
eslint-plugin-compat
with rules in/rules/compat.js
Changed
- Turn off
react/require-optimization
. Better put these kind of rules in your project's.eslintrc
2.4.0 - React support
Added
eslint-plugin-react
with recommended rules in/rules/react.js
2.3.2 - Update ESLint 4.2
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"
- Defined in
Changed
-
ESLint 4.2 allows
no-sync
using sync methods on top level.- Defined in
node.js
- Current value:
"no-sync": [ "error", { allowAtRootLevel: true, }, ],
- Defined in
-
no-unexpected-multiline
to protect against edge cases of not using semicolons- Defined in
error.js
: - Current value:
"no-unexpected-multiline": "error"
- Defined in