detect-disable-mustache-escape.js 380 B

1234567891011121314151617
  1. 'use strict';
  2. const RuleTester = require('eslint').RuleTester;
  3. const tester = new RuleTester();
  4. const ruleName = 'detect-disable-mustache-escape';
  5. tester.run(ruleName, require(`../rules/${ruleName}`), {
  6. valid: [{ code: 'escapeMarkup = false' }],
  7. invalid: [
  8. {
  9. code: 'a.escapeMarkup = false',
  10. errors: [{ message: 'Markup escaping disabled.' }]
  11. }
  12. ]
  13. });