npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@commencis/lint-staged-config

v0.0.1

Published

Commencis Lint-Staged config

Downloads

68

Readme

@commencis/lint-staged-config

A reusable configuration package that streamlines linting for staged files, ensuring code quality and formatting with tools like ESLint, Prettier, and TypeScript. It simplifies setup, promotes consistency across projects, and enforces best practices before commits, making it an essential tool for modern development workflows.

Installation

To use this Lint-Staged configuration in your project, simply install it as a dev dependency:

With npm:

npm install --save-dev lint-staged @commencis/lint-staged-config

With yarn:

yarn add --dev lint-staged @commencis/lint-staged-config

With pnpm:

pnpm add --save-dev lint-staged @commencis/lint-staged-config

Recommended: Use Husky for Git-Hooks

Install dependencies

npm install --save-dev husky

Add your custom script into your `package.json``

"scripts":{
  "precommit": "lint-staged"
}

Initialize husky with npx husky init and create your ./husky/pre-commit hook as follows:

pnpm run precommit
# Use npm or yarn as per your choice (replace 'pnpm' accordingly)

Ready-to-Use Configurations

  • baseConfig: Includes Prettier formatting for json and md files.

  • typescriptConfig: Extends baseConfig with linting commands for TypeScript using ESLint and Prettier.

  • reactConfig: Builds on typescriptConfig and adds style-related linting commands.

  • reactNativeConfig: Extends typescriptConfig for React Native projects.

  • nextConfig: Extends typescriptConfig with style-related linting for Next.js projects.

  • vueConfig: Extends typescriptConfig with support for Vue files and style-related linting.

The GLOBS and COMMANDS objects are also exported to allow consistent and customizable overrides.

Usage

Once installed, you can reference this configuration in your project's Lint-Staged configuration file, typically named lint-staged.config.js.

To use ESM syntax, ensure your package.json includes "type": "module". Otherwise, use the .mjs extension for ESM files or stick to CommonJS syntax with require('@commencis/lint-staged-config').

Without any overrides:

Use the default configuration as-is:

export { typescriptConfig as default } from '@commencis/lint-staged-config';

Flexible object:

Customize the configuration by extending it:

import { reactConfig } from '@commencis/lint-staged-config';

export default {
  ...reactConfig,
};

With project-specific overrides & extensions:

Add or override specific commands to fit your project’s needs:

import { reactConfig } from '@commencis/lint-staged-config';

export default {
  ...reactConfig,
  [GLOBS.MDX]: ['markdownlint-cli2 --fix'],
  'package.json': 'sort-package-json',
  '*.test.ts(x)': 'jest --bail --findRelatedTests',
};

Contribution

We welcome contributions to improve this package. Feel free to open issues or pull requests to suggest enhancements or report any issues.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

© Commencis, 2024. All rights reserved.