This repository was archived by the owner on Mar 23, 2024. It is now read-only.
v2.10.0
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
maximumLineLengthto theairbnbpreset (reference) (Oleg Gaidarenko) - Add
disallowSpacesInsideTemplateStringPlaceholdersto theairbnbpreset (not explicit but used in examples) (Oleg Gaidarenko) - Add
disallowNewlineBeforeBlockStatementsrule to themdcspreset (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: skipfunctionby 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)