npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@coffeelint/cli

v5.2.11

Published

Lint your CoffeeScript

Downloads

15,215

Readme

CoffeeLint

CoffeeLint is a style checker that helps keep CoffeeScript code clean and consistent.

For guides on installing, using and configuring CoffeeLint, head over here.

To suggest a feature, report a bug, or general discussion, head over here.

Team

Current:

  • https://github.com/orgs/coffeelint/people

Past:

Contributing

  • New rules should be set to a warn level. Developers will expect new changes to NOT break their existing workflow, so unless your change is extremely usefull, default to warn. Expect discussion if you choose to use error.

  • Look at existing rules and test structures when deciding how to name your rule. no_foo.coffee is used for many tests designed to catch specific errors, whereas foo.coffee is used for tests that are designed to enforce formatting and syntax.

Steps

  1. Fork the repo locally.
  2. Run npm install to get dependencies.
  3. Create your rule in a single file as src/rules/your_rule_here.coffee, using the existing rules as a guide. You may examine the AST and tokens using https://asaayers.github.io/clfiddle/.
  4. Add your test file my_test.coffee to the test directory.
  5. Register your rule in src/coffeelint.coffee.
  6. Run your test using npm run testrule test/your_test_here.coffee.
  7. Run the whole tests suite using npm test.
  8. Submit a pull request.

Github Actions

Updating documentation when adding a new rule

When adding a new rule, its documentation is specified by setting a description property within its rule property:

module.exports = class NoComment

    rule:
        name: 'no_comment'
        level: 'ignore'
        message: 'No comment'
        description: '''
            Disallows any comment in the code
            '''

    tokens: ['#', '###']

    lintToken : (token, tokenApi) ->
		return {context: "Found '#{token[0]}'"}

The description property is a string that can embed HTML code:

description: '''
	Disallows any comment in the code. This code would not pass:
	<pre>
	<code>### Some code with comments
	foo = ->
		# some other comments
		bar()
	</code>
	</pre>
	'''

Coffeelint's website generates each rule's documentation based on this description property.