eslint-plugin-mgw-eslint-rules 2.3.7 → 2.3.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/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44165,14 +44165,14 @@ var rule5 = createRule5({
|
|
|
44165
44165
|
const parserServices = (0, import_utils5.getTemplateParserServices)(context);
|
|
44166
44166
|
return {
|
|
44167
44167
|
// Détecte les attributs ngClass dans les templates
|
|
44168
|
-
"Element[
|
|
44169
|
-
const
|
|
44170
|
-
for (const
|
|
44171
|
-
if (
|
|
44168
|
+
"Element[inputs]"(node) {
|
|
44169
|
+
const inputs = node.inputs;
|
|
44170
|
+
for (const ipt of inputs) {
|
|
44171
|
+
if (ipt.name === "ngClass" || ipt.name === "ngStyle") {
|
|
44172
44172
|
const loc = parserServices.convertNodeSourceSpanToLoc(node.sourceSpan);
|
|
44173
44173
|
context.report({
|
|
44174
44174
|
loc,
|
|
44175
|
-
messageId:
|
|
44175
|
+
messageId: ipt.name === "ngClass" ? "preferClassBinding" : "preferStyleBinding"
|
|
44176
44176
|
});
|
|
44177
44177
|
}
|
|
44178
44178
|
}
|