EQuimper / eslint-config-equimper

Eslint-Configuration with easy install + es6-es7
https://www.npmjs.com/package/eslint-config-equimper
20 stars 5 forks source link

[Error]: Cannot find module './rules/best-practices' #1

Closed rockchalkwushock closed 7 years ago

rockchalkwushock commented 7 years ago

I am receiving the following error message:

Error: Cannot read config file: /Users/codybrunner/Desktop/photography-frontend/node_modules/eslint-config-equimper/index.js Error: Cannot find module './rules/best-practices' Referenced from: /Users/codybrunner/Desktop/photography-frontend/.eslintrc
Error: Cannot read config file: /Users/codybrunner/Desktop/photography-frontend/node_modules/eslint-config-equimper/index.js
Error: Cannot find module './rules/best-practices'
Referenced from: /Users/codybrunner/Desktop/photography-frontend/.eslintrc
    at Function.Module._resolveFilename (module.js:455:15)
    at resolve (internal/module.js:27:19)
    at Array.map (native)
    at Object.<anonymous> (/Users/codybrunner/Desktop/photography-frontend/node_modules/eslint-config-equimper/index.js:13:5)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)

As I'm understanding it looking at the index.js to the module by accessing "extends": "equimper" I am basically getting the eslint config from index.js. The error message is showing that the .map() is failing at the ./rules/best-practices. I'm not quite sure what the require.reslolve is doing so I can't deduce much more from this point.

Is eslint & babel-eslint required as dev-deps in the project directory? I would think not since they are built into your package as dependencies. I have tried removing & adding again, but still get this error. I'm also wondering if the .eslintrc needs to be set up with more than just the "extends" property.

Below are my .eslintrc & package.json:

.eslintrc

{
  "extends": "equimper"
}

package.json

  "dependencies": {
    "next": "^2.0.0-beta",
    "react": "^15.4.2"
  },
  "devDependencies": {
    "eslint-config-equimper": "^1.0.8"
  }

A link to the repository I'm using your package in can be found here.

EQuimper commented 7 years ago

Thank this is fixed in version 1.1.0