@beblueapp/eslint-config-base
v0.1.0
Published
Beblue's base JS ESLint config, following our styleguide
Downloads
2
Readme
@beblueapp/eslint-config-base
This package provides Beblue's base JS .eslintrc (without React plugins) as an extensible shared config.
Usage
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint
, eslint-config-standard
, eslint-plugin-import
, eslint-plugin-node
, eslint-plugin-promise
and eslint-plugin-standard
.
- Install the correct versions of each package, which are listed by the command:
npx install-peerdeps --dev @beblueapp/eslint-config-base
If using yarn, you can also use the shortcut described above if you have npm 5+ installed on your machine, as the command will detect that you are using yarn and will act accordingly.
Otherwise, run npm info "@beblueapp/eslint-config-base@latest" peerDependencies
to list the peer dependencies and versions, then run yarn add --dev <dependency>@<version>
for each listed peer dependency.
If using npm < 5, users can run (for Yarn just change npm install --save-dev
to yarn add -D
)
(
export PKG='@beblueapp/eslint-config-base';
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
Which produces and runs a command like:
npm install --save-dev @beblueapp/eslint-config-base 'eslint@^#.#.#' 'eslint-plugin-import@^#.#.#'
- Add
"extends": "@beblueapp/eslint-config-base"
to your .eslintrc.