eslint-github-bot

Plugin-based GitHub bot for ESLint
授权协议 MIT License
开发语言 Python
所属分类 应用工具、 IM/聊天/语音工具
软件类型 开源软件
地区 不详
投 递 者 西门嘉石
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

ESLint GitHub bot

eslint-github-bot is a bot created with probot which automates some common tasks for repositories run by the ESLint team.

The bot can perform the following tasks:

  • Triage - adds the "triage" label to newly-created issues which don't have labels.
  • Commit message check - adds a status check to pull requests to verify that they follow ESLint's pull request guidelines
  • Needs info - adds a comment to issues requesting more information when a maintainer adds the needs info label.
  • Release/TSC meeting issues - creates a new issue with the release/tsc meeting label scheduled two weeks later, after another release/TSC meeting issue is closed.
  • Release monitor - searches the repository for an issue with the release and patch release pending labels, indicating that a patch release might soon be created from master. If an issue is found, adds a pending status check to all PRs that would require a semver-minor release, to prevent anyone from accidentally merging them.
  • Issue Archiver - Locks and adds a label to issues which have been closed for a while
  • Issue Closer - Closes and adds a label to issues which have been inactive for a while
  • WIP Tracking - adds pending status check for PRs with WIP in the title or with "do not merge" label, and marks the status check as successful once the WIP indicators are removed.
  • PR ready to merge (experimental) - adds a label to all PRs which are "ready to merge", defined by the following criteria:
    • At least one review is approved.
    • Build status is success.
  • Check unit tests (experimental) - makes sure a PR contains unit tests. This check will be ignored for PRs with Build|Chore|Docs|Upgrade in the commit message.
  • Duplicate comments (inactive) - removes all the duplicates comments by this bot and leaves the last one of each type.

�� Setup

  • Clone this repo.
  • npm install
  • Start the app
    • npm start to start it as a GitHub APP

ENV variables required:

  • PORT: Port for web server (optional, defaults to 8000).
  • SECRET: Secret setup for GitHub webhook or you generated when you created the app.
  • PRIVATE_KEY: the contents of the private key you downloaded after creating the app.
  • APP_ID: The numeric app ID

Adding plugins

To add a plugin:

  1. Create the plugin as a new file in src/plugins.
  2. Add the plugin to the list in src/plugins/index.js.
  3. Add the plugin to the list in src/app.js to enable it by default.

Deployment

The bot is deployed to a Dokku instance named github-bot.eslint.org and is installed as a GitHub Application at the organization level.

 相关资料
  • 不管是多人合作还是个人项目,代码规范都是很重要的。这样做不仅可以很大程度地避免基本语法错误,也保证了代码的可读性。 配置项 所有的配置文件都在 .eslintrc.js 中。 本项目基本规范是依托于 vue 官方的 eslint 规则 eslint-config-vue 做了少许的修改。大家可以按照自己的需求进行定制化配置。 比如:我个人或者项目组习惯于使用两个空格,但你可能觉得四个空格更顺眼,你

  • ESLint FECS 的 JavaScript 检查是基于 ESLint 结合我们的 JavaScript 编码规范,配置了一些默认的参数,以检查代码中可能存在的质量问题。 使用方式 最常用的方式就是直接调用fecs,此时会递归的扫描当前目录下面的所有的 JavaScript、CSS 和 HTML 文件(默认已经忽略 node_modules, bower_components 目录),然后依次

  • ESLint 是一个开源的JavaScript验证工具,相比JSLint,ESLint具有可配置性。其他跟 JSLint 的不同之处: ESLint 使用 Esprima 来进行 javascript 解析 ESLint 使用 AST 来修改代码模式 ESLint 是完全插件化的,每个规则都是一个插件,用户可以在运行时增加更多的插件  

  • Angular ESLint Monorepo for all the tooling which enables ESLint to lint Angular projects This project is made possible thanks to the continued hard work going into https://github.com/typescript-eslin

  • Eslint Watch Don't want to import Webpack, Grunt, or some other task package into your project? Then this is the tool for you.Eslint Watch is a simple command line tool that wraps Eslint. Eslint Watch

  • prettier-eslint (for Atom) DEPRECATED This plugin has been merged with the official prettier-atom plugin. Uninstall prettier-eslint and install prettier-atom. Then enable the ESLint integration: Atom