|
| 1 | +diff --git a/node_modules/eslint-compat-utils/dist/index.d.ts b/node_modules/eslint-compat-utils/dist/index.d.ts |
| 2 | +index 993098a..ccb61ad 100644 |
| 3 | +--- a/node_modules/eslint-compat-utils/dist/index.d.ts |
| 4 | ++++ b/node_modules/eslint-compat-utils/dist/index.d.ts |
| 5 | +@@ -1,21 +1,23 @@ |
| 6 | +-import { Rule, SourceCode } from 'eslint'; |
| 7 | ++import { TSESLint } from '@typescript-eslint/utils' |
| 8 | ++ |
| 9 | ++type RuleContext = TSESLint.RuleContext<string, readonly unknown[]> |
| 10 | + |
| 11 | + /** |
| 12 | + * Returns an extended instance of `context.sourceCode` or the result of `context.getSourceCode()`. |
| 13 | + * Extended instances can use new APIs such as `getScope(node)` even with old ESLint. |
| 14 | + */ |
| 15 | +-declare function getSourceCode(context: Rule.RuleContext): SourceCode; |
| 16 | ++declare function getSourceCode(context: RuleContext): TSESLint.SourceCode; |
| 17 | + |
| 18 | + /** |
| 19 | + * Gets the value of `context.cwd`, but for older ESLint it returns the result of `context.getCwd()`. |
| 20 | + * Versions older than v6.6.0 return a value from the result of `process.cwd()`. |
| 21 | + */ |
| 22 | +-declare function getCwd(context: Rule.RuleContext): string; |
| 23 | ++declare function getCwd(context: RuleContext): string; |
| 24 | + |
| 25 | + /** |
| 26 | + * Gets the value of `context.filename`, but for older ESLint it returns the result of `context.getFilename()`. |
| 27 | + */ |
| 28 | +-declare function getFilename(context: Rule.RuleContext): string; |
| 29 | ++declare function getFilename(context: RuleContext): string; |
| 30 | + |
| 31 | + /** |
| 32 | + * Gets the value of `context.physicalFilename`, |
| 33 | +@@ -23,6 +25,6 @@ declare function getFilename(context: Rule.RuleContext): string; |
| 34 | + * Versions older than v7.28.0 return a value guessed from the result of `context.getFilename()`, |
| 35 | + * but it may be incorrect. |
| 36 | + */ |
| 37 | +-declare function getPhysicalFilename(context: Rule.RuleContext): string; |
| 38 | ++declare function getPhysicalFilename(context: RuleContext): string; |
| 39 | + |
| 40 | + export { getCwd, getFilename, getPhysicalFilename, getSourceCode }; |
0 commit comments