eslint-config-maptalks
An ESLint config for MapTalks javascript projects
Install
npm install eslint eslint-config-maptalks --save-dev
Then add a following .eslintrc file in the repo root:
"extends": "maptalks"
Usage
CLI
npm install eslint eslint-config-maptalks -geslint src/**/*.js
Simple errors like indentation or quotes can be fixed automatically by
eslint src/**/*.js --fix
With gulp-eslint
var eslint = ;gulp;
In package.json
"scripts": "lint": "eslint src/**/*.js" "pretest": "npm run lint"
Run in terminal and enjoy thousands of errors:
npm run lint
Config
Can be extended by .eslintrc file
extends: 'maptalks' globals: 'Z':true
Credits
based on mourner's eslint-config-mourner