@dovenv/lint β
π Installation β
bash
npm install @dovenv/lintbash
pnpm install @dovenv/lintbash
yarn add @dovenv/lintbash
bun add @dovenv/lintbash
deno add @dovenv/lintFeatures β
- 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 eslintbash
dovenv lint eslint --fixYou 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 stylelintYou 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 commitlintYou 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 stagedYou 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' },
} ) )