File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ module.exports = {
2323 {
2424 oneOf : [
2525 { enum : [ 'double' , 'single' ] } ,
26+ // `false` as the root config disables the rule, matching upstream
27+ // ember-template-lint which accepts `[rule, false]` as a valid
28+ // disabled state without schema errors.
29+ { type : 'boolean' , enum : [ false ] } ,
2630 {
2731 type : 'object' ,
2832 required : [ 'curlies' , 'html' ] ,
@@ -49,7 +53,8 @@ module.exports = {
4953 create ( context ) {
5054 const rawOption = context . options [ 0 ] ;
5155
52- if ( rawOption === undefined ) {
56+ // Disabled when options omitted or explicitly set to `false`.
57+ if ( ! rawOption ) {
5358 return { } ;
5459 }
5560
Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ const validHbs = [
2828 code : '<input type=\'checkbox\'> {{hello "test" x="test"}}' ,
2929 options : [ { curlies : 'double' , html : 'single' } ] ,
3030 } ,
31+ // `false` as the root config disables the rule (matches upstream).
32+ {
33+ code : "{{component \"test\"}} {{hello x='test'}} <input type='checkbox'>" ,
34+ options : [ false ] ,
35+ } ,
36+ {
37+ code : '{{component \'test\'}} <input type="checkbox">' ,
38+ options : [ false ] ,
39+ } ,
3140] ;
3241
3342const invalidHbs = [
You can’t perform that action at this time.
0 commit comments