Improve `this.log` for rule base class
See original GitHub issueCurrently calling this.log
requires a few properties to be provided manually:
this.log({
message: `some message`,
line: node.loc && node.loc.start.line,
column: node.loc && node.loc.start.column,
source: this.sourceForNode(node),
});
I’d like to add the ability to pass node
and have line
,column
, and source
inferred. Something like:
this.log({
message: `Passing the \`${specifiedKey}\` property as an argument within templates is not allowed.`,
node,
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Log rules: Justifying the logarithm properties (article)
In this lesson, we will prove three logarithm properties: the product rule, the quotient rule, and the power rule. Before we begin, let's...
Read more >Logging or ignoring rule actions - IBM
Logging or ignoring rule actions. Logging actions control the level of logging based on the observed traffic. Access rules, exception rules, and extrusion...
Read more >How to create a BaseClass that adds logging messages
Honestly it is a neat trick and if you get it working you should be proud. I think I figured something similar out...
Read more >Understanding Log Scales and Log Rules
This rule is based on a series of diagrams outlining the sawing pattern for 1-inch lumber for each diameter and length class with...
Read more >Define a Log Inspection rule for use in policies | Deep Security
To create Log Inspection rules, perform these basic steps: Create a new Log Inspection rule; Decoders; Subrules; Real world examples; Log Inspection rule...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure how that is better. In those cases, just pass those nodes in directly.
@rwjblue I mean, if we need to highlight component tag name, we don’t need to highlight whole component block, highlighting
Foo
from<Foo @name={{a}} />
instead of<Foo @name={{a}} />
.and idea is add property path, and linter will figure out where this property located and highlight it.