web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
863 B

  1. # Rule Generator
  2. ```bash
  3. $ node scripts/create-rule.js rule-name --author="Your name" --description="Description of the rule"
  4. # OR with npm script alias
  5. $ npm run create -- rule-name --author="Your name" --description="Description of rule"
  6. ```
  7. This script will generate three files with basic boilerplate for the given rule:
  8. 1. src/rules/${rule-name}.js
  9. 2. \__tests__/src/rules/${rule-name}-test.js
  10. 3. docs/rules/${rule-name}.md
  11. If the rule already exists or is not specified in the correct format, an error will be thrown.
  12. If we wanted to scaffold a rule for `no-marquee`, we could run:
  13. ```bash
  14. $ node scripts/create-rule.js no-marquee --author="Ethan Cohen <@evcohen>" --description="Enforce <marquee> elements are not used."
  15. # OR
  16. $ npm run create -- no-marquee --author="Ethan Cohen <@evcohen>" --description="Enforce <marquee> elements are not used."
  17. ```