From 15d0a76662e2488906640d443486e5c3c53d0d40 Mon Sep 17 00:00:00 2001 From: Jonathan Zobro Date: Tue, 26 Sep 2017 02:51:10 +0700 Subject: [PATCH] feature(eslint-resolve-paths-from-app-dir): use 'app' path as default for imports --- .eslintrc | 3 +++ app/routes/app/components/components/Nav.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 8c55168e..7fc74a63 100644 --- a/.eslintrc +++ b/.eslintrc @@ -34,6 +34,9 @@ ], "settings": { "import/resolver": { + "node": { + "paths": ["app"] + }, "webpack": { "config": "webpack.config.eslint.js" } diff --git a/app/routes/app/components/components/Nav.js b/app/routes/app/components/components/Nav.js index 3a38c862..c55148ca 100644 --- a/app/routes/app/components/components/Nav.js +++ b/app/routes/app/components/components/Nav.js @@ -4,9 +4,9 @@ import { NavLink } from 'react-router-dom' import ReactSVG from 'react-svg' import { MdAccountBalanceWallet } from 'react-icons/lib/md' import { FaClockO, FaDollar } from 'react-icons/lib/fa' -import CryptoIcon from '../../../../components/CryptoIcon' -import CurrencyIcon from '../../../../components/CurrencyIcon' -import { btc, usd } from '../../../../utils' +import CryptoIcon from 'components/CryptoIcon' +import CurrencyIcon from 'components/CurrencyIcon' +import { btc, usd } from 'utils' import styles from './Nav.scss' const Nav = ({ ticker, balance, setCurrency, formClicked, currentTicker }) => (