isml-linter 5.43.0 → 5.43.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,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.43.2] - 2023-02-12
4
+
5
+ ### Security
6
+ - Upgraded dependencies;
7
+
8
+ ## [5.43.1] - 2023-02-11
9
+
10
+ ### Fixed
11
+ - All line-by-line rules are applied, one after the other, without ovewriting the previous rule fixed content;
12
+
3
13
  ## [5.43.0] - 2023-01-31
4
14
 
5
15
  ### Added
@@ -1088,6 +1098,8 @@
1088
1098
  ### Added
1089
1099
  - Linter is published;
1090
1100
 
1101
+ [5.43.2]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.1...v5.43.2
1102
+ [5.43.1]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.0...v5.43.1
1091
1103
  [5.43.0]: https://github.com/FabiowQuixada/isml-linter/compare/v5.42.4...v5.43.0
1092
1104
  [5.42.4]: https://github.com/FabiowQuixada/isml-linter/compare/v5.42.3...v5.42.4
1093
1105
  [5.42.3]: https://github.com/FabiowQuixada/isml-linter/compare/v5.42.2...v5.42.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isml-linter",
3
- "version": "5.43.0",
3
+ "version": "5.43.2",
4
4
  "author": "Fabiow Quixadá <ftquixada@gmail.com>",
5
5
  "license": "MIT",
6
6
  "main": "src/publicApi.js",
@@ -45,8 +45,8 @@
45
45
  "eslint-plugin-varspacing": "^1.2.2",
46
46
  "ghooks": "^2.0.4",
47
47
  "jasmine": "^3.6.4",
48
- "jasmine-node": "^3.0.0",
49
- "rmdir": "^1.2.0",
48
+ "jasmine-node": "^1.16.0",
49
+ "rmdir": "^1.0.0",
50
50
  "sinon": "^9.2.4",
51
51
  "to-snake-case": "^1.0.0"
52
52
  }
@@ -77,7 +77,7 @@ const fixTemplateOrReportIssues = (config, ruleResult, templatePath, templateRes
77
77
  }
78
78
  };
79
79
 
80
- const fixTemplateOrReportIssuesForRuleList = (ruleArray, templatePath, root, config, data) => {
80
+ const fixTemplateOrReportIssuesForRuleList = (ruleArray, templatePath, rootNodeOrTemplateContent, config, data) => {
81
81
  const templateResults = {
82
82
  fixed : false,
83
83
  errors : {},
@@ -86,13 +86,20 @@ const fixTemplateOrReportIssuesForRuleList = (ruleArray, templatePath, root, con
86
86
  data
87
87
  };
88
88
 
89
+ let tempRootNodeOrTemplateContent = rootNodeOrTemplateContent;
90
+
89
91
  for (let i = 0; i < ruleArray.length; i++) {
90
92
  const rule = ruleArray[i];
91
93
  if (!rule.shouldIgnore(templatePath)) {
92
94
  try {
93
95
  ConsoleUtils.displayVerboseMessage(`Applying "${rule.id}" rule`, 1);
94
- const ruleResults = rule.check(root, templateResults.data);
96
+ const ruleResults = rule.check(tempRootNodeOrTemplateContent, templateResults.data);
95
97
  templateResults.finalContent = ruleResults.fixedContent;
98
+
99
+ if (typeof rootNodeOrTemplateContent === 'string') {
100
+ tempRootNodeOrTemplateContent = ruleResults.fixedContent;
101
+ }
102
+
96
103
  fixTemplateOrReportIssues(config, ruleResults, templatePath, templateResults, rule);
97
104
 
98
105
  } catch (error) {