An ESLint configuration specific for Roc projects integrating with eslint-plugin-import
.
$ npm install --save-dev eslint-config-roc
Addresses two rules that might be problematic when using Roc together with eslint-plugin-import
, used by the very propular eslint-config-airbnb
and eslint-config-airbnb-base
.
no-unresolved
no-extraneous-dependencies
Add "extends": "roc"
to your .eslintrc
Example
{
"extends": [
"airbnb",
"roc"
]
}
Used here together with eslint-config-airbnb
.
This configuration uses import/core-modules
internally to work around a missing feature in eslint-plugin-import
, see eslint-plugin-import#479 for more information.
This means that if a project or a configuration uses this configuratiuon the projects will need to manually add Roc's core-modules
.
This can be done using eslint-config-roc/core-modules
that exports an array of core modules that Roc uses to avoid false warnings about no-extraneous-dependencies
. Another alternative is to turn of that rule altogether.