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
17 changes: 17 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
parser: "@typescript-eslint/parser",
settings: {
react: {
version: "detect", // detect react version
},
},
env: {
node: true, // defines things like process.env when generating through node
},
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
rules: {
"no-anonymous-exports-page-templates": "warn",
"limited-exports-page-templates": "warn",
},
}
45 changes: 0 additions & 45 deletions .eslintrc.js

This file was deleted.

27 changes: 21 additions & 6 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})

const path = require("path")
// Get paths of Gatsby's required rules, which as of writing is located at:
// https://github.com/gatsbyjs/gatsby/tree/fbfe3f63dec23d279a27b54b4057dd611dce74bb/packages/
// gatsby/src/utils/eslint-rules
const gatsbyRequiredRules = path.join(
process.cwd(),
"node_modules",
"gatsby",
"dist",
"utils",
"eslint-rules"
)

module.exports = {
siteMetadata: {
siteUrl: `https://www.jessebox.net/`,
Expand All @@ -18,13 +31,14 @@ module.exports = {
{
resolve: "gatsby-plugin-eslint",
options: {
test: /\.js$|\.jsx$|\.ts$|\.tsx$/,
exclude: /(node_modules|.cache|public)/,
// Gatsby required rules directory
rulePaths: [gatsbyRequiredRules],
// Default settings that may be omitted or customized
stages: ["develop"],
options: {
emitWarning: true,
failOnError: false,
},
extensions: ["js", "jsx", "ts", "tsx"],
exclude: ["node_modules", "bower_components", ".cache", "public"],
// Any additional eslint-webpack-plugin options below
// ...
},
},
{
Expand Down Expand Up @@ -65,6 +79,7 @@ module.exports = {
],
},
},
`gatsby-plugin-image`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-sitemap`,
Expand Down
Loading