ESLint shareable config for the Cantonjs, with import/resolver
$ npm install --save-dev eslint eslint-config-cantonjs-resolver
You may also need to add babel-plugin-module-resolver and webpack
Once the eslint-config-cantonjs-resolver
package is installed, you can use it by specifying cantonjs-resolver
in the extends
section of your ESLint configuration.
{
"extends": "cantonjs-resolver",
"rules": {
// Additional, per-project rules...
}
}
Note You may also need to config babel-plugin-module-resolver and webpack resolve to make resolvers work
extends: "cantonjs-resolver"
eslint-config-cantonjs + import/resolverextends: "cantonjs-resolver/base"
the same withextends: "cantonjs-resolver"
extends: "cantonjs-resolver/react-resolve"
base
+react
+ import/resolver
MIT © Cantonjs