eslint-plugin-gatsby-no-static-queries

Ensure no static queries used in Gatsby components

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-gatsby-no-static-queries
101.0.13 years ago3 years agoMinified + gzip package size for eslint-plugin-gatsby-no-static-queries in KB

Readme

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

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