Type checking for .eslintrc.json
npm install types-eslintrcType checking for ESLint configs.
_If I should maintain this repo, please ⭐️_
_DM me on Twitter if you have questions or suggestions._
---
This package uses zod to type check ESLint configs.
``sh`
yarn add types-eslintrc
`sh`
npm install types-eslintrc
`sh`
pnpm add types-eslintrc
`ts
import {
ESLintConfig,
isESLintConfig,
parseESLintConfig
} from "types-eslintrc";
const myConfig = {
// ...
};
if(isESLintConfig(myConfig)) {
// myConfig is now typed as ESLintConfig
}
const myConfig = parseESLintConfig(myConfig);
// If myConfig is valid, it will return as ESLintConfig. Otherwise, it will return undefined.
``
- types-json: Type checking for JSON objects
- zod: TypeScript-first schema declaration and validation library with static type inference
- autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.
MIT - _MIT License_
- types-json: Type checking for JSON objects
- types-tsconfig: Type checking for tsconfig.json
- types-pkg-json: Type checking for package.json