rule.js 773 B

1234567891011121314151617181920212223242526272829303132333435
  1. const ruleBoilerplate = (author, description) => `/**
  2. * @fileoverview ${description}
  3. * @author ${author}
  4. * @flow
  5. */
  6. // ----------------------------------------------------------------------------
  7. // Rule Definition
  8. // ----------------------------------------------------------------------------
  9. import type { JSXOpeningElement } from 'ast-types-flow';
  10. import { generateObjSchema } from '../util/schemas';
  11. const errorMessage = '';
  12. const schema = generateObjSchema();
  13. module.exports = {
  14. meta: {
  15. docs: {},
  16. schema: [schema],
  17. },
  18. create: (context: ESLintContext) => ({
  19. JSXOpeningElement: (node: JSXOpeningElement) => {
  20. context.report({
  21. node,
  22. message: errorMessage,
  23. });
  24. },
  25. }),
  26. };
  27. `;
  28. module.exports = ruleBoilerplate;