Expand description
Directives used to configure or ignore rules. These take place of comments over nodes or comments at the top level.
Directives can contain multiple commands separated by -. For example:
// rslint-ignore for-direction, no-await-in-loop - deny no-empty -- because why not
| | | | | | |
| +-------------------------------------+ +------------+ +-------------+
| command command comment |
+-------------------------------------------------------------------------------+
DirectiveStructs§
- Command
Descriptor - A structure describing a command.
- Component
- A
Componentrepresents a parsedInstruction, that also has a span, so you can find theComponentat any span in the directive. - Directive
- Any command that is given to the linter using an inline comment.
- Directive
Error - Directive
Parser - Directive
Result - The result of a parsed directive.
Enums§
- Command
- All different directive commands.
- Component
Kind - Directive
Error Kind - Instruction
Instructions are used to add directives to the parser.
Constants§
- DECLARATOR
- A string that denotes that start of a directive (
rslint-).
Functions§
- apply_
node_ directives - apply_
top_ level_ directives - Apply file level directives to a store and add their respective diagnostics to the pool of diagnostics. for file level ignores this will clear all the rules from the store.
- disable_
command_ descriptor - enable_
command_ descriptor - get_
command_ descriptors - Get all of the possible command descriptors
- ignore_
command_ descriptor - skip_
node