Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skarab42/eslint-plugin-expect-file

Enforce the use of specific file name, extension, type, ...
https://github.com/skarab42/eslint-plugin-expect-file

eslint eslint-plugin file pattern plugin

Last synced: 10 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# eslint-plugin-expect-file

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

## Installation

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

## Usage

Add it to your `.eslintrc.js`:

```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](https://www.npmjs.com/package/@skarab/skaffold)