-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/lint #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
interim17
wants to merge
7
commits into
main
Choose a base branch
from
feature/lint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/lint #52
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6e095c9
add linting deps and config
interim17 a51d13c
fix linting errors
interim17 05e3f4f
fix eslint comment syntax
interim17 e5d985b
Merge branch 'main' of https://github.com/AllenCell/idea-board into f…
interim17 4158b46
run format
interim17 4d37d0c
add one lint warning
interim17 e9c54ef
restore prop types import
interim17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| declare module 'eslint-plugin-sort-destructure-keys'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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([ | ||
| 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", | ||
| }, | ||
| }, | ||
| ]); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| ], | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import
defineConfigfrom "eslint/config" is not a valid ESLint export. ESLint 9.x uses a flat config format that doesn't require adefineConfighelper. You can either remove this import and export the array directly, or if you need type safety, useimport type { Linter } from 'eslint'and type the config asLinter.Config[].There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong