ESLint plugin for Google Apps Script.
$ npm i -D eslint @browseai/eslint-plugin-appsscript
Note: If you installed ESLint globally then you must also install @browseai/eslint-plugin-appsscript
globally.
Add @browseai/appsscript
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@browseai/appsscript"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@browseai/appsscript/expect-private-functions": "error"
}
}
You can also tell ESLint about the environment variables provided by Apps Script by doing:
{
"env": {
"@browseai/appsscript/globals": true
}
}
Rule | Description | Configurations | Fixable |
---|---|---|---|
expect-private-functions | Enforce using private functions | ![recommended][] | ![fixable][] |