eslint-plugin-oclif
eslint plugin for oclif CLI
Last updated 10 months ago by c1ph3r .
MIT · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-oclif 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.0                                ...           latest (10 months ago)

20 Versions

  • 0.1.0                                ...           10 months ago
  • 0.0.19                                ...           a year ago
  • 0.0.18                                ...           a year ago
  • 0.0.17                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.13                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.11                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.0                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |