-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ESLint Config, Update Dependencies, and Enhance React Compon…
…ents (#27) * Bump sort-package-json from 2.11.0 to 2.12.0 Bumps [sort-package-json](https://github.com/keithamus/sort-package-json) from 2.11.0 to 2.12.0. - [Release notes](https://github.com/keithamus/sort-package-json/releases) - [Commits](keithamus/sort-package-json@v2.11.0...v2.12.0) --- updated-dependencies: - dependency-name: sort-package-json dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore: add Vercel Speed Insights * chore: upgrade eslint to 9.15 * chore: update license * chore: add Vercel Speed Insights to Pagee.tsx --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
81daf49
commit 0354b21
Showing
9 changed files
with
265 additions
and
148 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,107 @@ | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import simpleImportSort from "eslint-plugin-simple-import-sort"; | ||
import _import from "eslint-plugin-import"; | ||
import react from "eslint-plugin-react"; | ||
import reactMemo from "eslint-plugin-react-memo"; | ||
import reactHooks from "eslint-plugin-react-hooks"; | ||
import { fixupPluginRules } from "@eslint/compat"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import js from "@eslint/js"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [{ | ||
ignores: ["*/public", "*/node_modules/*", "*/.next/*", "*/dist/*"], | ||
}, ...compat.extends( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@next/next/recommended", | ||
"prettier", | ||
), { | ||
plugins: { | ||
"@typescript-eslint": typescriptEslint, | ||
"simple-import-sort": simpleImportSort, | ||
import: fixupPluginRules(_import), | ||
react, | ||
"react-memo": reactMemo, | ||
"react-hooks": fixupPluginRules(reactHooks), | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
settings: { | ||
react: { | ||
pragma: "React", | ||
version: "detect", | ||
}, | ||
}, | ||
|
||
rules: { | ||
"react/display-name": "off", | ||
"react-memo/require-usememo": "error", | ||
"react-memo/require-memo": "error", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "error", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
|
||
"@typescript-eslint/member-ordering": ["warn", { | ||
interfaces: ["signature", "method", "constructor", "field"], | ||
typeLiterals: ["signature", "method", "constructor", "field"], | ||
}], | ||
|
||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
"import/order": "off", | ||
"no-irregular-whitespace": "off", | ||
|
||
"@typescript-eslint/no-unused-vars": ["warn", { | ||
argsIgnorePattern: "^_", | ||
}], | ||
|
||
"object-curly-spacing": ["error", "never"], | ||
"react/jsx-curly-brace-presence": [2, "never"], | ||
"react/jsx-no-duplicate-props": "error", | ||
"react/jsx-sort-props": "error", | ||
"react/react-in-jsx-scope": "off", | ||
"react/no-unescaped-entities": "off", | ||
"simple-import-sort/exports": "error", | ||
"simple-import-sort/imports": "error", | ||
"sort-imports": "off", | ||
"jsx-a11y/no-onchange": "off", | ||
"jsx-a11y/no-autofocus": "off", | ||
"@next/next/no-img-element": "off", | ||
}, | ||
}, { | ||
files: ["**/*.tsx"], | ||
|
||
rules: { | ||
"react/prop-types": "off", | ||
}, | ||
}, { | ||
files: ["**/*.js"], | ||
|
||
rules: { | ||
"@typescript-eslint/no-var-requires": "off", | ||
}, | ||
}]; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
0354b21
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.
Successfully deployed to the following URLs:
gvns-ca – ./
gvns-ca-git-prod-gareth-evans-projects-43505eb8.vercel.app
gvns.ca
gvns-ca-gareth-evans-projects-43505eb8.vercel.app
gwilym.ca
www.gvns.ca