File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11module . exports = {
22 "plugins" : [
33 "stylelint-scss" ,
4- "stylelint-selector-no-utility"
4+ "stylelint-selector-no-utility" ,
5+ "stylelint-order"
56 ] ,
67 "rules" : {
78 "at-rule-blacklist" : [ "extend" ] ,
@@ -42,7 +43,7 @@ module.exports = {
4243 }
4344 ] ,
4445 "declaration-block-no-shorthand-property-overrides" : true ,
45- "declaration-block- properties-order" : [
46+ "order/ properties-order" : [
4647 "position" ,
4748 "top" ,
4849 "right" ,
Original file line number Diff line number Diff line change 3333 "ava" : " *" ,
3434 "eslint" : " *" ,
3535 "eslint-plugin-github" : " *" ,
36- "stylelint" : " *"
36+ "eslint-plugin-import" : " ^2.6.0" ,
37+ "stylelint" : " *" ,
38+ "stylelint-order" : " ^0.4.4"
3739 },
3840 "peerDependencies" : {
3941 "stylelint" : " ^7.7.1"
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const validCss =
1010
1111const invalidCss =
1212`.foo {
13+ color: #fff;
1314 top: .2em;
1415}
1516`
@@ -47,7 +48,8 @@ test("a warning with invalid css", t => {
4748 const { errored, results } = data
4849 const { warnings } = results [ 0 ]
4950 t . truthy ( errored , "errored" )
50- t . is ( warnings . length , 1 , "flags one warning" )
51- t . is ( warnings [ 0 ] . text , "Expected a leading zero (number-leading-zero)" , "correct warning text" )
51+ t . is ( warnings . length , 2 , "flags two warning" )
52+ t . is ( warnings [ 0 ] . text , 'Expected "top" to come before "color" (order/properties-order)' , "correct warning text" )
53+ t . is ( warnings [ 1 ] . text , "Expected a leading zero (number-leading-zero)" , "correct warning text" )
5254 } )
5355} )
You can’t perform that action at this time.
0 commit comments