# file-naming-enforcer

> Enforce developers to use only one file naming convention inside the project

Latest version **1.9.0** (published 2024-06-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install file-naming-enforcer
pnpm add file-naming-enforcer
yarn add file-naming-enforcer
bun add file-naming-enforcer
```

Provides the commands `fne`, `file-naming-enforcer`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.9.0 |
| Published | 2024-06-23 |
| First published | 2019-08-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 18.17.0 |
| Dependencies | 2 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | sztadii |
| Keywords | enforcer, validation, file enforcer, file naming enforcer, convention enforcer |

## Links

- npm: https://www.npmjs.com/package/file-naming-enforcer
- Repository: https://github.com/sztadii/file-naming-enforcer
- Issues: https://github.com/sztadii/file-naming-enforcer/issues
- npm.io page: https://npm.io/package/file-naming-enforcer

## Dependencies (2)

- [find](https://npm.io/package/find.md) 0.3.0
- [lodash](https://npm.io/package/lodash.md) 4.17.20

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.9.0 (latest) — 2024-06-23
- 1.8.0 — 2024-06-23
- 1.7.0 — 2024-06-23
- 1.6.0 — 2022-08-05
- 1.5.2 — 2022-07-28
- 1.5.1 — 2022-07-27
- 1.5.0 — 2022-07-27
- 1.4.0 — 2021-07-17
- 1.2.1 — 2021-01-03
- 1.2.0 — 2020-12-03
- 1.1.11 — 2020-10-16
- 1.1.10 — 2020-10-16
- 1.1.9 — 2020-10-16
- 1.1.8 — 2020-08-26
- 1.1.7 — 2020-07-16
- … 8 more at https://npm.io/package/file-naming-enforcer/versions

## README

# Welcome to **[file-naming-enforcer](https://github.com/sztadii/file-naming-enforcer)**!

## Problem to solve

If your team wants to follow any file naming convention, <br />
like a capital case for classes / components or kebab case for styles etc, <br />
then you should automate it and forget about the unnecessary discussion during code review. <br />

## How to install

```
npm i -D file-naming-enforcer
```

## How to use

```
"scripts": {
  "lint-components": "file-naming-enforcer type=capitalize folder=./src/components ext=js",
  "lint-styles": "file-naming-enforcer type=kebabCase folder=./src ext=scss",
  "lint-utils": "file-naming-enforcer type=camelCase folder=./src/utils ext=js",
  "lint-all": "file-naming-enforcer type=kebabCase ignore=[README.md,Dockerfile]",
}
```

PS. You can also use shortcut `fne`
```
fne type=capitalize folder=./src/components ext=js
```

## Expected result:

Once everything will be set up properly, <br />
and some files will be not following our project convention, <br />
then you should see below errors <br />

![Screenshot](https://raw.githubusercontent.com/sztadii/file-naming-enforcer/master/error-example.png?raw=true)

---
_Source: https://npm.io/package/file-naming-enforcer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
