eslint-config-beslogic 2.0.1 → 2.0.2

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/CHANGELOG.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 2.0.1
3
+ ## 2.0.2
4
4
 
5
5
  - Disabled the following rules in Storybook stories:
6
6
  - `@angular-eslint/component-max-inline-declarations`
7
7
  - `angular-file-naming/component-filename-suffix`
8
- - Clarified that `beslogic/storybook` preset should be added to Angular project as well.
8
+ - Fixed rule to detect using public non-readonly arrow function properties in Components and Directives with Storybook
9
+ - Clarified that `beslogic/storybook` preset should be added to Angular project as well
9
10
 
10
11
  ## 2.0.0
11
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-beslogic",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "ESLint rules, plugins and configs used at Beslogic",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/storybook.js CHANGED
@@ -19,9 +19,10 @@ module.exports = {
19
19
  ...noRestrictedSyntax,
20
20
  {
21
21
  "selector":
22
- "ClassDeclaration:has(Decorator [name=\"Component\"]) ClassProperty > :function",
23
- "message":
24
- "Storybook needs Angular components' methods to be a Function Declaration or it'll be overriden by a string."
22
+ "ClassDeclaration:has(Decorator :matches([name=\"Component\"], [name=\"Directive\"])) PropertyDefinition[value.type=\"ArrowFunctionExpression\"]:not([accessibility=\"private\"]):not([readonly=true])",
23
+ "message": "Storybook will present arrow function properties as strings. " +
24
+ "Mark it as `private`, `readonly`, or use a function declaration. " +
25
+ "https://github.com/storybookjs/storybook/issues/27131"
25
26
  }
26
27
  ]
27
28
  }