jsx-text-only.js 353 B

1234567891011121314
  1. const testFile = require('../../helpers/testFile');
  2. const runTest = require('../../helpers/runTest');
  3. const cases = {
  4. valid: [
  5. {
  6. ...testFile('valid-jsx-text-only.jsx'),
  7. options: [{ mode: 'jsx-text-only' }],
  8. },
  9. ],
  10. invalid: [{ code: '<div>hello</div>', errors: 1 }],
  11. };
  12. runTest('no-literal-string: mode jsx-text-only', cases);