ESLint-plugin-Gatsby-No-Static-Queries
!Build Statusbuild-badgebuild
!versionversion-badgepackage !downloadsdownloads-badgenpmtrends
!MIT Licenselicense-badgelicense
!PRs Welcomeprs-badgeprs!Watch on GitHubgithub-watch-badgegithub-watch !Star on GitHubgithub-star-badgegithub-star !Tweettwitter-badgetwitter
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
Addgatsby-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