1.0.0 • Published 1 year ago

eslint-plugin-expect-file v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-plugin-expect-file

Enforce the use of specific file name, extension, type, ...

Installation

pnpm add -D eslint eslint-plugin-expect-file

Usage

Add it to your .eslintrc.js:

module.exports = {
  plugins: ['expect-file'],
  rules: {
    'expect-file/name-to-match-extension': [
      'warn',
      {
        './source/**': ['.ts'],
        './test/**': ['.test.ts'],
      },
    ],
    'expect-file/path-to-match-pattern': [
      'warn',
      {
        './source/**': ['**/*.ts'],
        './test/**': ['**/*.test.ts'],
      },
    ],
  },
};

Scaffolded with @skarab/skaffold