New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-userscripts

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-userscripts

Implements rules for userscripts metadata in eslint

  • 0.5.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
880
decreased by-77.21%
Maintainers
1
Weekly downloads
 
Created
Source

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

RuleDescriptionRecommended
filename-userEnsures userscripts end with .user.js
no-invalid-grantEnsures the argument passed to @grant is valid
no-invalid-metadataEnsures userscripts have valid metadata
require-nameEnsures userscripts have a name
require-descriptionEnsures userscripts have a description
require-versionEnsures userscripts have a valid version
use-homepage-and-urlEnsures that for each homepage attribute, homepageURL is also used
require-download-urlEnsures that for each downloadURL there is a updateURL
align-attributesEnsures that attributes are spaced out and aligned
require-attribute-space-prefixEnsure that attributes are prefixed by one space
metadata-spacingEnsures there is a newline between the metadata and the code
no-invalid-headersEnsures userscripts have valid headers
compat-grantEnsures your @grant permissions are supported
compat-headersEnsures your headers are supported
better-use-matchPrefers @match over @include

Keywords

FAQs

Package last updated on 09 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc