@pkg-tools/lint
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

@pkg-tools/lint

A code linting tool with typed configuration.

@pkg-tools/lint::version @pkg-tools/lint::downloads

This CLI is a thin abstraction on top of eslint.

Install

# w/ pnpm
pnpm add -D @pkg-tools/lint @pkg-tools/config

# w/ yarn
yarn add -D @pkg-tools/lint @pkg-tools/config

# w/ npm
npm install -D @pkg-tools/lint @pkg-tools/config

Usage

In your package.json, you can use the exported cli lint in your lint script e.g.

"scripts": {
  "lint": "lint"
}

Configure

Define a pkg.config.ts in the root of your package and add the following.

import { defineConfig } from '@pkg-tools/config';

export default defineConfig({
  lint: {
    rules: {
      'no-unused-vars': 0,
    },
  },
});

Since @pkg-tools/lint leverage eslint, you'll still need to create a eslint configuration file for @pkg-tools/lint to work in your editor.

To do so create a file named .eslintrc.cjs with the following contents in the root of your package.

const { getConfig } = require('@pkg-tools/lint/config');
module.exports = getConfig();

License

MIT

Dependents (2)

Package Sidebar

Install

npm i @pkg-tools/lint

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

9.94 kB

Total Files

13

Last publish

Collaborators

  • joemckenney