tsdoc/eslint-plugin
Pete Gonzalez 0445c89e07 Upgrade @rushstack/eslint-config and upgrade to ESLint 7 2020-06-24 03:06:49 -07:00
..
src eslint-plugin-tsdoc: set docs url to eslint-plugin/README.md 2020-03-03 16:04:37 -05:00
.eslintrc.js Upgrade @rushstack/eslint-config and upgrade to ESLint 7 2020-06-24 03:06:49 -07:00
.npmignore Addition of eslint-plugin 2019-11-02 17:09:16 -07:00
.npmrc Addition of eslint-plugin 2019-11-02 17:09:16 -07:00
CHANGELOG.json Deleting change files and updating change logs for package updates. 2020-05-20 22:33:27 +00:00
CHANGELOG.md Deleting change files and updating change logs for package updates. 2020-05-20 22:33:27 +00:00
LICENSE Addition of eslint-plugin 2019-11-02 17:09:16 -07:00
README.md Update README.md based on testing 2019-11-05 14:28:25 -08:00
build.js Addition of eslint-plugin 2019-11-02 17:09:16 -07:00
package.json Upgrade @rushstack/eslint-config and upgrade to ESLint 7 2020-06-24 03:06:49 -07:00
tsconfig.json Addition of eslint-plugin 2019-11-02 17:09:16 -07:00

README.md

eslint-plugin-tsdoc

This ESLint plugin provides a rule for validating that TypeScript doc comments conform to the TSDoc specification.

Usage

  1. Configure ESLint for your TypeScript project. See the instructions provided by the typescript-eslint project. You will end up with some dependencies like this:

    my-project/package.json (example)

    {
      "name": "my-project",
      "version": "1.0.0",
      "dependencies": {},
      "devDependencies": {
        "@typescript-eslint/eslint-plugin": "~2.6.1",
        "@typescript-eslint/parser": "~2.6.1",
        "eslint": "~6.6.0",
        "typescript": "~3.7.2"
      },
      "scripts": {
        "lint": "eslint -f unix \"src/**/*.{ts,tsx}\""
      }
    }
    
  2. Add the eslint-plugin-tsdoc dependency to your project:

    $ cd my-project
    $ npm install --save-dev eslint-plugin-tsdoc
    
  3. In your ESLint config file, add the "eslint-plugin-tsdoc" package to your plugins field, and enable the "tsdoc/syntax" rule. For example:

    my-project/.eslintrc.js (example)

    module.exports =  {
      plugins: [
        "@typescript-eslint/eslint-plugin",
        "eslint-plugin-tsdoc"
      ],
      extends:  [
        'plugin:@typescript-eslint/recommended'
      ],
      parser:  '@typescript-eslint/parser',
      parserOptions: {
        project: "./tsconfig.json",
        tsconfigRootDir: __dirname,
        ecmaVersion: 2018,
        sourceType: "module"
      },
      rules: {
        "tsdoc/syntax": "warn"
      }
    };
    

This package is maintained by the TSDoc project. If you have questions or feedback, please let us know!