Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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, ...
- Host: GitHub
- URL: https://github.com/skarab42/eslint-plugin-expect-file
- Owner: skarab42
- License: mit
- Created: 2022-11-27T15:13:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-27T15:17:34.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T21:46:58.979Z (about 1 month ago)
- Topics: eslint, eslint-plugin, file, pattern, plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-expect-file
- Size: 79.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)