types-eslintrc
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

types-eslintrc

NPM TypeScript Coverage Status

Type checking for ESLint configs.

If I should maintain this repo, please ⭐️ GitHub stars

DM me on Twitter if you have questions or suggestions. Twitter


This package uses zod to type check ESLint configs.

Installation

yarn add types-eslintrc
npm install types-eslintrc
pnpm add types-eslintrc

Usage

Types

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.

Dependenciesdependencies

  • types-json: Type checking for JSON objects
  • zod: TypeScript-first schema declaration and validation library with static type inference

Dev Dependencies

  • autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.

License license

MIT - MIT License


Related Projects

Package Sidebar

Install

npm i types-eslintrc

Weekly Downloads

9,610

Version

2.0.0

License

MIT

Unpacked Size

19.1 kB

Total Files

10

Last publish

Collaborators

  • bconnorwhite