eslint-plugin-crisp 1.4.12 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -90,6 +90,7 @@ Each item has emojis denoting:
90
90
  | [no-multiple-empty-lines](https://eslint.org/docs/latest/rules/no-multiple-empty-lines) | Allows a maximum of 1 consecutive empty lines | | 🟢 | 🟣 |
91
91
  | [no-mixed-spaces-and-tabs](https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs) | Disallows mixed spaces and tabs for indentation | 🟠 | 🟢 | 🟣 |
92
92
  | [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax) | Enforces `switch` `case`'s content to be enclosed in braces | | 🟢 | 🟣 |
93
+ | [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax) | Enforces `watch` watchers to use the object form with a `handler` function | | 🟢 | |
93
94
  | [no-tabs](https://eslint.org/docs/latest/rules/no-tabs) | Disallows tabs | 🟠 | 🟢 | 🟣 |
94
95
  | [no-trailing-spaces](https://eslint.org/docs/latest/rules/no-trailing-spaces) | Disallows trailing whitespace at the end of lines | 🟠 | 🟢 | 🟣 |
95
96
  | [no-undef](https://eslint.org/docs/latest/rules/no-undef) | Disallows use of undeclared variables | 🟠 | 🟢 | 🟣 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-crisp",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "Custom ESLint Rules for Crisp",
5
5
  "author": "Crisp IM SAS",
6
6
  "main": "index.js",
@@ -111,6 +111,11 @@ export default function configRecommendedVue(pluginCrisp) {
111
111
  {
112
112
  "selector": "SwitchCase > *.consequent[type!='BlockStatement']",
113
113
  "message": "Switch cases without braces are disallowed."
114
+ },
115
+
116
+ {
117
+ "selector": "Property[key.name='watch'] > ObjectExpression > Property[value.type='FunctionExpression']",
118
+ "message": "Watchers must use the object form with a `handler` function."
114
119
  }
115
120
  ],
116
121
  "no-tabs": "error",