Skip to content

Commit

Permalink
Document addNamedImport util
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Jun 10, 2024
1 parent 9013404 commit afb37c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eslint-plugin-expensify/utils/imports.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* Adds a named import to the import statement or creates a new import statement if it doesn't exist.
*
* @param {Object} context - The ESLint rule context.
* @param {Object} fixer - The ESLint fixer object.
* @param {ASTNode} importNode - The import statement node.
* @param {string} importName - The name of the import.
* @param {string} importPath - The path of the import.
* @param {boolean} [importAsType=false] - Whether the import should be treated as a type import.
* @returns {Array} An array of fixes to be applied by the fixer.
*/
function addNamedImport(context, fixer, importNode, importName, importPath, importAsType = false) {
const fixes = [];

Expand Down

0 comments on commit afb37c3

Please sign in to comment.