eslint-config-greasemonkey

1.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    27
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    27

Package Sidebar

Install

npm i eslint-config-greasemonkey

Weekly Downloads

19

Version

1.0.1

License

MIT

Unpacked Size

4.45 kB

Total Files

5

Last publish

Collaborators

  • a23187