@terminal-nerds/lint-staged-config v0.10.0
@terminal-nerds/lint-staged-config
➡️ Extendable configuration, part of the terminal-nerds/configs project.
Prerequisites
ℹ️ This configuration package require these tools to use locally on your device(s):
- Latest Node.js LTS (Long-Term Support) version
- One of Node.js package managers:
- Latest version
Basic usage
👣 Follow the steps below:
Install it with the package manager of your choice (in our case, we use ).
pnpm install --save-dev lint-staged @terminal-nerds/lint-staged-config
Create a lint-staged configuration file -
.lintstagedrc.js
.Import the config from this package and use it.
import { CONFIG } from "@terminal-nerds/lint-staged-config"; // https://github.com/okonet/lint-staged const config = { ...CONFIG, // Apply more options from there, if neccessary }; export default config;
📖 For the lint-staged CLI usage, please refer to its documentation.
Preconfigured groups
Matching group name | Loading condition |
---|---|
CODE_FORMAT (all) | prettier in dependencies |
ESLINT (JavaScript, TypeScript, JSON, YAML) | eslint in dependencies |
MARKDOWN | markdownlint-cli in dependencies |
PACKAGE_JSON (all package.json files) | depcheck or syncpack in dependencies |
STYLESHEETS | stylelint in dependencies |
TYPESCRIPT | typescript in dependencies (it will attempt find the correct tsconfig.json file for the type checking) |
Security
🔐 For more information, please refer to the Security section at the root of the terminal-nerds/configs monorepo.
Contributing
🤝 Contributions of any kind are welcome!
Please refer to the monorepo (terminal-nerds/configs) project's CONTRIBUTING file for more information if you wish to get involved.
License
⚖️ For more information, please refer to the License section at the root of the terminal-nerds/configs monorepo.