npm.io
1.3.1 • Published 4 years ago

@code-rub/filter-files

Licence
—
Version
1.3.1
Deps
0
Size
4 kB
Vulns
0
Weekly
0

@code-rub/filter-files plugin

Usage

Install with npm or yarn:

  • npm i --save-dev @code-rub/filter-files
  • yarn add --dev @code-rub/filter-files

Setup inside of your code-rub.config.js file:

  • Add @code-rub/filter-files to the plugins array.
  • Add an entry to pluginConfiguration with @code-rub/filter-files as the key.
    • Set up any bannedFileNames, bannedGlobPatterns, and allowedFileTypes inside of the config. Below is an example configuration, as used in this repository.
module.exports = {
  plugins: [
    '@code-rub/filter-files',
  ],
  pluginConfiguration: {
    '@code-rub/filter-files': {
      allowedFileExtensions: ['.ts', '.js'],
      bannedGlobPatterns: ['*.config.ts'],
      bannedFileNames: ['jest.config.js', 'code-rub.config.js', 'jest.preset.js'],
    },
  },
};