Fix module resolution for eslint

This commit is contained in:
Timothy Warren 2018-05-09 09:06:37 -04:00
parent b538bb3971
commit b1b15b1d46
6 changed files with 30 additions and 14 deletions

View File

@ -27,7 +27,7 @@
"properties": "never" "properties": "never"
}], }],
"comma-dangle": ["error", "always-multiline"], "comma-dangle": ["error", "always-multiline"],
"import/extensions": "off", "import/extensions": "on",
"import/no-extraneous-dependencies": "off", "import/no-extraneous-dependencies": "off",
"import/no-unresolved": [2, { "ignore": ["electron"] }], "import/no-unresolved": [2, { "ignore": ["electron"] }],
"jsx-quotes": ["error", "prefer-double"], "jsx-quotes": ["error", "prefer-double"],
@ -82,5 +82,10 @@
"require-await": "error", "require-await": "error",
"sort-keys": ["error", "asc", {"caseSensitive": true, "natural": true}], "sort-keys": ["error", "asc", {"caseSensitive": true, "natural": true}],
"yoda": ["error", "never"] "yoda": ["error", "never"]
},
"settings": {
"import/resolver": {
"babel-module": {}
}
} }
} }

View File

@ -11,19 +11,22 @@ clean:
clean-all: clean clean-all: clean
rm -rf ./node_modules rm -rf ./node_modules
node_modules:
yarn --ignore-engines
electron-start: node_modules electron-start: node_modules
yarn electron-start yarn electron-start
inferno-start: node_modules
yarn inferno-start
react-start: node_modules
yarn inferno-start
fix: node_modules fix: node_modules
yarn fix yarn fix
.PHONY: all clean fix electron-start react-start inferno-start: node_modules
yarn inferno-start
lint: node_modules
yarn lint
node_modules:
yarn --ignore-engines
react-start: node_modules
yarn inferno-start
.PHONY: all clean electron-start fix lint react-start

View File

@ -33,6 +33,7 @@
"eslint": "^4.19.1", "eslint": "^4.19.1",
"eslint-config-happiness": "^10.2.1", "eslint-config-happiness": "^10.2.1",
"eslint-config-inferno-app": "^6.2.0", "eslint-config-inferno-app": "^6.2.0",
"eslint-import-resolver-babel-module": "^4.0.0",
"eslint-loader": "2.0.0", "eslint-loader": "2.0.0",
"eslint-plugin-flowtype": "^2.46.3", "eslint-plugin-flowtype": "^2.46.3",
"eslint-plugin-import": "^2.10.0", "eslint-plugin-import": "^2.10.0",

View File

@ -1,8 +1,8 @@
import { render } from 'inferno'; import { render } from 'inferno';
import { Provider } from 'inferno-redux'; import { Provider } from 'inferno-redux';
import configureStore from '//configureStore'; import configureStore from './configureStore';
import { App } from '//App'; import { App } from './App';
const store = configureStore(); const store = configureStore();

View File

@ -37,7 +37,7 @@ export class HomeView extends Component {
draggedFiles.push(f.path); draggedFiles.push(f.path);
} }
let newTransfer = { ...e.dataTransfer }; const newTransfer = { ...e.dataTransfer };
console.info(newTransfer); console.info(newTransfer);
window.clientWS.send(JSONMessage('dropped-files', draggedFiles)); window.clientWS.send(JSONMessage('dropped-files', draggedFiles));

View File

@ -2494,6 +2494,13 @@ eslint-config-inferno-app@^6.2.0:
eslint-plugin-inferno "^7.7.0" eslint-plugin-inferno "^7.7.0"
eslint-plugin-jsx-a11y "^6.0.3" eslint-plugin-jsx-a11y "^6.0.3"
eslint-import-resolver-babel-module@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-4.0.0.tgz#1c596f7fb9815050292c8750d523b27a5444b4bf"
dependencies:
pkg-up "^2.0.0"
resolve "^1.4.0"
eslint-import-resolver-node@^0.3.1: eslint-import-resolver-node@^0.3.1:
version "0.3.2" version "0.3.2"
resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"