@cleeviox/lint-staged
v0.1.0
Published
Lint-staged configuration used on CleevioX projects
Maintainers
Readme
LINT-STAGED
Lint-staged configuration used on CleevioX projects
Installation
bun add --dev @cleeviox/lint-staged lint-stagedUsage
Standalone Repositories
For simple, non-monorepo project, add the following configuration to your project root by creating a lint-staged.config.js file with the following contents:
import { basicProject } from '@cleeviox/lint-staged';
/**
* @filename: lint-staged.config.js
* @type {import('lint-staged').Configuration}
*/
export default {
// Additional configuration
...projectRoot,
}Monorepo Root
If your project is a monorepo, install lint-staged and create a lint-staged.config.js file in the repository root as such:
import { projectRoot } from '@cleeviox/lint-staged';
/**
* @filename: lint-staged.config.js
* @type {import('lint-staged').Configuration}
*/
export default {
// Additional configuration
...projectRoot,
};Monorepo Workspaces
Every workspace i.e. every directory inside apps/ or packages/ must have its own lint-staged.config.js as such:
import { workspace } from '@cleeviox/lint-staged';
/**
* @filename: lint-staged.config.js
* @type {import('lint-staged').Configuration}
*/
export default {
// Additional configuration
...projectRoot,
};Available Configurations
| Export | Description |
|--------|-------------|
| projectRoot | Configuration for monorepo root with special file handling |
| workspace | Configuration for monorepo workspaces |
| basicProject | Configuration for single-package repositories |
Integration with Husky
Add lint-staged to your pre-commit hook:
# .husky/pre-commit
bun lint-staged