Nautical Pace Marker

    modern-standard

    1.4.3 • Public • Published

    JavaScript Modern Standard Style

    travis

    One Style to Rule Them All

    No decisions to make. No .eslintrc, .jshintrc, or .jscsrc files to manage. It just works.

    This module saves you (and others!) time in two ways:

    • No configuration. The easiest way to enforce consistent style in your project. Just drop it in.
    • Catch style errors before they're submitted in PRs. Saves precious code review time by eliminating back-and-forth between maintainer and contributor.

    This is a linter for the future, based on the standard linter. It expects to be run within a babel environment, using the latest available babel syntax.

    Rule Differences from Standard

    Methodology Differences from Standard

    • We will freely update rules based on current best practices. Becuase of this we recommend that you lock down the current version of modern-standard.
    • We are currently only targeting the latest javascript syntax, generally this code is transpiled by babel.
    • We want to move faster and be more receptive to community issues and contributions.
    • Everything is under one organization, and all linting code is in a single repo. This makes it much easier for contributors.
    • This is an experiment and we're happy if standard adopts these rules or if this repository is forked.

    Install

    npm install modern-standard

    Integrating modern-standard

    1. Add it to package.json
    {
      "name": "my-package",
      "devDependencies": {
        "modern-standard": "*"
      },
      "scripts": {
        "test": "modern-standard && node my-tests.js"
      }
    }
    1. Check style automatically when you run npm test
    $ npm test
    Error: Use JavaScript Modern Standard Style
      lib/torrent.js:950:11: Expected '===' and instead saw '=='.
    
    1. Never give style feedback on a pull request again!

    Text editor plugins

    First, install modern-standard. Then, install the appropriate plugin for your editor:

    Sublime Text

    SublimeLinter-contrib-modern-standard is currently under construction and should be published in package control soon.

    Atom

    ide-plugin-atom can be found here: https://atom.io/packages/modern-standard-ide-plugin-atom

    Install

    npm i modern-standard

    DownloadsWeekly Downloads

    1

    Version

    1.4.3

    License

    MIT

    Last publish

    Collaborators

    • kevingrandon