isml-linter 5.43.8 → 5.43.9
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,36 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.43.9] - 2023-03-05
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- "leading-iscache" and "leading-iscontent" rules - update tree data after move nodes on autofix mode;
|
|
7
|
+
|
|
3
8
|
## [5.43.8] - 2023-03-04
|
|
4
9
|
|
|
5
10
|
### Fixed
|
|
6
11
|
- Identification of HTML tag attributes even when there is no blank space separating them;
|
|
7
|
-
|
|
12
|
+
|
|
8
13
|
## [5.43.7] - 2023-03-03
|
|
9
14
|
|
|
10
15
|
### Fixed
|
|
11
16
|
- "indent" rule - keep tag type if previous element has trailing spaces;
|
|
12
|
-
|
|
17
|
+
|
|
13
18
|
## [5.43.6] - 2023-02-25
|
|
14
19
|
|
|
15
20
|
### Fixed
|
|
16
21
|
- "indent" rule - don't add indentation to embbeded "isprint" tag if it's in the same line as previous attribute;
|
|
17
|
-
|
|
22
|
+
|
|
18
23
|
## [5.43.5] - 2023-02-21
|
|
19
24
|
|
|
20
25
|
### Fixed
|
|
21
26
|
- "indent" rule - keep indentation of closing tag that is in same line as corresponding opening tag;
|
|
22
27
|
- Tree build for an empty template;
|
|
23
|
-
|
|
28
|
+
|
|
24
29
|
## [5.43.4] - 2023-02-20
|
|
25
30
|
|
|
26
31
|
### Fixed
|
|
27
32
|
- [Issue #39][issue#39] - Allow closing tag to be in the same line as corresponding opening tag last character;
|
|
28
|
-
|
|
33
|
+
|
|
29
34
|
## [5.43.3] - 2023-02-20
|
|
30
35
|
|
|
31
36
|
### Fixed
|
|
32
37
|
- Issue that blocked process due to a missing return value in some rules;
|
|
33
|
-
|
|
38
|
+
|
|
34
39
|
## [5.43.2] - 2023-02-12
|
|
35
40
|
|
|
36
41
|
### Security
|
|
@@ -40,7 +45,7 @@
|
|
|
40
45
|
|
|
41
46
|
### Fixed
|
|
42
47
|
- All line-by-line rules are applied, one after the other, without ovewriting the previous rule fixed content;
|
|
43
|
-
|
|
48
|
+
|
|
44
49
|
## [5.43.0] - 2023-01-31
|
|
45
50
|
|
|
46
51
|
### Added
|
|
@@ -48,7 +53,7 @@
|
|
|
48
53
|
|
|
49
54
|
### Fixed
|
|
50
55
|
- Rule-level ignore string with "/" character for directories;
|
|
51
|
-
|
|
56
|
+
|
|
52
57
|
## [5.42.4] - 2023-01-30
|
|
53
58
|
|
|
54
59
|
### Fixed
|
|
@@ -1129,6 +1134,7 @@
|
|
|
1129
1134
|
### Added
|
|
1130
1135
|
- Linter is published;
|
|
1131
1136
|
|
|
1137
|
+
[5.43.9]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.8...v5.43.9
|
|
1132
1138
|
[5.43.8]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.7...v5.43.8
|
|
1133
1139
|
[5.43.7]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.6...v5.43.7
|
|
1134
1140
|
[5.43.6]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.5...v5.43.6
|
package/package.json
CHANGED
package/src/Constants.js
CHANGED
|
@@ -40,6 +40,7 @@ const specComplexTemplatesDir = path.join(specIsmlTreeTemplateDir, 'com
|
|
|
40
40
|
const specElementBalanceTemplatesDir = path.join(specIsmlTreeTemplateDir, 'element_balance');
|
|
41
41
|
const specTailLineNumberTemplatesDir = path.join(specIsmlTreeTemplateDir, 'tail_line_number');
|
|
42
42
|
const specAutofixTemplatesDir = path.join(specTemplateDir, 'autofix');
|
|
43
|
+
const specTreeRuleTemplatesDir = path.join(specTemplateDir, 'rules', 'tree');
|
|
43
44
|
const rulesDir = path.join(linterModuleDir, 'src', 'rules');
|
|
44
45
|
const lineByLineRulesDir = path.join(rulesDir, 'line_by_line');
|
|
45
46
|
const treeRulesDir = path.join(rulesDir, 'tree');
|
|
@@ -102,6 +103,7 @@ module.exports = {
|
|
|
102
103
|
specColumnNumberTemplateDir,
|
|
103
104
|
specInvalidTemplateDir,
|
|
104
105
|
specComplexTemplatesDir,
|
|
106
|
+
specTreeRuleTemplatesDir,
|
|
105
107
|
specAutofixTemplatesDir,
|
|
106
108
|
specElementBalanceTemplatesDir,
|
|
107
109
|
specTailLineNumberTemplatesDir,
|
|
@@ -351,6 +351,9 @@ class IsmlNode {
|
|
|
351
351
|
return !this.parent || this.parent.getLastChild() === this;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
// No position or line number is set. To get
|
|
355
|
+
// it, it is necessary to re-parse the tree.
|
|
356
|
+
// This is valid for all nodes;
|
|
354
357
|
removeChild(node) {
|
|
355
358
|
let index = null;
|
|
356
359
|
|
|
@@ -365,15 +368,27 @@ class IsmlNode {
|
|
|
365
368
|
|
|
366
369
|
const removedNode = this.children[index];
|
|
367
370
|
this.children.splice(index, 1);
|
|
371
|
+
|
|
372
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
373
|
+
const child = this.children[index];
|
|
374
|
+
child.childNo = i;
|
|
375
|
+
}
|
|
376
|
+
|
|
368
377
|
return removedNode;
|
|
369
378
|
}
|
|
370
379
|
|
|
371
380
|
// No position or line number is set. To get
|
|
372
|
-
// it, it is necessary to re-parse the tree
|
|
381
|
+
// it, it is necessary to re-parse the tree.
|
|
382
|
+
// This is valid for all nodes;
|
|
373
383
|
addChildNodeToPos(node, index) {
|
|
374
384
|
node.parent = this;
|
|
375
385
|
node.depth = this.depth + 1;
|
|
376
386
|
this.children.splice(index, 0, node);
|
|
387
|
+
|
|
388
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
389
|
+
const child = this.children[i];
|
|
390
|
+
child.childNo = i;
|
|
391
|
+
}
|
|
377
392
|
}
|
|
378
393
|
|
|
379
394
|
getRoot() {
|