Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

v2.10.0

Compare
Choose a tag to compare
@hzoo hzoo released this 15 Feb 15:32
· 278 commits to master since this release

Version 2.10.0 (2016-02-15):

Happy Presidents Day!

In this release, it's just some additional rules to update to the airbnb preset, new rules, and fixes.

Preset Changes

  • Add maximumLineLength to the airbnb preset (reference) (Oleg Gaidarenko)
  • Add disallowSpacesInsideTemplateStringPlaceholders to the airbnb preset (not explicit but used in examples) (Oleg Gaidarenko)
  • Add disallowNewlineBeforeBlockStatements rule to the mdcs preset (reference) (Mauricio Massaia)

New Rules

disallowSpacesInsideTemplateStringPlaceholders

(ikokostya)

Disallows spaces before and after curly brace inside template string placeholders.

// usage in config
"disallowSpacesInsideTemplateStringPlaceholders": true
// Valid
`Hello ${name}!`
// Invalid
`Hello ${ name}!`
`Hello ${name }!`
`Hello ${ name }!`

requireImportsAlphabetized (Ray Hammond)

Requires imports to be alphabetized

// usage in config
"requireImportAlphabetized": true
// Valid
import a from 'a';
import c from 'c';
import z from 'z';
// Invalid
import a from 'a';
import z from 'z';
import c from 'c';

Rule Updates

  • requireSpaceBeforeKeywords: skip function by default (gpiress)

Bug Fixes

  • requireNumericLiterals: miss if first argument is an Identifier (Robert Jackson)
  • disallowSpacesInsideTemplateStringPlaceholders: skip the edge case (Oleg Gaidarenko)
  • requirePaddingNewLinesBeforeExport: exclude if only statement in block (Brian Schemp)
  • maximumLineLength: some nodes might contain null values (Oleg Gaidarenko)

Docs

  • Correct date in the changelog (Oleg Gaidarenko)
  • Various rule corrections (Christopher Cook)