filestack-react icon indicating copy to clipboard operation
filestack-react copied to clipboard

Contribution page docs

Open mpoisot opened this issue 5 years ago • 2 comments

For #101

mpoisot avatar Oct 19 '20 21:10 mpoisot

I noticed npm run lint won't run using just the instructions in CONTRIBUTING.md. I think a dependency is missing.

▶ npm run lint

> [email protected] lint /Users/marcel/Documents/code/tmp/filestack-react
> eslint src/**/*.js src/**/*.jsx tests/**/*spec.js && tsc --noEmit


Oops! Something went wrong! :(

ESLint: 7.5.0

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/Users/marcel/Documents/code/tmp/filestack-react/.eslintrc".

If you still have problems, please stop by https://eslint.org/chat to chat with the team.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] lint: `eslint src/**/*.js src/**/*.jsx tests/**/*spec.js && tsc --noEmit`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marcel/.npm/_logs/2020-10-19T21_15_40_508Z-debug.log

mpoisot avatar Oct 19 '20 21:10 mpoisot

I figured it out, eslint-config-prettier is missing. Should I go ahead and add that to devDependencies as part of this PR? I hesitate because it pulls in a few other libs, I see a ton of warnings about peer dependencies, and it looks like eslint warns on the existing code.

▶ npm run lint                            

> [email protected] lint /Users/marcel/Documents/code/tmp/filestack-react
> eslint src/**/*.js src/**/*.jsx tests/**/*spec.js && tsc --noEmit


/Users/marcel/Documents/code/tmp/filestack-react/src/ReactFilestack.jsx
   6:3  error  'defaultProps' should be declared outside the class body  react/static-property-placement
  22:3  error  'propTypes' should be declared outside the class body     react/static-property-placement

/Users/marcel/Documents/code/tmp/filestack-react/tests/components/ReactFilestack.spec.js
  47:21  error  Prop spreading is forbidden  react/jsx-props-no-spreading

mpoisot avatar Oct 19 '20 21:10 mpoisot