Detalhes do pacote

@voxpelli/config-array-find-files

voxpelli155.2kMIT1.2.2

A proof of concept of a generic equivalent of ESLint's globSearch() for use with ConfigArray

readme (leia-me)

@voxpelli/config-array-find-files

A proof of concept of a generic equivalent of ESLint's globSearch() for use with ConfigArray

npm version npm downloads neostandard javascript style Module type: ESM Types in JS Follow @voxpelli@mastodon.social

Usage

import { ConfigArray } from '@eslint/config-array';
import { configArrayFindFiles } from '@voxpelli/config-array-find-files';

// Ensure you have a normalized config at hand...

const configs = new ConfigArray([
  { files: ['*.js'] },
  { files: ['*.md'] },
]);
await configs.normalize();

// ...then you are ready to find some files!

const filePaths = await configArrayFindFiles({
  basePath: path.join(dirname(import.meta.url), '../'),
  configs,
});

API

configArrayFindFiles()

Takes a value (input), does something configured by the config (configParam) and returns the processed value asyncly(output)

Syntax

configArrayFindFiles(options) => Promise<string[]>

Options

  • basePath - the directory to search
  • configs - the config array to use for determining what to ignore
  • deepFilter - optional function that indicates whether the directory will be read deep or not
  • entryFilter - optional function that indicates whether the entry will be included to results or not

Returns

A Promise that resolves to an array with string file paths for all matching files

changelog (log de mudanças)

Changelog

1.2.2 (2025-01-04)

🧹 Chores

  • deps: update @voxpelli/tsconfig to v15 (#22) (3a9242e)
  • deps: update dependency @nodelib/fs.walk to v3 (#16) (5ff9947)
  • deps: update dependency @types/node to ^18.19.69 (#13) (24fa90a)
  • deps: update dependency knip to ^5.41.1 (#15) (06bd14f)
  • deps: update test dependencies (#12) (3e79ea5)
  • deps: update test dependencies (#19) (c68225b)
  • fix tests (11f006a)
  • update linting config (12abe81)

1.2.1 (2024-09-13)

📚 Documentation

🧹 Chores

  • deps: update dependency @eslint/config-array to ^0.18.0 (#5) (da35d7c)
  • deps: update dev dependencies (13f156d)
  • deps: update linting dependencies (77c888c)