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

videojs-standard

v9.0.1

Published

JavaScript style for plugins and tools in the video.js ecosystem.

Downloads

7,369

Readme

video.js Standard Style

Build Status Greenkeeper badge Slack Status

NPM

This module provides a hands-off wrapper around ESLint and the video.js organization's shared ESLint config. It checks ("lints") your code to verify that it complies with our organization's agreed-upon standards.

Maintenance Status: Stable

Table of Contents generated with DocToc

Install

npm install videojs-standard

Or, if you prefer to install it globally:

npm install -g videojs-standard

This will put the vjsstandard program on your PATH, meaning you can call it from anywhere and it'll run.

Usage

If you are using our plugin generator, you will already have videojs-standard available within your project! Running npm run lint will run your plugin project through videojs-standard!

The simplest use case would be checking the style of all JavaScript files in the current working directory:

$ vjsstandard
~/dev/my-code/src/index.js
    527:1  warning  Line 527 exceeds the maximum line length of 90  max-len

Arguments

vjsstandard will accept any number of file identifier arguments. These can be glob patterns. Some examples:

$ vjsstandard foo.js src/**/*.js

If not provided, vjsstandard will recursively check all JavaScript source files in the current working directory.

Options

-e/--errors

Produces a report that only includes errors; not warnings.

-w/--warnings

Produces a report that only includes warnings; not errors.

--format/--fix

Instead of producing a report on the errors and warnings found in files, this will attempt to use ESLint's auto-formatting capabilities to overwrite existing files to resolve rules violations.

--help

Outputs help on using videojs-standard.

--version

Outputs the version number of videojs-standard.

Ignoring Files

Sometimes you need to ignore files because they represent preprocessed or minified assets, which are not appropriate for linting.

File glob patterns can be ignored by adding them to your project's package.json as a part of a vjsstandard.ignore array:

{
  "vjsstandard": {
    "ignore": [
      "**/dist/**",
      "Gulpfile.js"
    ]
  }
}

Don't check jsdoc

Note: By default this option is set to true, even if the option is not provided.

Some projects don't use jsdoc and don't care if jsdoc exists or not. We added an option that you can add in you package.json in order to turn off all the jsdoc rules. All you have to do is set vjsstandard.jsdoc to false:

{
  "vjsstandard": {
    "jsdoc": false,
  }
}

Contributing

This project should almost never change.

A rule should only change if there is a very compelling reason that the video.js core contributors have agreed upon by discussion.

Versioning Guidelines

Because this project can cause builds to fail, we want to avoid any potentially breaking changes outside of major versions. Because this project is mostly a collection of dependencies, any change to those dependencies will require a version change in this project equal to the highest version change in dependencies.

  • A dependency being updated by a major version will be a major version of videojs-standard.
  • A dependency being updated by a minor version will be a minor version of videojs-standard.
  • A dependency being updated by a patch version will be a patch version of videojs-standard.

Combined with the rules outlined in eslint-config-videojs, this should allow common version ranges (~ and ^) to never introduce a change that could break someone's build due to linter errors!

License

Apache-2.0. Copyright (c) Brightcove, Inc.