parcel-plugin-eslint icon indicating copy to clipboard operation
parcel-plugin-eslint copied to clipboard

Cannot read property 'length' of null

Open nwa2018 opened this issue 6 years ago • 1 comments

"babel-eslint": "^8.2.5",
"eslint": "^5.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"parcel-plugin-eslint": "^1.0.4"

this is my package.json,when I run parcel ./index.js,I'am blocked by the below error

/Users/fujuewen/private/github/myLodash/index.js: Cannot read property 'length' of null at /Users/fujuewen/private/github/myLodash/node_modules/parcel-plugin-eslint/node_modules/eslint-friendly-formatter/index.js:184:74 at Array.reduce () at module.exports (/Users/fujuewen/private/github/myLodash/node_modules/parcel-plugin-eslint/node_modules/eslint-friendly-formatter/index.js:160:17) at MyAsset.load (/Users/fujuewen/private/github/myLodash/node_modules/parcel-plugin-eslint/src/EslintAsset.js:22:23) at

nwa2018 avatar Jun 27 '18 08:06 nwa2018

@nwa2018

  1. add to your eslintrc 'parser' : 'babel-eslint' example my file .eslintrc.js
module.exports = {
  'extends' : 'standard',
  'parser'  : 'babel-eslint'
};
  1. check thant your .babelrc have valid json syntax.

This steps fix my some problem

alexstep avatar Aug 27 '18 14:08 alexstep