Consolidated Babel development dependencies.
The development tools comprise of:
- Linting tools.
- Babel CLI (for building to ES5 from scripts).
Do not reference this library unless you are happy staying in with the babel transpiler plugins used by my modules and other idiomatic decisions that I make.
A single dependency will bring all the standard babel development dependencies:
npm install --D js-babel js-babel-dev
Typically you'll want to keep
js-babel within the
devDependencies, however the core Babel language libs are kept separate from the development tools enabling you to distribute the core language libraries with a module and avoid the extra weight of the linting and CLI tools.
When linting modules with JSX use:
Additional rules for React:
babel-preset-react is not included. Reference the UIHarness for a compact and complete set of UI centric Babel presets.
npm run build npm run build:watch
npm run lint
When evaluating a number of JS styleguides the AirBnB guide was at the top of the list with respect to popularity. This was echoed in the number of stars on the Github repository (~29K at time or writing) compared to the second most popular style guide (ideomatic.js) which sat at ~10k.
Given styleguides are largely about attempting to standardize to the common norms ("code should look like it was authored by one person") unless the most popular option is flat-out insane, I feel the popularist decision has the most payoff.
Furthermore the AirBnB styleguide seemed to have the most up-to-date support for babel plugins to Eslint.
npm install npm test