Boilerplate for new projects using NPM.
I avoid other boilerplates such as create-react-app when possible. When something inevitably breaks, it's hard to know why and I am left none-the-wiser.
React support is pre-wired in the configuration for Babel, ESLint, and Jest but not included as a dependency. The aim is to be compatible with both React and non-React projects.
- Used for transpiling from ES20xx into ES5/6.
- Used as transpiler for TypeScript with babel-plugin-transform-typescript and @babel/eslint-parser.
- Using presets for react and typescript.
- Using
eslint:recommended
, along with AirBnB rules. - Using most plugins recommended in community configs.
- ESLint assumes a browser environment with ES6, not a node or web extension environment. Modify
.eslintrc.js
for other environments.
- Latest ESLint plugins for TypeScript:
@typescript-eslint/eslint-plugin
@typescript-eslint/parser
- Using Jest
- Support for TypeScript tests.
- ESLint validation using
plugin:jest/recommended