Replace lodash methods with ES6
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-lodash-to-native
:
$ npm install github:unicornshade/eslint-plugin-lodash-to-native --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-lodash-to-native
globally.
Add lodash-to-native
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"lodash-to-native"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"lodash-to-native/map": 2
}
}
- map — checks
_.map
method and fixes it with nativeArray.prototype.map
if can
To run tests run command
$ npm run tests