Git Product home page Git Product logo

eslint-plugin-todo-ddl's Introduction

eslint-plugin-todo-ddl

检查代码中的TODO注释是否到期或者将要到期

show

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-todo-ddl:

$ npm install eslint-plugin-todo-ddl --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-todo-ddl globally.

Usage

Add todo-ddl to the plugins section of your .eslintrc configuration file or package.json. You can omit the eslint-plugin- prefix:

package.json demo

"eslintConfig": {
    "plugins": [
      "todo-ddl"
    ],
    "rules": {
      "todo-ddl/diy":1
    }
}

After the configuration is complete, you can see the prompts when coding and building

Formats that can be detected

// TODO: DDL 2020-4-28 提示自己的内容
// fixme: DDL 2020/4/28 提示自己的内容
// TODO: deadline 20200428 提示自己的内容
// fixme: deadline 20-4-28 提示自己的内容

or

/**
* TODO
* DDL 2020-5-19
* 提示自己的内容
*/

support date formats

For example, June 1, 2020 --- 2020-06-01

format1 demo format2 demo format3 demo
yyyy-mm-dd 2020-06-01 yyyy/mm/dd 2020/06/01 yyyymmdd 20200601
2020-06-1 2020/06/1 200601
2020-6-01 2020/6/01
20-06-01 20/06/01
20-6-1 20/6/1
20-6-01 20/6/01

customize

You can customize the detected keywords

key type comment
flag string[] The beginning of the detected comment
ddl string[] The effective time of the detected comment
warnline string warnline

default value

"rules": {
    "todo-ddl/diy":[1,{
      "flag": ["todo","fixme"],
      "ddl":  ["ddl","deadline"],
      "warnline": "7"
    }]
}

eslint-plugin-todo-ddl's People

Contributors

atqq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.