ESLint-plugin-Gatsby-No-Static-Queries
Ensure static queries are not used in Gatsby components
This ensures you can safely use Conditional page builds.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-gatsby-no-static-queries
:
$ npm install eslint-plugin-gatsby-no-static-queries --save-dev
Usage
Add gatsby-no-static-queries
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"gatsby-no-static-queries"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"gatsby-no-static-queries/nope": "error"
}
}
Supported Rules
nope
Don't use static queries