GithubHelp home page GithubHelp logo

modulelint's Introduction

modulelint

Module Lint是一款检测模块各种素质的工具。面向Node模块开发人员。

初步思路

  • 检查模块的目录是否符合CommonJS包规范,每符合一样加10分
  • 检查README文件的内容,去掉空格后1000字10分。上限30分
  • 检查License文件。具备License文件的项目加10分
  • 检查测试用例数量。每个case加2分
  • 检查测试覆盖率。覆盖率从50%开始,每覆盖5%加5分。高于95%加10分
  • 检查Coding Style, 每个文件不超过3个问题的,加2分。没有问题的加5分
  • 模块名字少于10个字母的,加5分
  • API注释,每个完整的注释加5分
  • 文档。doc目录下每个文档加5分。每个文档去空格后,不应少于500字。
  • Change log的检查,具备Change log的加5分
  • 项目协作。通过'git summary',查看contributor的数量,从2个开始,每多一个贡献者,加10分
  • 通过npm info或registry.npm.org/module接口检查当前模块是否发布,已发布则加5分
  • travis-ci加10分。passing状态加5分,反之扣5分
  • 文件utf-8 without BOM检测。查出非utf8 without BOM,每个文件扣5分

求你帮实现

上面罗列了一些初步的检测项,您也看到了,这是一件复杂的事情。每一项都要去寻找对应的工具来进行分析。所求代码贡献。

目标

每个开发者在完成他的模块之后,并不知道他做得好不好。排除掉模块的功能和接口是否优秀和令人感兴趣,至少我们可以从基本功上看开发者是否努力。 高分值也可以让模块开发者得到一点点成就感。
希望这个指标可以略微量化下开源开发者做出的努力和收获,在推动标准化和提高基本要求方面出一点力。

不算指导的指导

优秀的JavaScript模块是怎样炼成的

modulelint's People

Contributors

jacksontian 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.