|
20 | 20 |
|
21 | 21 | CodePathAnalyzer = require("../../../linter/code-path-analysis/code-path-analyzer"), |
22 | 22 | createEmitter = require("../../../linter/safe-emitter"), |
23 | | - { ConfigCommentParser, VisitNodeStep, CallMethodStep } = require("@eslint/plugin-kit"), |
| 23 | + { ConfigCommentParser, VisitNodeStep, CallMethodStep, Directive } = require("@eslint/plugin-kit"), |
24 | 24 |
|
25 | 25 | eslintScope = require("eslint-scope"); |
26 | 26 |
|
@@ -316,57 +316,6 @@ function markExportedVariables(globalScope, variables) { |
316 | 316 |
|
317 | 317 | } |
318 | 318 |
|
319 | | -/** |
320 | | - * A class to represent a directive comment. |
321 | | - * @implements {IDirective} |
322 | | - */ |
323 | | -class Directive { |
324 | | - |
325 | | - /** |
326 | | - * The type of directive. |
327 | | - * @type {"disable"|"enable"|"disable-next-line"|"disable-line"} |
328 | | - * @readonly |
329 | | - */ |
330 | | - type; |
331 | | - |
332 | | - /** |
333 | | - * The node representing the directive. |
334 | | - * @type {ASTNode|Comment} |
335 | | - * @readonly |
336 | | - */ |
337 | | - node; |
338 | | - |
339 | | - /** |
340 | | - * Everything after the "eslint-disable" portion of the directive, |
341 | | - * but before the "--" that indicates the justification. |
342 | | - * @type {string} |
343 | | - * @readonly |
344 | | - */ |
345 | | - value; |
346 | | - |
347 | | - /** |
348 | | - * The justification for the directive. |
349 | | - * @type {string} |
350 | | - * @readonly |
351 | | - */ |
352 | | - justification; |
353 | | - |
354 | | - /** |
355 | | - * Creates a new instance. |
356 | | - * @param {Object} options The options for the directive. |
357 | | - * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. |
358 | | - * @param {ASTNode|Comment} options.node The node representing the directive. |
359 | | - * @param {string} options.value The value of the directive. |
360 | | - * @param {string} options.justification The justification for the directive. |
361 | | - */ |
362 | | - constructor({ type, node, value, justification }) { |
363 | | - this.type = type; |
364 | | - this.node = node; |
365 | | - this.value = value; |
366 | | - this.justification = justification; |
367 | | - } |
368 | | -} |
369 | | - |
370 | 319 | //------------------------------------------------------------------------------ |
371 | 320 | // Public Interface |
372 | 321 | //------------------------------------------------------------------------------ |
|
0 commit comments