Package Exports
- @shm-open/eslint-config-bundle
- @shm-open/eslint-config-bundle/base.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shm-open/eslint-config-bundle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ESLint Config Bundle 
ESLint + config bundle based on Airbnb's config, with TypeScript and Prettier support
Why config bundle
It includes both ESLint + plugins and config files inside this bundle all together. We known that common practice is only ship the config files (like eslint-config-airbnb
), but we found config and plugins are always tied to some ESLint version and the compatiliby between ESLint, plugins and config is hard to maintain in client projects, therefore we create this bundle to help - includes ESLint + plugins + config, all shipped with fixed version.
Install
EditorConfig is recommended to use together with this bundle, it helps with basic editor config that can work with Prettier such as the indent_size
(which we didn't put into the Prettier config to leave it to EditorConfig)
Install the bundle package as a dev dependency
$ npm install @shm-open/eslint-config-bundle --save-dev
Create .eslintrc.js, .prettierrc.js under project root
Note: you may need change to .cjs
ext if current project type is module
- .prettierrc.js
module.exports = require('@shm-open/eslint-config-bundle/prettier');
- .eslintrc.js - basic ts/js projects
module.exports = {
extends: ['@shm-open/eslint-config-bundle']
}
- .eslintrc.js - React projects
module.exports = {
extends: ['@shm-open/eslint-config-bundle/react']
}
- .eslintrc.js - React Native projects
module.exports = {
extends: ['@shm-open/eslint-config-bundle/react-native']
}
- .eslintrc.js - Taro projects
module.exports = {
extends: ['@shm-open/eslint-config-bundle/taro']
}