Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eslint-plugin-sort-destructure-keys.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'eslint-plugin-sort-destructure-keys';
26 changes: 26 additions & 0 deletions eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import eslint from '@eslint/js';
import globals from "globals";
import tseslint from "typescript-eslint";
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys";
import { defineConfig } from "eslint/config";

export default defineConfig([
Comment on lines +5 to +7
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import defineConfig from "eslint/config" is not a valid ESLint export. ESLint 9.x uses a flat config format that doesn't require a defineConfig helper. You can either remove this import and export the array directly, or if you need type safety, use import type { Linter } from 'eslint' and type the config as Linter.Config[].

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong

eslint.configs.recommended,
tseslint.configs.recommended,
{
files: ["**/*.{ts,tsx}"],
plugins: {
"sort-destructure-keys": sortDestructureKeys,
},
languageOptions: { globals: { ...globals.browser, ...globals.node } },
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"sort-destructure-keys/sort-destructure-keys": [
2,
{ caseSensitive: false },
],
"@typescript-eslint/no-require-imports": "off",
},
},
]);
154 changes: 77 additions & 77 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
module.exports = {
graphqlTypegen: true,
siteMetadata: {
title: 'Gatsby + Netlify CMS Starter',
description:
'This repo contains an example business website that is built with Gatsby, and Netlify CMS.It follows the JAMstack architecture by using Git as a single source of truth, and Netlify for continuous deployment, and CDN distribution.',
},
plugins: [
'gatsby-plugin-react-helmet-async',
'gatsby-plugin-fix-fouc',
{
resolve: 'gatsby-plugin-sass',
options: {
sassOptions: {
indentedSyntax: true,
},
},
},
{
// keep as first gatsby-source-filesystem plugin for gatsby image support
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/static/img`,
name: 'uploads',
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/pages`,
name: 'pages',
},
graphqlTypegen: true,
siteMetadata: {
title: "Gatsby + Netlify CMS Starter",
description:
"This repo contains an example business website that is built with Gatsby, and Netlify CMS.It follows the JAMstack architecture by using Git as a single source of truth, and Netlify for continuous deployment, and CDN distribution.",
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/img`,
name: 'images',
},
},
`gatsby-plugin-image`,
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
'gatsby-remark-relative-images',
{
resolve: 'gatsby-remark-images',
plugins: [
"gatsby-plugin-react-helmet-async",
"gatsby-plugin-fix-fouc",
{
resolve: "gatsby-plugin-sass",
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 2048,
sassOptions: {
indentedSyntax: true,
},
},
},
{
resolve: 'gatsby-remark-copy-linked-files',
},
{
// keep as first gatsby-source-filesystem plugin for gatsby image support
resolve: "gatsby-source-filesystem",
options: {
destinationDir: 'static',
path: `${__dirname}/static/img`,
name: "uploads",
},
},
],
},
},
{
resolve: 'gatsby-plugin-decap-cms',
options: {
modulePath: `${__dirname}/src/cms/cms.js`,
},
},
{
resolve: 'gatsby-plugin-purgecss', // purges all unused/unreferenced css rules
options: {
develop: true, // Activates purging in npm run develop
purgeOnly: ['/bulma-style.sass'], // applies purging only on the bulma css file
printRejected: true,
},
}, // must be after other CSS plugins
'gatsby-plugin-netlify', // make sure to keep it last in the array
],
}
},
{
resolve: "gatsby-source-filesystem",
options: {
path: `${__dirname}/src/pages`,
name: "pages",
},
},
{
resolve: "gatsby-source-filesystem",
options: {
path: `${__dirname}/src/img`,
name: "images",
},
},
`gatsby-plugin-image`,
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
"gatsby-remark-relative-images",
{
resolve: "gatsby-remark-images",
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 2048,
},
},
{
resolve: "gatsby-remark-copy-linked-files",
options: {
destinationDir: "static",
},
},
],
},
},
{
resolve: "gatsby-plugin-decap-cms",
options: {
modulePath: `${__dirname}/src/cms/cms.js`,
},
},
{
resolve: "gatsby-plugin-purgecss", // purges all unused/unreferenced css rules
options: {
develop: true, // Activates purging in npm run develop
purgeOnly: ["/bulma-style.sass"], // applies purging only on the bulma css file
printRejected: true,
},
}, // must be after other CSS plugins
"gatsby-plugin-netlify", // make sure to keep it last in the array
],
};
Loading