JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 325268
  • Score
    100M100P100Q166586F
  • License MIT

ESlint Plugin for pnpm

Package Exports

  • eslint-plugin-pnpm

Readme

eslint-plugin-pnpm

npm version npm downloads bundle JSDocs License

ESLint plugin to enforce and auto-fix pnpm catalogs.

[!IMPORTANT] This plugin is still in heavy development and the API is not stable. Pin your version on use.

Setup

pnpm add -D eslint-plugin-pnpm jsonc-eslint-parser
// eslint.config.mjs
import pnpmCatalogs from 'eslint-plugin-pnpm'
import * as jsoncParser from 'jsonc-eslint-parser'

export default [
  {
    ignores: ['**/node_modules/**', '**/dist/**'],
  },
  {
    name: 'pnpm-catalogs:package.json',
    files: [
      'package.json',
      '**/package.json',
    ],
    languageOptions: {
      parser: jsoncParser,
    },
    plugins: {
      'pnpm-catalogs': pnpmCatalogs,
    },
    rules: {
      'pnpm-catalogs/enforce-catalog': 'error',
      'pnpm-catalogs/valid-catalog': 'error',
    },
  },
]

Sponsors

License

MIT License © Anthony Fu