You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ Add the plugin to the `plugins` section and the rule to the `rules` section in y
21
21
{
22
22
"allowedNames": [],
23
23
"allowNamedFunctions": false,
24
+
"allowObjectProperties": false,
24
25
"classPropertiesAllowed": false,
25
26
"disallowPrototype": false,
26
27
"returnStyle": "unchanged",
@@ -41,6 +42,16 @@ An optional array of function names to ignore. When set, the rule won't report n
41
42
42
43
If set to true, the rule won't report named functions such as `function foo() {}`. Anonymous function such as `const foo = function() {}` will still be reported.
43
44
45
+
### `allowObjectProperties`
46
+
47
+
If set to true, the rule won't report named methods such as
48
+
49
+
```js
50
+
constmyObj= {
51
+
hello() {}
52
+
}
53
+
```
54
+
44
55
### `classPropertiesAllowed`
45
56
46
57
When `true`, functions defined as [class instance fields](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Field_declarations) will be converted to arrow functions when doing so would not alter or break their behaviour.
0 commit comments