Skip to content

Commit

Permalink
Fix 'none' option
Browse files Browse the repository at this point in the history
  • Loading branch information
sigorilla committed Feb 27, 2017
1 parent 96b7db5 commit 5417637
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.5.10

Fix `none` option for decimal values: https://github.com/SimenB/stylint/pull/394

### 1.5.9

remove unused entry `dir` from `cache`
Expand Down
2 changes: 1 addition & 1 deletion src/checks/none.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

var zeroRe = /((border)|(outline))+(:|\s)+0(?!-)/
var zeroRe = /((border)|(outline))+(:|\s)+0(?!(-|\.))/
var noneRe = /((border)|(outline))+(:|\s)+(none)+(?!-)/


Expand Down
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,7 @@ describe( 'Linter Style Checks: ', function() {
assert.ok( !noneTest( 'border: none' ) )
assert.ok( !noneTest( 'border:none' ) )
assert.ok( !noneTest( 'border 1px solid red' ) )
assert.ok( !noneTest( 'border 0.1em solid red' ) )
} )

it( 'false (no err) if outline none', function() {
Expand Down

0 comments on commit 5417637

Please sign in to comment.