0.1.0 • Published 5 years ago

eslint-plugin-oclif v0.1.0

Weekly downloads
69
License
MIT
Repository
-
Last release
5 years ago

eslint-plugin-oclif

This is a linter plugin for the oclif which is a framework for building CLIs in Javascript and Typescript.

Getting Started

Installing in your Project

The version range of TypeScript currently supported by this plugin is >=3.2.1 <3.6.0.

  • yarn add -D eslint@5.16.0 typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
  • yarn add -D eslint-plugin-oclif
  • Add @typescript-eslint/parser to the parser field and oclif to the plugins section of your .eslintrc configuration file:

    • If your CLI is in JavaScript

      {
          "parser": "@typescript-eslint/parser",
          "plugins": ["oclif"],
          "rules": {
              // Add your rules here
          }
      }

      Add script in package.json

      "scripts":{
          "lint": "eslint . --ext .js"
      }
    • If your CLI is in TypeScript

      {
          "parser": "@typescript-eslint/parser",
          "plugins": ["oclif"],
          "parserOptions": {
              "project": "./tsconfig.json",
              "sourceType": "module",
          },
          "rules": {
              // Add your rules here
          }
      }

      Add script in package.json

      "scripts":{
          "lint": "eslint . --ext .ts"
      }
  • yarn lint

Adding New Rules

  1. Create src/rules/<your-rule-here.ts>

    • This file contains logic for our new rule.
  2. Create docs/rules/<your-rule-here.md>

    • This file contains the documentation for our new rule.
  3. Add the new rule in src/rules/index.ts

0.1.0

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.0

5 years ago

0.0.1

5 years ago