Skip to content

an eslint shared config sharing all additional variables provided by Geasemonkey/Tampermonkey/Violentmonkey

License

Notifications You must be signed in to change notification settings

A-23187/eslint-config-greasemonkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-greasemonkey

This package provides an eslint shared config which defines all additional variables supported by Geasemonkey/Tampermonkey/Violentmonkey 's API in its globals property. It's very useful when you use eslint to lint your xxxmonkey scripts that use these variable without having to define the used variables yourself in your eslint configuration.

Installation

npm i -D eslint-config-greasemonkey

Usage

Add greasemonkey to the extends property in your eslint configuration. Example of a configuration file in JSON format:

// .eslintrc.json
{
    "extends": [
        "greasemonkey"
    ],
    "globals": {
        "GM_info": "off" // you can disable the unneeded variables
    }
}

The default shared config provided by this package shares variables in readonly mode so that you can not overwrite these variables. You can extend another config greasemonkey/writable which allow the variables to be overwritten.

// .eslintrc.json
{
    "extends": [
        "greasemonkey/writable"
    ]
}

License

MIT License

About

an eslint shared config sharing all additional variables provided by Geasemonkey/Tampermonkey/Violentmonkey

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published