JSPM

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

ESLint plugin for publint

Package Exports

  • eslint-plugin-publint
  • eslint-plugin-publint/jsonc-eslint-parser

Readme

eslint-plugin-publint

PRs Welcome

ESLint plugin for publint

Preview

preview

Requirement

  • ESLint >= 8.57.0

Usage

Install

npm i -D eslint eslint-plugin-publint

Config eslint.config.js

import * as publint from "eslint-plugin-publint";
import parser from "eslint-plugin-publint/jsonc-eslint-parser";

export default [
  {
    files: ["**/package.json"],
    languageOptions: {
      parser,
    },
    plugins: { publint },
    rules: {
      /**
       * The 'suggestion' type messages created by publint will cause eslint warns
       */
      "publint/suggestion": "warn",
      /**
       * The 'warning' type messages created by publint will cause eslint warns
       */
      "publint/warning": "warn",
      /**
       * The 'error' type messages created by publint will cause eslint errors
       */
      "publint/error": "error",
    },
  },
];

Config package.json

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Rules

This plugin contains only 3 rules, which have no options to configure.

  • publint/suggestion: correspond with the Suggestions section of publint outputs.
  • publint/waning: correspond with the Warnings section of publint outputs.
  • publint/error: correspond with the Errors section of publint outputs.

License

MIT