JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 940
  • Score
    100M100P100Q103025F
  • License Apache-2.0

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

Package Exports

  • videojs-standard

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (videojs-standard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

video.js Standard Style

travis npm downloads

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.

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

Because this tool is designed to be as simple and hands-off as possible, it offers only one form of command-line argument: which files to check.

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.

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"
    ]
  }
}

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.