Giter VIP home page Giter VIP logo

eslint-plugin-check-class-name's Introduction

eslint-plugin-check-class-name

检查class名称

使用

{
  "plugins": [
    "eslint-plugin-check-class-name"
  ],
  "rules": {
    "check-class-name/check": [
      "warn",
      {
        "target": "$folder", 
        "extends": "PView",
        "include": "/src/view",
        "message": "PView 名称与文件夹名称不一致"
      }
    ]
  }
}

配置参数

target

  • < String > 指定的 class 名称

    eg: target: "Table"

  • < String of RegExp > 匹配指定规则的名称

    eg: target: "/[A-Za-z]/" (内部使用RegExp.test()方法)

  • < String is $folder > 使用class所在文件�folder名称进行检查

    eg: target: "$folder"

extends

  • < String > 指定supperClass名称, 默认 undefined

    eg: extends: "Component"

include

  • < String > 指定匹配文件路径,默认'/',匹配所有文件

    eg: include: "/src/view/"

message

  • < String > �指定提示信息,默认 "class 名称有误"

    eg: message: " class 名称与文件夹名称不一致"

eslint-plugin-check-class-name's People

Contributors

fivelucky avatar

Stargazers

 avatar  avatar

Watchers

 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.