You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've upgraded my website to Gatsby v3, and after running 'gatsby develop' Gatsby showing a lot of warnings in CLI (mainly one ESlint rule => limited-exports-page-templates). But I have my personal .eslintrc in project.
462:1 warning
In page templates only a default export of a valid React component and the named export of a page
query is allowed. All other named exports will cause Fast Refresh to not preserve local component state and do a full refresh.
Please move your other named exports to another file. Also make sure that you only export page queries that use the "graphql" tag from "gatsby".
limited-exports-page-templates
@LekoArts Hi there, sorry replying to an old issue, but this is all I could find in the search for those custom ESLint rules.
Is there a way to add those rules to our own ESLint configuration? Without a plugin, attempting to add the rules gives an error that the rule could not be found, even when following the guide for gatsby-plugin-eslint. It would be great to have the custom lint rules used without needing to run the dev server first.
Description
Hi, I've upgraded my website to Gatsby v3, and after running 'gatsby develop' Gatsby showing a lot of warnings in CLI (mainly one ESlint rule => limited-exports-page-templates). But I have my personal .eslintrc in project.
Is this article still up-to-date? (Especially 'Disabling ESLint' paragraph) => https://www.gatsbyjs.com/docs/how-to/custom-configuration/eslint/
Expected result
No warnings.
Actual result
Example warning:
462:1 warning
In page templates only a default export of a valid React component and the named export of a page
query is allowed. All other named exports will cause Fast Refresh to not preserve local component state and do a full refresh.
Please move your other named exports to another file. Also make sure that you only export page queries that use the "graphql" tag from "gatsby".
limited-exports-page-templates
Environment
System:
OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
npm: 7.11.1 - ~/.nvm/versions/node/v14.16.0/bin/npm
Browsers:
Chrome: 90.0.4430.85
Firefox: 88.0
npmPackages:
gatsby: ^3.1.1 => 3.4.0
gatsby-cli: ^3.1.0 => 3.4.0
gatsby-link: ^3.1.0 => 3.4.0
gatsby-plugin-algolia: ^0.19.0 => 0.19.0
gatsby-plugin-anchor-links: ^1.2.1 => 1.2.1
gatsby-plugin-google-analytics: ^3.1.0 => 3.4.0
gatsby-plugin-google-tagmanager: ^3.1.0 => 3.4.0
gatsby-plugin-html-attributes: ^1.0.5 => 1.0.5
gatsby-plugin-image: ^1.1.1 => 1.4.0
gatsby-plugin-mailchimp: ^5.2.2 => 5.2.2
gatsby-plugin-manifest: ^3.1.0 => 3.4.0
gatsby-plugin-netlify: ^3.1.0 => 3.4.0
gatsby-plugin-offline: ^4.1.0 => 4.4.0
gatsby-plugin-react-helmet: ^4.1.0 => 4.4.0
gatsby-plugin-react-svg: ^3.0.0 => 3.0.1
gatsby-plugin-remove-serviceworker: ^1.0.0 => 1.0.0
gatsby-plugin-root-import: ^2.0.6 => 2.0.6
gatsby-plugin-sass: ^4.1.0 => 4.4.0
gatsby-plugin-sharp: ^3.1.1 => 3.4.0
gatsby-plugin-sitemap: ^3.1.0 => 3.3.0
gatsby-plugin-styled-components: ^4.1.0 => 4.4.0
gatsby-plugin-svgr: ^3.0.0-beta.0 => 3.0.0-beta.0
gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.21 => 1.1.22
gatsby-remark-images: ^5.0.0 => 5.1.0
gatsby-source-filesystem: ^3.1.0 => 3.4.0
gatsby-transformer-javascript-frontmatter: ^3.1.0 => 3.4.0
gatsby-transformer-remark: ^4.0.0 => 4.1.0
gatsby-transformer-sharp: ^3.1.0 => 3.4.0
npmGlobalPackages:
gatsby-cli: 3.3.0
The text was updated successfully, but these errors were encountered: