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

Commit

Permalink
quotemark: bugfix for jsx quotes (#2605)
Browse files Browse the repository at this point in the history
* quotemark: bugfix for jsx quotes

[bugfix] `quotemark`: fix regression with jsx attributes
Fixes: #2603

* Add another test
  • Loading branch information
ajafff authored and nchen63 committed Apr 29, 2017
1 parent 295bf29 commit bf6c8de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/quotemarkRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class Rule extends Lint.Rules.AbstractRule {
avoidEscape: args.indexOf(OPTION_AVOID_ESCAPE) !== -1,
jsxQuoteMark: args.indexOf(OPTION_JSX_SINGLE) !== -1
? "'"
: args.indexOf(OPTION_JSX_DOUBLE) ? '"' : quoteMark,
: args.indexOf(OPTION_JSX_DOUBLE) !== -1 ? '"' : quoteMark,
});
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/rules/quotemark/single/test.tsx.lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
let foo = <span class='foo' id="bar" />
~~~~~ [" should be ']

0 comments on commit bf6c8de

Please sign in to comment.