Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b852ce

Browse files
authored
refactor: useDirective class from@eslint/plugin-kit (#18884)
1 parenta48f8c2 commit7b852ce

File tree

2 files changed

+2
-53
lines changed

2 files changed

+2
-53
lines changed

‎lib/languages/js/source-code/source-code.js‎

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const
2020

2121
CodePathAnalyzer=require("../../../linter/code-path-analysis/code-path-analyzer"),
2222
createEmitter=require("../../../linter/safe-emitter"),
23-
{ ConfigCommentParser, VisitNodeStep, CallMethodStep}=require("@eslint/plugin-kit"),
23+
{ ConfigCommentParser, VisitNodeStep, CallMethodStep, Directive}=require("@eslint/plugin-kit"),
2424

2525
eslintScope=require("eslint-scope");
2626

@@ -316,57 +316,6 @@ function markExportedVariables(globalScope, variables) {
316316

317317
}
318318

319-
/**
320-
* A class to represent a directive comment.
321-
*@implements {IDirective}
322-
*/
323-
classDirective{
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-
370319
//------------------------------------------------------------------------------
371320
// Public Interface
372321
//------------------------------------------------------------------------------

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"@eslint/config-array":"^0.18.0",
8383
"@eslint/eslintrc":"^3.1.0",
8484
"@eslint/js":"9.10.0",
85-
"@eslint/plugin-kit":"^0.1.0",
85+
"@eslint/plugin-kit":"^0.2.0",
8686
"@humanwhocodes/module-importer":"^1.0.1",
8787
"@humanwhocodes/retry":"^0.3.0",
8888
"@nodelib/fs.walk":"^1.2.8",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp