Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-maptalks

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-maptalks

An ESLint config for MapTalks javascript projects

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
Maintainers
1
Weekly downloads
 
Created
Source

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 -g
eslint src/**/*.js

Simple errors like indentation or quotes can be fixed automatically by

eslint src/**/*.js --fix

With gulp-eslint

var eslint = require('gulp-eslint');
gulp.task('lint', function() {
  gulp.src('src/**/*.js')
      //the parameter of eslint is optional
      //used to override the default rules
      .pipe(eslint({
          extends: 'maptalks',
          globals: {
              'Z':true
          }
      }))
      .pipe(eslint.format())
      .pipe(eslint.failAfterError())
});

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

Keywords

FAQs

Package last updated on 03 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc