⬅️ Back to Table of Contents
📄 getWrappingFixer.test.ts
📊 Analysis Summary
Metric |
Count |
🔧 Functions |
66 |
📦 Imports |
5 |
📊 Variables & Constants |
1 |
📚 Table of Contents
🛠️ File Location:
📂 packages/eslint-plugin/tests/util/getWrappingFixer.test.ts
📦 Imports
Name |
Source |
TSESTree |
@typescript-eslint/utils |
RuleTester |
@typescript-eslint/rule-tester |
createRule |
../../src/util |
getWrappingFixer |
../../src/util |
getFixturesRootDir |
../RuleTester |
Variables & Constants
Name |
Type |
Kind |
Value |
Exported |
ruleTester |
any |
const |
`new RuleTester({ |
|
languageOptions: { |
|
|
|
|
parserOptions: { |
|
|
|
|
project: './tsconfig.json', |
|
|
|
|
tsconfigRootDir: rootPath, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
})` |
✗ |
|
|
|
Functions
report(node: TSESTree.Node): void
Code
(node: TSESTree.Node): void => {
context.report({
fix: getWrappingFixer({
node,
sourceCode: context.sourceCode,
wrap: code => `void ${code.replaceAll('wrap', 'wrapped')}`,
}),
messageId: 'addVoid',
node,
});
}
- Parameters:
node: TSESTree.Node
- Return Type:
void
- Calls:
context.report
getWrappingFixer (from ../../src/util)
code.replaceAll
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
code => `void ${code.replaceAll('wrap', 'wrapped')}`
- Parameters:
code: string
- Return Type:
string
report(node: TSESTree.CallExpression): void
Code
(node: TSESTree.CallExpression): void => {
context.report({
fix: getWrappingFixer({
innerNode: [node.arguments[0]],
node,
sourceCode: context.sourceCode,
wrap: code => code,
}),
messageId: 'removeFunction',
node,
});
}
- Parameters:
node: TSESTree.CallExpression
- Return Type:
void
- Calls:
context.report
getWrappingFixer (from ../../src/util)
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string
wrap(code: string): string
Code
- Parameters:
code: string
- Return Type:
string