Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

xhstandard

All the goodness of Flet/semistandard with little twists.

JavaScript Standard Style, bikeshed, check, checker, code, code checker, code linter, code standards, code style, enforce, eslint, hint, jscs, jshint, lint, policy, quality, semicolon, simple, standard, standard style, style, style checker, style linter, verify

readme

Xiaohu eslint rule standard

Wired space before function parentheses

All the goodness of Flet/semistandard with space removed before function parentheses.

Install

npm install xhstandard

Rules

Importantly:

  • "space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always"}]
  • Check Flet/semistandard for the rest of the rules.

changelog

semistandard Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

11.0.0 2017-04-20

Updated to match the latest standard v10.0.2 rules and the newest standard-engine features.

Check standard changelog that covers all the updates: https://github.com/feross/standard/blob/master/CHANGELOG.md

In summary:

  • using deprecated Node.js APIs is now considered an error. It's finally time to update those dusty old APIs!

New features

  • Update ESLint from 3.15.x to 3.19.x.
  • Node.js API: Add standard.lintTextSync method

New rules

(Estimated % of affected standard users, based on test suite in parens)

  • Disallow using deprecated Node.js APIs (node/no-deprecated-api) #693 (13%)
    • Ensures that code always runs without warnings on the latest versions of Node.js
    • Ensures that safe Buffer methods (Buffer.from(), Buffer.alloc()) are used instead of Buffer()
  • Enforce callbacks always called with Node.js-style error first (standard/no-callback-literal) #623 (3%)
    • Functions named callback or cb must be invoked with null, undefined, or an Error as the first argument
    • Disallows using a string instead of an Error object
    • Disallows confusing callbacks that do not follow the standard Node.js pattern
  • Disallow any imports that come after non-import statements (import/first) #806 (1%)
  • Disallow unnecessary return await (no-return-await) #695 (0%)
  • Disallow comma-dangle in functions (comma-dangle) #787 (0%)
  • Disallow repeated exports of names or defaults (import/export) #806 (0%)
  • Disallow import of modules using absolute paths (import/no-absolute-path) #806 (0%)
  • Disallow Webpack loader syntax in imports (import/no-webpack-loader-syntax) #806 (0%)
  • Disallow comparing against -0 (no-compare-neg-zero) #812 (0%)

Changed rules

  • Relax rule: allow using ...rest to omit properties from an object (no-unused-vars) #800
    • This is a common and useful pattern in React/JSX apps!
  • Relax rule: allow Flow import type statements (import/no-duplicates) #599
    • These are no longer considered to be "duplicate imports"
  • Relax rule: Treat process.exit() the same as throw in code path analysis (node/process-exit-as-throw) #699
    • Makes certain other rules work better and give fewer false positives
  • Relax rule: allow Unnecessary Labels (no-extra-label)
    • Redundant, since "no-labels" is already enabled, which is more restrictive

(from standard 10.0.2):

  • Relax rule: Disallow import of modules using absolute paths (import/no-absolute-path) #861
    • This rule was responsible for up to 25% of the running time of standard, so we are disabling it until its performance improves.

10.0.0 2017-03-06

Updated to match the latest standard rules and the newest standard-engine features.

@feross did a great writeup on the standard changelog that covers all the updates: https://github.com/feross/standard/blob/master/CHANGELOG.md

In summary:

New features

  • Update ESLint from 3.10.x to 3.15.x
  • 3 additional rules are now fixable with standard --fix

New rules

(Estimated % of affected standard users, based on test suite in parens)

Changed rules

  • Relax rule: allow TypeScript Triple-Slash Directives (spaced-comment) #660
  • Relax rule: allow Flow Comments (spaced-comment) #661

9.0.0 2016-09-03

Updated to match the latest standard rules and the newest standard-engine features.

@feross did a great writeup on the standard changelog that covers all the updates: https://github.com/feross/standard/blob/master/CHANGELOG.md

In summary:

New features

  • Upgrade to ESLint v3 (http://eslint.org/docs/user-guide/migrating-to-3.0.0)
    • BREAKING: Drop support for node < 4 (this was a decision made by the ESLint team)
  • Expose ESLint's --fix command line flag standard-engine/#107
    • Lightweight, no additional dependencies, fixes dozens of rules automatically
    • Note: for semistandard, we left the existing --format flag in place, which uses semistandard-format, but I highly recommend using --fix instead!

New rules

(Estimated % of affected standard users, based on test suite in parens)

Changed rules

8.0.0 2016-05-12

Updated to match the latest standard rules and use the latest version of semistandard-format.

New Rules

6.1.1 2016-06-17

  • Bump standard-engine to 1.8.1, which fixes an NPE. (thanks again @wombleton)

6.1.0 2015-06-16

6.0.0 2015-06-03

BREAKING CHANGE: New Rules

  • no-extra-semi - This rule is aimed at eliminating extra unnecessary semicolons. While not technically an error, extra semicolons can be a source of confusion when reading code.

  • semi-spacing - Disallow a space before semicolons and force a space after them.

5.0.0 2015-05-29

  • Updated to standard rules 2.0.0 BREAKING CHANGE: new rule operator-linebreak set to "after"

4.3.0 2015-05-29

  • Updated to standard-engine 1.6.0
  • alternate parsers are now supported. See README.md for details!

4.2.2 2015-05-25

  • Since standard-engine now supports passing a formatter, we've switched back to using it for the CLI.

4.2.1 2015-05-25

  • Bumped all dependencies to their latest minor versions in package.json
  • This includes a fix in standard-engine which dramatically speeds up lint times!

4.2.0 2015-05-20

  • Switch to using eslint-config-semistandard, which extends eslint-config-standard. This means that non-breaking changes in standard should automatically get reflected now!

  • Thanks to new collaborator @ricardofbarros, semistandard now has a --format (-F) flag! It uses his semistandard-format module which is a fork of standard-format. Good Stuff!

4.1.4 2015-05-02

  • Merged from standard: relax rule no-alert

4.1.3 - 2015-04-23

  • Merged from standard rules: relax no-lone-blocks rule for ES6 reasons

4.1.2 - 2015-04-16

  • Fixed programmatic usage so it actually works.

4.1.1 - 2015-04-15

  • Update standard-engine version to fix crash on absolute filesystem path

4.1.0 - 2015-04-14

Merged latest from standard 3.6.0:

  • Rule turned off: no-script-url
  • All warning rules changed to error
  • Changed space-before-function-parentheses to space-before-function-paren
  • new react rules added
    • "react/jsx-boolean-value": 2
    • "react/jsx-quotes": [2, "single", "avoid-escape"]
    • "react/jsx-no-undef": 2
    • "react/jsx-sort-props": 0
    • "react/no-unknown-property": 2

Updates from standard-engine

  • Ignore linting for all files in .gitignore.
  • Removed /git/** exclusion as its redundant.
  • Output errors to stdout instead of stderr.