Git Product home page Git Product logo

linter-js-standard's Introduction

linter-js-standard

js-standard-style

This plugin for Linter provides an interface for error/warning messages from standard, semistandard or happiness.

demo

Installation

Linter package must be installed in order to use this plugin. If Linter is not installed, please follow the instructions here.

Plugin installation

$ apm install linter-js-standard

Features

  • Support standard, semistandard and happiness styles.
  • Support ignore glob patterns in package.json.
  • Support custom parsers in package.json.
  • Support global variables in package.json (supported by standard and semistandard)
  • Support fenced code lint in markdown files

Custom parsers currently supported:

  • esprima
  • esprima-fb
  • babel-eslint

Note: If a custom parser is missing from this list please make a PR by adding the missing parser to package.json dependencies.

Settings

checkStyleDevDependencies (default: false)

Check code style in package.json devDependencies or dependencies. If a valid style is not found it won't lint.

Note: This will use the nearest package.json.

honorStyleSettings (default: true)

Honors style settings defined in package.json.

Current style settings supported:

  • ignore
  • parser

Note: This will use the nearest package.json.

style (default: standard)

Switch between standard and semistandard styles. If checkStyleDevDependencies is true this setting will be ignored.

showEslintRules (default: false)

Enable/disable showing the id of the offended eslint rules.

Example of messages while showEslintRules is:

  • true: Extra semicolon. (semi)
  • false: Extra semicolon.

lintMarkdownFiles (default: false)

Lint markdown fenced code blocks.

Global Variable Support

To have the linter not warn about undeclared variables when using global variables, honorStyleSettings has to be checked/true and a "globals" section has to be added to package.json:

"semistandard": {
    "globals": [
      "var1",
      "var2"
    ]
  }
  OR
"standard": {
    "globals": [
      "var1",
      "var2"
    ]
  }

Also see https://github.com/feross/standard#i-use-a-library-that-pollutes-the-global-namespace-how-do-i-prevent-variable-is-not-defined-errors.

License

MIT

linter-js-standard's People

Contributors

ricardofbarros avatar nikmartin avatar nopnop avatar timdp avatar jiasm avatar thtliife avatar steelbrain avatar chibicode avatar saschagehlich avatar olizilla avatar matthieu-beteille avatar seniorquico avatar jonaswindey avatar developit avatar jgantunes avatar idan avatar fannarsh avatar despairblue avatar abraxxa avatar

Watchers

Simeon Vincent avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.