Skip to content

Commit

Permalink
Prepare ESLint compatibility with Webpack
Browse files Browse the repository at this point in the history
To prepare for a better developer experience with Webpack (that will be
used later on through Gatsby) the resolvers of the
eslint-plugin-import (1) have been configured for the `src` and
`src/components` paths.

References:

  (1) https://github.com/benmosher/eslint-plugin-import#resolvers

GH-15
  • Loading branch information
arcticicestudio committed Nov 17, 2018
1 parent 23c2d25 commit 4dd1095
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,22 @@
* @see https://github.com/tc39/proposal-optional-chaining
*/

const { resolve } = require("path");

module.exports = {
extends: "arcticicestudio",
env: {
browser: true,
node: true
},
settings: {
"import/resolver": {
node: {
/* Resolve Webpack alias imports */
paths: [resolve(__dirname, "src"), resolve(__dirname, "src/components")]
}
}
},
rules: {
"no-confusing-arrow": "off",
/* Suppress errors when importing development dependencies */
Expand Down

0 comments on commit 4dd1095

Please sign in to comment.