ags
This commit is contained in:
parent
eddf7cecb8
commit
aea798d119
16631 changed files with 1480363 additions and 257 deletions
28
home/ags/node_modules/eslint-compat-utils/dist/index.d.ts
generated
vendored
Normal file
28
home/ags/node_modules/eslint-compat-utils/dist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { Rule, SourceCode } from 'eslint';
|
||||
|
||||
/**
|
||||
* Returns an extended instance of `context.sourceCode` or the result of `context.getSourceCode()`.
|
||||
* Extended instances can use new APIs such as `getScope(node)` even with old ESLint.
|
||||
*/
|
||||
declare function getSourceCode(context: Rule.RuleContext): SourceCode;
|
||||
|
||||
/**
|
||||
* Gets the value of `context.cwd`, but for older ESLint it returns the result of `context.getCwd()`.
|
||||
* Versions older than v6.6.0 return a value from the result of `process.cwd()`.
|
||||
*/
|
||||
declare function getCwd(context: Rule.RuleContext): string;
|
||||
|
||||
/**
|
||||
* Gets the value of `context.filename`, but for older ESLint it returns the result of `context.getFilename()`.
|
||||
*/
|
||||
declare function getFilename(context: Rule.RuleContext): string;
|
||||
|
||||
/**
|
||||
* Gets the value of `context.physicalFilename`,
|
||||
* but for older ESLint it returns the result of `context.getPhysicalFilename()`.
|
||||
* Versions older than v7.28.0 return a value guessed from the result of `context.getFilename()`,
|
||||
* but it may be incorrect.
|
||||
*/
|
||||
declare function getPhysicalFilename(context: Rule.RuleContext): string;
|
||||
|
||||
export { getCwd, getFilename, getPhysicalFilename, getSourceCode };
|
||||
Loading…
Add table
Add a link
Reference in a new issue