filestack / filestack-react

Official React component for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
MIT License
164 stars 40 forks source link

Contribution page docs #102

Open mpoisot opened 3 years ago

mpoisot commented 3 years ago

For #101

mpoisot commented 3 years ago

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

▶ npm run lint

> filestack-react@3.2.0 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! filestack-react@3.2.0 lint: `eslint src/**/*.js src/**/*.jsx tests/**/*spec.js && tsc --noEmit`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the filestack-react@3.2.0 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 commented 3 years ago

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                            

> filestack-react@3.2.0 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