isml-linter 5.43.9 → 5.43.10
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 +9 -0
- package/README.md +4 -4
- package/package.json +1 -2
- package/src/rules/tree/indent.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.43.10] - 2025-12-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- "indent" rule - content of a "style" tag should be ignored completely;
|
|
7
|
+
- Fixed README commands to use "npx";
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
- Removed unncecessary dependency;
|
|
11
|
+
|
|
3
12
|
## [5.43.9] - 2023-03-05
|
|
4
13
|
|
|
5
14
|
### Fixed
|
package/README.md
CHANGED
|
@@ -24,10 +24,10 @@ and add the following to package.json:
|
|
|
24
24
|
|
|
25
25
|
```js
|
|
26
26
|
"scripts": {
|
|
27
|
-
"init:isml": "
|
|
28
|
-
"lint:isml": "
|
|
29
|
-
"build:isml": "
|
|
30
|
-
"fix:isml": "
|
|
27
|
+
"init:isml": "npx isml-linter --init",
|
|
28
|
+
"lint:isml": "npx isml-linter",
|
|
29
|
+
"build:isml": "npx isml-linter --build",
|
|
30
|
+
"fix:isml": "npx isml-linter --autofix"
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isml-linter",
|
|
3
|
-
"version": "5.43.
|
|
3
|
+
"version": "5.43.10",
|
|
4
4
|
"author": "Fabiow Quixadá <ftquixada@gmail.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/publicApi.js",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"ghooks": "^2.0.4",
|
|
47
47
|
"jasmine": "^3.6.4",
|
|
48
48
|
"jasmine-node": "^1.16.0",
|
|
49
|
-
"rmdir": "^1.0.0",
|
|
50
49
|
"sinon": "^9.2.4",
|
|
51
50
|
"to-snake-case": "^1.0.0"
|
|
52
51
|
}
|
package/src/rules/tree/indent.js
CHANGED
|
@@ -609,6 +609,12 @@ const getClosingChars = node => {
|
|
|
609
609
|
return '';
|
|
610
610
|
};
|
|
611
611
|
|
|
612
|
+
const shouldChangeIndentation = node => {
|
|
613
|
+
return !node.isRoot() &&
|
|
614
|
+
!node.isContainer() &&
|
|
615
|
+
!node.parent.isOneOfTypes(['isscript', 'script', 'style']);
|
|
616
|
+
}
|
|
617
|
+
|
|
612
618
|
const addIndentation = (node, isOpeningTag) => {
|
|
613
619
|
const content = isOpeningTag ? node.head : node.tail;
|
|
614
620
|
const startingPos = ParseUtils.getNextNonEmptyCharPos(content);
|
|
@@ -660,7 +666,7 @@ const addIndentation = (node, isOpeningTag) => {
|
|
|
660
666
|
};
|
|
661
667
|
|
|
662
668
|
const removeAllIndentation = node => {
|
|
663
|
-
if (
|
|
669
|
+
if (shouldChangeIndentation(node)) {
|
|
664
670
|
|
|
665
671
|
const shouldRemoveHeadIndentation = node.head && !node.isInSameLineAsPreviousSibling() && !node.isInSameLineAsParent() && !(node.lineNumber === node.parent.endLineNumber);
|
|
666
672
|
const shouldRemoveTailIndentation = !!(node.tail && !(node.hasChildren() && node.getLastChild().lineNumber === node.tailLineNumber));
|
|
@@ -681,7 +687,7 @@ const removeAllIndentation = node => {
|
|
|
681
687
|
|
|
682
688
|
const addCorrectIndentation = node => {
|
|
683
689
|
|
|
684
|
-
if (
|
|
690
|
+
if (shouldChangeIndentation(node)) {
|
|
685
691
|
if (node.parent.isOfType('iscomment')) {
|
|
686
692
|
const shouldAddIndentationToText = checkIfShouldAddIndentationToHead(node);
|
|
687
693
|
|