@master/eslint-plugin-css 2.0.0-rc.36 → 2.0.0-rc.38
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.
|
@@ -52,7 +52,7 @@ var extractRangeFromNode = require('./extract-range-from-node.cjs');
|
|
|
52
52
|
switch(childNode.type){
|
|
53
53
|
case 'TemplateLiteral':
|
|
54
54
|
childNode.expressions.forEach((exp)=>{
|
|
55
|
-
parseNodeRecursive(rootNode, exp, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
55
|
+
parseNodeRecursive(rootNode, exp, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
56
56
|
});
|
|
57
57
|
const sourceCode = context.sourceCode;
|
|
58
58
|
originalClassNamesValue = sourceCode.getText(childNode);
|
|
@@ -63,15 +63,15 @@ var extractRangeFromNode = require('./extract-range-from-node.cjs');
|
|
|
63
63
|
}
|
|
64
64
|
break;
|
|
65
65
|
case 'ConditionalExpression':
|
|
66
|
-
parseNodeRecursive(rootNode, childNode.consequent, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
67
|
-
parseNodeRecursive(rootNode, childNode.alternate, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
66
|
+
parseNodeRecursive(rootNode, childNode.consequent, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
67
|
+
parseNodeRecursive(rootNode, childNode.alternate, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
68
68
|
return;
|
|
69
69
|
case 'LogicalExpression':
|
|
70
|
-
parseNodeRecursive(rootNode, childNode.right, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
70
|
+
parseNodeRecursive(rootNode, childNode.right, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
71
71
|
return;
|
|
72
72
|
case 'ArrayExpression':
|
|
73
73
|
childNode.elements.forEach((el)=>{
|
|
74
|
-
parseNodeRecursive(rootNode, el, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
74
|
+
parseNodeRecursive(rootNode, el, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
75
75
|
});
|
|
76
76
|
return;
|
|
77
77
|
case 'ObjectExpression':
|
|
@@ -85,11 +85,11 @@ var extractRangeFromNode = require('./extract-range-from-node.cjs');
|
|
|
85
85
|
// Ignore specific keys defined in settings
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
parseNodeRecursive(rootNode, isUsedByClassNamesPlugin ? prop.key : prop.value, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
88
|
+
parseNodeRecursive(rootNode, isUsedByClassNamesPlugin ? prop.key : prop.value, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
89
89
|
});
|
|
90
90
|
return;
|
|
91
91
|
case 'Property':
|
|
92
|
-
parseNodeRecursive(rootNode, childNode.key, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
92
|
+
parseNodeRecursive(rootNode, childNode.key, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
93
93
|
return;
|
|
94
94
|
case 'Literal':
|
|
95
95
|
originalClassNamesValue = childNode.value;
|
|
@@ -10,4 +10,4 @@ import type { RuleContext } from '@typescript-eslint/utils/ts-eslint';
|
|
|
10
10
|
* @param {Array} ignoredKeys Optional, set object keys which should not be parsed e.g. for `cva`
|
|
11
11
|
* @returns {void}
|
|
12
12
|
*/
|
|
13
|
-
export declare function parseNodeRecursive(rootNode: any, childNode: any, cb: any, skipConditional
|
|
13
|
+
export declare function parseNodeRecursive(rootNode: any, childNode: any, cb: any, skipConditional: boolean, isolate: boolean, ignoredKeys: any[], context: RuleContext<any, any>): void;
|
|
@@ -50,7 +50,7 @@ import extractRangeFromNode from './extract-range-from-node.mjs';
|
|
|
50
50
|
switch(childNode.type){
|
|
51
51
|
case 'TemplateLiteral':
|
|
52
52
|
childNode.expressions.forEach((exp)=>{
|
|
53
|
-
parseNodeRecursive(rootNode, exp, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
53
|
+
parseNodeRecursive(rootNode, exp, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
54
54
|
});
|
|
55
55
|
const sourceCode = context.sourceCode;
|
|
56
56
|
originalClassNamesValue = sourceCode.getText(childNode);
|
|
@@ -61,15 +61,15 @@ import extractRangeFromNode from './extract-range-from-node.mjs';
|
|
|
61
61
|
}
|
|
62
62
|
break;
|
|
63
63
|
case 'ConditionalExpression':
|
|
64
|
-
parseNodeRecursive(rootNode, childNode.consequent, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
65
|
-
parseNodeRecursive(rootNode, childNode.alternate, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
64
|
+
parseNodeRecursive(rootNode, childNode.consequent, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
65
|
+
parseNodeRecursive(rootNode, childNode.alternate, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
66
66
|
return;
|
|
67
67
|
case 'LogicalExpression':
|
|
68
|
-
parseNodeRecursive(rootNode, childNode.right, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
68
|
+
parseNodeRecursive(rootNode, childNode.right, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
69
69
|
return;
|
|
70
70
|
case 'ArrayExpression':
|
|
71
71
|
childNode.elements.forEach((el)=>{
|
|
72
|
-
parseNodeRecursive(rootNode, el, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
72
|
+
parseNodeRecursive(rootNode, el, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
73
73
|
});
|
|
74
74
|
return;
|
|
75
75
|
case 'ObjectExpression':
|
|
@@ -83,11 +83,11 @@ import extractRangeFromNode from './extract-range-from-node.mjs';
|
|
|
83
83
|
// Ignore specific keys defined in settings
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
parseNodeRecursive(rootNode, isUsedByClassNamesPlugin ? prop.key : prop.value, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
86
|
+
parseNodeRecursive(rootNode, isUsedByClassNamesPlugin ? prop.key : prop.value, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
87
87
|
});
|
|
88
88
|
return;
|
|
89
89
|
case 'Property':
|
|
90
|
-
parseNodeRecursive(rootNode, childNode.key, cb, skipConditional, forceIsolation, ignoredKeys);
|
|
90
|
+
parseNodeRecursive(rootNode, childNode.key, cb, skipConditional, forceIsolation, ignoredKeys, context);
|
|
91
91
|
return;
|
|
92
92
|
case 'Literal':
|
|
93
93
|
originalClassNamesValue = childNode.value;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@master/eslint-plugin-css","type":"module","scripts":{"build":"techor build \"src/**/*.{js,ts}\"","dev":"pnpm build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"keywords":["mastercss","eslint","eslintplugin"],"license":"MIT","description":"Master CSS ESLint Plugin","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/eslint-plugin"},"sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"}},"files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/css":"^2.0.0-rc.
|
|
1
|
+
{"name":"@master/eslint-plugin-css","type":"module","scripts":{"build":"techor build \"src/**/*.{js,ts}\"","dev":"pnpm build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"keywords":["mastercss","eslint","eslintplugin"],"license":"MIT","description":"Master CSS ESLint Plugin","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/eslint-plugin"},"sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","types":"./dist/index.d.ts"}},"files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/css":"^2.0.0-rc.38","@master/css-explore-config":"^2.0.0-rc.38","@master/css-validator":"^2.0.0-rc.38","@typescript-eslint/utils":"^7.7.0","synckit":"^0.9.0","typescript-eslint":"^7.7.0"},"devDependencies":{"@angular-eslint/template-parser":"^17.3.0","@master/css-explore-config":"^2.0.0-rc.38","@master/css-shared":"^2.0.0-rc.38","@types/node":"^20.12.7","@typescript-eslint/rule-tester":"^7.7.0","eslint":"^8.57.0","eslint-plugin-markdown":"^4.0.1","eslint-plugin-mdx":"^3.1.5","svelte-eslint-parser":"^0.34.1","ts-node":"^10.9.2","vue-eslint-parser":"^9.4.2"},"version":"2.0.0-rc.38"}
|