Vite
plugin to use the directory and filename linter
ls-lint
.
├── src
├── node_modules
└── .gitignore
└── ...
├── .ls-lint.yml
├── ...
├── package.json
├── package-lock.json
└── vite.config.js/ts
- Install with your favorite package manager:
- pnpm :
pnpm i vite-plugin-ls-lint --save-dev
- npm :
npm i vite-plugin-ls-lint --save-dev
- pnpm :
Note:
You also need to install ls-lint >= 2, if you haven't already:
You also need to install ls-lint >= 2, if you haven't already:
npm i @ls-lint/ls-lint --save-dev
🤙🏼Or install both with:
npm i @ls-lint/ls-lint vite-plugin-ls-lint --save-dev
- Add the plugin into vite.config.js/ts:
import { defineConfig } from 'vite'
// other imports
import lsLintPlugin from 'vite-plugin-ls-lint'
export default defineConfig({
plugins: [
// ... other plugins
lsLintPlugin()
],
})
- Add your ls-lint.yml configuration file, example:
ls:
.js: snake_case
.ts: snake_case | camelCase
.d.ts: PascalCase
.html: regex:[a-z0-9]+
ignore:
- node_modules
Copyright © 2023 Alonso Galicia.
This project is under MIT license.