brackets-userland / brackets-eslint

Adds ESLint support to Brackets
MIT License
43 stars 15 forks source link

ESLint terminated with an error: [object Object] #55

Closed sudheeshcm closed 7 years ago

sudheeshcm commented 7 years ago

Similar issue - https://github.com/zaggino/brackets-eslint/issues/50

I've created a sample redux-node-app, where I have this issue with brackets editor. Gulp task for eslint works. eslint command line works. npm run lint ("lint": "eslint . --ext .js,.jsx") works.

"devDependencies": {
    "eslint": "^3.15.0",
    "eslint-config-airbnb": "^14.1.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jsx-a11y": "^4.0.0",
    "eslint-plugin-react": "^6.10.0",
    "gulp-eslint": "^3.0.1"
  }
apples-MacBook-Pro:server Sudheesh$ npm ls -g --depth=0
/usr/local/lib
├── eslint@3.15.0
├── eslint-config-airbnb@14.1.0
├── eslint-plugin-import@2.2.0
├── eslint-plugin-jsx-a11y@4.0.0
├── eslint-plugin-react@6.10.0
├── gulp@3.9.1
├── latest@0.2.0
├── npm@3.10.9
└── pm2@2.4.0
apples-MacBook-Pro:server Sudheesh$ npm ls --depth=0
redux-node-app-server@1.0.0 /Users/sudheesh/Development/Learn/redux-node-app/server
├── eslint@3.15.0
├── eslint-config-airbnb@14.1.0
├── eslint-plugin-import@2.2.0
├── eslint-plugin-jsx-a11y@4.0.0
├── eslint-plugin-react@6.10.0
├── express@4.14.1
├── gulp@3.9.1
├── gulp-babel@6.1.2
├── gulp-eslint@3.0.1
├── gulp-nodemon@2.2.1
└── node-config-manager@1.2.0

Brackets version: 1.8 build 1.8.0-17108 Node: v6.9.2

apples-MacBook-Pro:server Sudheesh$ npm run lint

> redux-node-app-server@1.0.0 lint /Users/sudheesh/Development/Learn/redux-node-app/server
> eslint . --ext .js,.jsx

/Users/sudheesh/Development/Learn/redux-node-app/server/main.js
   8:27  error  Unable to resolve path to module './lib/util/configManager'  import/no-unresolved
   8:27  error  Missing file extension for "./lib/util/configManager"        import/extensions
   9:21  error  Absolute imports should come before relative imports         import/first
  11:17  error  Unable to resolve path to module './lib/util/logger'         import/no-unresolved
  11:17  error  Missing file extension for "./lib/util/logger"               import/extensions
  15:1   error  Split 'const' declarations into multiple statements          one-var
  21:9   error  'host' is already declared in the upper scope                no-shadow
  22:9   error  'port' is already declared in the upper scope                no-shadow

✖ 8 problems (8 errors, 0 warnings)

npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "lint"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! redux-node-app-server@1.0.0 lint: `eslint . --ext .js,.jsx`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the redux-node-app-server@1.0.0 lint script 'eslint . --ext .js,.jsx'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redux-node-app-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint . --ext .js,.jsx
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redux-node-app-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redux-node-app-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sudheesh/Development/Learn/redux-node-app/server/npm-debug.log

Not sure why I get those npm errors in the end.

Thanks, Sudheesh CM

sudheeshcm commented 7 years ago

Tried with the following versions too. Still issue exists.

apples-MacBook-Pro:server Sudheesh$ npm ls --depth=0
redux-node-app-server@1.0.0 /Users/sudheesh/Development/Learn/redux-node-app/server
├── eslint@3.10.2
├── eslint-config-airbnb@13.0.0
├── eslint-plugin-import@2.2.0
├── eslint-plugin-jsx-a11y@2.2.3
├── eslint-plugin-react@6.10.0
├── express@4.14.1
├── gulp@3.9.1
├── gulp-babel@6.1.2
├── gulp-eslint@3.0.1
├── gulp-nodemon@2.2.1
└── node-config-manager@1.2.0
zaggino commented 7 years ago

Can you upload your app to github so I can clone it and replicate the issue?

sudheeshcm commented 7 years ago

Sure. I've just started development. You can find this issue in the server code. https://github.com/sudheeshcm/redux-node-app/tree/development

zaggino commented 7 years ago

Hi, I cloned your repo and opened it in brackets with brackets-eslint without any problems:

image