Git Product home page Git Product logo

eslint-plugin-userscripts's Introduction

eslint-plugin-userscripts

codecov

Implements rules for userscripts in eslint.

Installation

You'll first need to install ESLint:

npm install eslint --save-dev

Next, install eslint-plugin-userscripts:

npm install eslint-plugin-userscripts --save-dev

Usage

Add userscripts to the plugins section of your .eslintrc configuration file:

{
  "extends": ["plugin:userscripts/recommended"]
}

Supported Rules

Rule Description Recommended
filename-user Ensures userscripts end with .user.js
no-invalid-grant Ensures the argument passed to @grant is valid
no-invalid-metadata Ensures userscripts have valid metadata
require-name Ensures userscripts have a name
require-description Ensures userscripts have a description
require-version Ensures userscripts have a valid version
use-homepage-and-url Ensures that for each homepage attribute, homepageURL is also used
use-download-and-update-url Ensures that for each downloadURL there is a updateURL
align-attributes Ensures that attributes are spaced out and aligned
require-attribute-space-prefix Ensure that attributes are prefixed by one space
metadata-spacing Ensures there is a newline between the metadata and the code
no-invalid-headers Ensures userscripts have valid headers
compat-grant Ensures your @grant permissions are supported
compat-headers Ensures your headers are supported
better-use-match Prefers @match over @include

eslint-plugin-userscripts's People

Contributors

dependabot[bot] avatar derjanb avatar double-beep avatar github-actions[bot] avatar nikolay-borzov avatar yash-singh1 avatar

Stargazers

 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.