Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

unbound-method.md 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Enforces unbound methods are called with their expected scope (`unbound-method`)
  2. ## Rule Details
  3. This rule extends the base [`@typescript-eslint/unbound-method`][original-rule]
  4. rule, meaning you must depend on `@typescript-eslint/eslint-plugin` for it to
  5. work. It adds support for understanding when it's ok to pass an unbound method
  6. to `expect` calls.
  7. See the [`@typescript-eslint` documentation][original-rule] for more details on
  8. the `unbound-method` rule.
  9. Note that while this rule requires type information to work, it will fail
  10. silently when not available allowing you to safely enable it on projects that
  11. are not using TypeScript.
  12. ## How to use
  13. ```json5
  14. {
  15. parser: '@typescript-eslint/parser',
  16. parserOptions: {
  17. project: 'tsconfig.json',
  18. ecmaVersion: 2020,
  19. sourceType: 'module',
  20. },
  21. overrides: [
  22. {
  23. files: ['test/**'],
  24. plugins: ['jest'],
  25. rules: {
  26. // you should turn the original rule off *only* for test files
  27. '@typescript-eslint/unbound-method': 'off',
  28. 'jest/unbound-method': 'error',
  29. },
  30. },
  31. ],
  32. rules: {
  33. '@typescript-eslint/unbound-method': 'error',
  34. },
  35. }
  36. ```
  37. This rule should be applied to your test files in place of the original rule,
  38. which should be applied to the rest of your codebase.
  39. ## Options
  40. See [`@typescript-eslint/unbound-method`][original-rule] options.
  41. <sup>Taken with ❤️ [from `@typescript-eslint` core][original-rule]</sup>
  42. [original-rule]:
  43. https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/unbound-method.md