eslint-config-distributed-lab
v1.3.0
Published
Shared eslint config for Distributed Lab projects.
Downloads
196
Readme
Overview
This is a shared eslint config based on JS standard code style.
How to add it to your project
Add dev dependencies
npm i -D eslint eslint-config-distributed-lab eslint-plugin-chai-friendly eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard eslint-config-standard babel-eslint
Additional plugins for Vue.js:
npm i -D eslint-plugin-vue@next
Add
eslintrc.js
config to root of your projectmodule.exports = { extends: 'distributed-lab', parserOptions: {}, env: {}, plugins: [], rules: {} }
Available configurations:
- distributed-lab - basic config
- distributed-lab/node - for node.js packages and servers
- distributed-lab/vue - for Vue.js apps
Add the npm script to your
package.json
.For node.js:
{ // ... "scripts": { //... "lint": "eslint src --cache --fix" } }
For Vue.js:
{ // ... "scripts": { //... "lint": "eslint '{src,specs}/**/*.{js,vue}' --fix" // src and specs are directories that you want to lint } }
Run the linter
npm run lint