@eimerreis/linting
v0.5.0
Published
Personal OXC linting and formatting defaults
Downloads
43
Maintainers
Readme
@eimerreis/linting
Personal linting and formatting defaults for new JavaScript/TypeScript projects.
Requires Node ^20.19.0 || >=22.12.0.
Zero peer-dependency setup for consumers: install only @eimerreis/linting.
Built on:
oxlintfor lintingoxfmtfor formatting
Default focus:
- React + TypeScript
- Next.js
- Tailwind class sorting
- Vitest rules
Install
npm add -D @eimerreis/lintinglint also executes react-doctor via:
npx react-doctor -y .Quick Start
From your project root:
npx @eimerreis/linting initOr with explicit command name:
npx eimerreis-linting initThis creates:
.oxlintrc.json.oxfmtrc.json
And updates package.json scripts (if present) so linting is executed through this package:
lintlint:fixformatformat:check
CLI options
eimerreis-linting init [targetDir] [--force] [--no-editor]
eimerreis-linting lint [targetDir] [--fix] [--ignore-path <path>] [--ignore-pattern <pattern>]
eimerreis-linting format [targetDir] [--check] [--ignore-path <path>] [--ignore-pattern <pattern>]init --force: overwrite existing.oxlintrc.json/.oxfmtrc.jsonand script valuesinit --no-editor: skip generating VS Code editor support fileslint --fix: runoxlint --fix .and then run react-doctorformat --check: runoxfmt --check .--ignore-path: add one ignore file (repeatable) for lint/format--ignore-pattern: add one glob pattern (repeatable) for lint/format
react-doctor runs only when the target package has react, react-dom, or next in dependencies/devDependencies/peerDependencies.
Ignoring files
Supported options:
eimerreis-linting lint --ignore-path .gitignore
eimerreis-linting format --check --ignore-path .gitignore --ignore-path .prettierignore
eimerreis-linting lint --ignore-pattern "dist/**" --ignore-pattern "coverage/**"
eimerreis-linting format --check --ignore-path .gitignore --ignore-pattern "**/*.generated.ts"You can also add a dedicated ignore file at project root:
.eimerreis-lintingignoreIf present, it is picked up automatically by both lint and format.
First-time one-shot usage
You do not need to run init first.
npx @eimerreis/linting lint
npx @eimerreis/linting format --checkBehavior:
- If project config exists (
.oxlintrc.*/oxlint.config.*,.oxfmtrc.*/oxfmt.config.*), it uses that. - If not, it falls back to the package's built-in defaults.
Editor Support
init also creates editor support files for VS Code:
.vscode/settings.json.vscode/extensions.json
These enable OXC as formatter/linter, format-on-save, and source.fixAll.oxc on save.
If you do not want editor files, use:
npx @eimerreis/linting init --no-editorCI Usage
For CI you can run directly with npx (no scaffold step required):
npx @eimerreis/linting lint
npx @eimerreis/linting format --checkManual Setup
If you do not want to use the init script, create the config files manually.
.oxlintrc.json
{
"extends": ["./node_modules/@eimerreis/linting/oxlint.config.json"]
}.oxfmtrc.json
{
"extends": ["./node_modules/@eimerreis/linting/oxfmt.config.json"]
}Scripts
Generated project scripts:
{
"scripts": {
"lint": "eimerreis-linting lint",
"lint:fix": "eimerreis-linting lint --fix",
"format": "eimerreis-linting format",
"format:check": "eimerreis-linting format --check",
"lint:ignore": "eimerreis-linting lint --ignore-path .eimerreis-lintingignore",
"format:check:ignore": "eimerreis-linting format --check --ignore-path .eimerreis-lintingignore"
}
}init also adds this dev dependency automatically (if missing):
{
"devDependencies": {
"@eimerreis/linting": "^<current-version>"
}
}Publish
Git-based release workflow (Changesets + GitHub Actions)
- Create a changeset:
npm run changeset- Commit
.changeset/*.mdand push tomain. - Workflow
Releasechecks for pending changesets. - If changesets exist, it versions, publishes via npm trusted publishing (OIDC), commits
chore: version packages, and creates a GitHub Release (v<version>) using the matchingCHANGELOG.mdsection as release notes.
Trusted publishing setup (one-time on npmjs.com):
- Package
@eimerreis/linting-> Settings -> Trusted Publisher - Provider: GitHub Actions
- Organization/user:
eimerreis - Repository:
eimerreis-linting - Workflow filename:
release.yml
No NPM_TOKEN secret is required for publishing.
