@dovenv/lint โ
๐ Installation โ
bash
npm install @dovenv/lint
bash
pnpm install @dovenv/lint
bash
yarn add @dovenv/lint
bash
bun add @dovenv/lint
bash
deno add @dovenv/lint
Features โ
- ESLint
- Stylelint
- Commitlint
- Lint-staged
๐ Usage โ
eslint โ
Run ESLint to analyze and fix JavaScript/TypeScript code.
It is required to have eslint installed.
bash
dovenv lint eslint
bash
dovenv lint eslint --fix
You can pass eslint options to the plugin.
js
import { defineConfig } from '@dovenv/core'
import lintPlugin from '@dovenv/lint'
export default defineConfig( lintPlugin( {
eslint : { /** options */ },
} ) )
stylelint โ
Run Stylelint to analyze and fix CSS/SCSS files.
bash
dovenv lint stylelint
You can pass stylelint options to the plugin.
js
import { defineConfig } from '@dovenv/core'
import lintPlugin from '@dovenv/lint'
export default defineConfig( lintPlugin( {
stylelint : { configFile: 'stylelint.config.js' },
} ) )
commitlint โ
Run Commitlint to enforce commit message conventions.
bash
dovenv lint commitlint
You can pass commitlint options to the plugin.
js
import { defineConfig } from '@dovenv/core'
import lintPlugin from '@dovenv/lint'
export default defineConfig( lintPlugin( {
commitlint : { gitmoji: true },
} ) )
staged โ
Lint files staged for commit using the configured linters.
bash
dovenv lint staged
You can pass staged options to the plugin.
js
import { defineConfig } from '@dovenv/core'
import lintPlugin from '@dovenv/lint'
export default defineConfig( lintPlugin( {
staged : { '**/*.{js,ts,jsx,tsx}': 'eslint' },
} ) )