Skip to content
This repository was archived by the owner on Jan 28, 2020. It is now read-only.

Latest commit

 

History

History
108 lines (82 loc) · 3.87 KB

File metadata and controls

108 lines (82 loc) · 3.87 KB

Contributing 💯 👍 💛

Before contributing, please read our code of conduct

Contributions are always welcome, no matter how large or small 😃

✅ Meet requirements

  • Node.js 6+, latest LTS recommended
  • Although everything is transpiled via Babel, entry points (webpack, react-storybook) uses ES2015 features
  • npm, which comes with Node.js
  • A text editor or an IDE

👮 Follow the rules

This project is following the JavaScript Standard Style. Linting is already configured to run on project scope, so you don’t need to have globals package installed.

Aside from this code style, you’ll have to follow a small set of simple rules:

  • Use camelCase for variables
  • Use PascalCase for React component names
  • Use PascalCase for React component files
  • Use param-case for other files
  • Destructured props must be ordered alphabetically
  • imports and exports keys must be ordered alphabetically
  • imports are top-level (beginning of file) and must be ordered alphabetically by package name
  • exports are low-level (end of file), use default export as often as possible
  • For pure components, always use destructuring for props you need and rest for other props to dispatch (eg: const a = ({ props, i, need, ...rest }) => {})
  • Always PR on the dev branch.
  • If your PR fixes a bug, name it Fixed #insert_bug_number.
  • Use scoped commit (eg: one commit per component changed) and

If you don’t follow those rules, your PRs won’t be merged until you’ve done needed changes to your code.

🔎 Understand the structure

.
├── .storybook                      #  react-storybook config files
│   ├── config.js                   #    load stories
│   └── webpack.config.js           #    custom webpack config
├── lib                             #  build folder
│   ├── react-be-blaze.min.js       #    builded lib, package main entry
│   └── react-be-blaze.min.js.map   #    sourcemap
├── src                             #  source folder
│   ├── components                  #    blaze components
│   ├── misc                        #    miscellaneous
│   ├── objects                     #    blaze objects
│   ├── utilities                   #    blaze utilities
│   └── index.js                    #    lib main entry point, build main entry
├── stories                         #  stories of react-be-blaze (WIP)
│   ├── components                  #    blaze components stories
│   ├── index.js                    #    react-storybook main entry point
│   └── style.css                   #    stories global style
├── .eslintrc                       #
├── .gitignore                      #
├── .travis.yml                     #
├── CODE_OF_CONDUCT.md              #
├── CONTRIBUTING.md                 #  this
├── LICENSE                         #
├── package.json                    #
├── README.md                       #
└── webpack.config.js               #  main webpack config

:shipit: Get the source code

$ git clone git@github.com:g-script/react-be-blaze.git
$ cd react-be-blaze
$ npm install

😶 Check the code style

$ npm run lint

Lint is ran without eslint autofix, you can run it via:

$ npm run lint:fix

😰 Test everything

$ npm test

Currently, there is no tests at all.

I’m planning on doing some, but if you want to start without me, go ahead, I won’t blame you! 😉

😎 Build all the things

$ npm run build

Building lib will lint and test the code first.

😈 Pray for the merge