Module directives

Module directives 

Source
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   |
  +-------------------------------------------------------------------------------+
                                     Directive

Structs§

CommandDescriptor
A structure describing a command.
Component
A Component represents a parsed Instruction, that also has a span, so you can find the Component at any span in the directive.
Directive
Any command that is given to the linter using an inline comment.
DirectiveError
DirectiveParser
DirectiveResult
The result of a parsed directive.

Enums§

Command
All different directive commands.
ComponentKind
DirectiveErrorKind
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

Type Aliases§

Result