@taiga-ui/eslint-plugin-experience-next 0.528.0 → 0.530.0
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 +1 -1
- package/index.esm.js +9 -3
- package/package.json +3 -3
- package/rules/utils/ast/class-members.d.ts +1 -0
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ from third-party plugins. The exact severities and file globs live in
|
|
|
128
128
|
| [require-li-container](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/require-li-container.md) | Require `<li>` to be nested inside `<ul>`, `<ol>`, or `<menu>` | ✅ | | |
|
|
129
129
|
| [require-title](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/require-title.md) | Require a non-empty `<title>` inside `<head>` | ✅ | | |
|
|
130
130
|
| [short-tui-imports](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/short-tui-imports.md) | Shorten TuiXxxComponent / TuiYyyDirective in Angular metadata | ✅ | 🔧 | |
|
|
131
|
-
| [single-line-class-property-spacing](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/single-line-class-property-spacing.md) | Group
|
|
131
|
+
| [single-line-class-property-spacing](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/single-line-class-property-spacing.md) | Group single-line class properties by accessibility and separate multiline ones with a blank line | ✅ | 🔧 | |
|
|
132
132
|
| [single-line-let-spacing](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/single-line-let-spacing.md) | Group consecutive single-line @let declarations and separate multiline ones and interpolations with blank lines | ✅ | 🔧 | |
|
|
133
133
|
| [single-line-variable-spacing](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/single-line-variable-spacing.md) | Group consecutive single-line variables and separate multiline ones with a blank line | ✅ | 🔧 | |
|
|
134
134
|
| [standalone-imports-sort](https://github.com/taiga-family/toolkit/tree/main/projects/eslint-plugin-experience-next/docs/standalone-imports-sort.md) | Auto sort names inside Angular decorators | ✅ | 🔧 | |
|
package/index.esm.js
CHANGED
|
@@ -15013,6 +15013,9 @@ function getAccessibilityGroup(member) {
|
|
|
15013
15013
|
? 'private'
|
|
15014
15014
|
: (member.accessibility ?? 'public');
|
|
15015
15015
|
}
|
|
15016
|
+
function shareAccessibilityGroup(current, next) {
|
|
15017
|
+
return getAccessibilityGroup(current) === getAccessibilityGroup(next);
|
|
15018
|
+
}
|
|
15016
15019
|
|
|
15017
15020
|
const EQUALITY_OPERATORS = new Set(['!=', '!==', '==', '===']);
|
|
15018
15021
|
function getChainExpressionRoot(node) {
|
|
@@ -248211,7 +248214,7 @@ const rule$W = createRule({
|
|
|
248211
248214
|
!isAccessibilityClassMember(next)) {
|
|
248212
248215
|
continue;
|
|
248213
248216
|
}
|
|
248214
|
-
const accessibilityGroupChanged =
|
|
248217
|
+
const accessibilityGroupChanged = !shareAccessibilityGroup(current, next);
|
|
248215
248218
|
if (!accessibilityGroupChanged) {
|
|
248216
248219
|
continue;
|
|
248217
248220
|
}
|
|
@@ -255728,12 +255731,15 @@ const rule$9 = createRule({
|
|
|
255728
255731
|
continue;
|
|
255729
255732
|
}
|
|
255730
255733
|
const currentIsSingleLine = isSingleLineNode(current);
|
|
255734
|
+
const nextIsSingleLine = isSingleLineNode(next);
|
|
255731
255735
|
const blankLineBetween = hasBlankLine(betweenText);
|
|
255732
255736
|
const needsSeparatedLine = isAccessorMember(current) || isAccessorMember(next);
|
|
255737
|
+
const fieldsShareAccessibilityGroup = shareAccessibilityGroup(current, next);
|
|
255733
255738
|
if (isFieldLikeMember(current) &&
|
|
255734
255739
|
isFieldLikeMember(next) &&
|
|
255735
255740
|
currentIsSingleLine &&
|
|
255736
|
-
|
|
255741
|
+
nextIsSingleLine &&
|
|
255742
|
+
fieldsShareAccessibilityGroup &&
|
|
255737
255743
|
blankLineBetween) {
|
|
255738
255744
|
context.report({
|
|
255739
255745
|
fix: (fixer) => fixer.replaceTextRange([current.range[1], next.range[0]], getSpacingReplacement(sourceCode, betweenText, next.loc.start.line, 0)),
|
|
@@ -255753,7 +255759,7 @@ const rule$9 = createRule({
|
|
|
255753
255759
|
if (isFieldLikeMember(current) &&
|
|
255754
255760
|
isFieldLikeMember(next) &&
|
|
255755
255761
|
currentIsSingleLine &&
|
|
255756
|
-
!
|
|
255762
|
+
!nextIsSingleLine &&
|
|
255757
255763
|
!blankLineBetween) {
|
|
255758
255764
|
context.report({
|
|
255759
255765
|
fix: (fixer) => fixer.replaceTextRange([current.range[1], next.range[0]], getSpacingReplacement(sourceCode, betweenText, next.loc.start.line, 1)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/eslint-plugin-experience-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.530.0",
|
|
4
4
|
"description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
|
|
5
5
|
"homepage": "https://github.com/taiga-family/toolkit#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"angular-eslint": "20.7.0",
|
|
38
38
|
"eslint-config-prettier": "10.1.8",
|
|
39
39
|
"eslint-plugin-compat": "7.0.2",
|
|
40
|
-
"eslint-plugin-cypress": "6.4.
|
|
41
|
-
"eslint-plugin-de-morgan": "2.1.
|
|
40
|
+
"eslint-plugin-cypress": "6.4.1",
|
|
41
|
+
"eslint-plugin-de-morgan": "2.1.2",
|
|
42
42
|
"eslint-plugin-decorator-position": "6.1.0",
|
|
43
43
|
"eslint-plugin-file-progress": "3.0.2",
|
|
44
44
|
"eslint-plugin-import": "2.32.0",
|
|
@@ -12,3 +12,4 @@ export declare function isRelevantSpacingClassMember(member: TSESTree.ClassEleme
|
|
|
12
12
|
export declare function isAccessibilityClassMember(member: TSESTree.ClassElement): member is AccessibilityClassMember;
|
|
13
13
|
export declare function isEcmascriptPrivateClassMember(member: TSESTree.ClassElement): member is EcmascriptPrivateClassMember;
|
|
14
14
|
export declare function getAccessibilityGroup(member: AccessibilityClassMember): AccessibilityGroup;
|
|
15
|
+
export declare function shareAccessibilityGroup(current: AccessibilityClassMember, next: AccessibilityClassMember): boolean;
|