项目原始demo,不改动
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.
Deze repo is gearchiveerd. U kunt bestanden bekijken en het klonen, maar niet pushen of problemen/pull-requests openen.

12345678910111213141516171819202122232425262728293031323334353637
  1. # eslint-plugin-standard [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
  2. [npm-image]: https://img.shields.io/npm/v/eslint-plugin-standard.svg
  3. [npm-url]: https://npmjs.org/package/eslint-plugin-standard
  4. [downloads-image]: https://img.shields.io/npm/dm/eslint-plugin-standard.svg
  5. [downloads-url]: https://npmjs.org/package/eslint-plugin-standard
  6. [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
  7. [standard-url]: https://standardjs.com
  8. ESlint Rules for the Standard Linter
  9. ### Usage
  10. `npm install --save-dev eslint-plugin-standard`
  11. ### Configuration
  12. ```js
  13. {
  14. rules: {
  15. 'standard/object-curly-even-spacing': [2, "either"]
  16. 'standard/array-bracket-even-spacing': [2, "either"],
  17. 'standard/computed-property-even-spacing': [2, "even"]
  18. 'standard/no-callback-literal': [2, ["cb", "callback"]]
  19. }
  20. }
  21. ```
  22. ### Rules Explanations
  23. There are several rules that were created specifically for the `standard` linter.
  24. - `object-curly-even-spacing` - Like `object-curly-spacing` from ESLint except it has an `either` option which lets you have 1 or 0 spaces padding.
  25. - `array-bracket-even-spacing` - Like `array-bracket-even-spacing` from ESLint except it has an `either` option which lets you have 1 or 0 spacing padding.
  26. - `computed-property-even-spacing` - Like `computed-property-spacing` around ESLint except is has an `even` option which lets you have 1 or 0 spacing padding.
  27. - `no-callback-literal` - Ensures that we strictly follow the callback pattern with `undefined`, `null` or an error object in the first position of a callback.