chore: move all eslint rules to root

Luke Karrys committed Oct 15, 2023 at 11:26 UTC 004cd67b698679774f6b5c2faded12daaad428e1
15 files changed +726 -59
.eslintrc.js
+24 -21
@@ -2,35 +2,38 @@ module.exports = {
2 root: true,
3 ignorePatterns: ['cli/', '.cache/', 'public/'],
4 extends: [
5 + 'react-app',
6 + 'react-app/jest',
7 'eslint:recommended',
8 'plugin:react/recommended',
9 'plugin:github/react',
10 'plugin:primer-react/recommended',
11 'plugin:react-hooks/recommended',
12 + 'plugin:import/recommended',
13 + 'prettier',
14 ],
11 - settings: {
12 - react: {
13 - version: 'detect',
14 - },
15 + rules: {
16 + 'react/prop-types': 'off',
17 },
18 overrides: [
17 - {
18 - files: ['src/**'],
19 - parserOptions: {
20 - ecmaFeatures: {
21 - jsx: true,
22 - },
23 - },
24 - env: {
25 - commonjs: true,
26 - es2022: true,
27 - browser: true,
28 - node: false,
29 - },
30 - rules: {
31 - 'max-len': 'off',
32 - },
33 - },
19 + // {
20 + // files: ['**/src/**/*.js'],
21 + // // env: {
22 + // // commonjs: false,
23 + // // browser: true,
24 + // // },
25 + // // parserOptions: {
26 + // // sourceType: 'module',
27 + // // },
28 + // },
29 + // {
30 + // files: ['**/gatsby-*.js'],
31 + // // env: {node: true},
32 + // },
33 + // {
34 + // files: ['**/test/*', '**/__tests__/*'],
35 + // env: {jest: true},
36 + // },
37 {
38 files: ['src/shared.js'],
39 rules: {
.gitignore
+2 -2
@@ -12,10 +12,10 @@
12 !/.gitignore
13 !/.npmrc
14 !/.nvmrc
15 -!/.prettierIgnore
15 +!/.prettierignore
16 +!/.prettierrc.js
17 !/.release-please-manifest.json
18 !/.reuse/
18 -!/*.md
19 !/bin/
20 !/CHANGELOG*
21 !/CODE_OF_CONDUCT.md
.prettierrc.js new
+6
@@ -0,0 +1,6 @@
1 +const config = require('@github/prettier-config')
2 +
3 +module.exports = {
4 + ...config,
5 + proseWrap: 'never',
6 +}
gatsby-node.js
+1 -1
@@ -21,7 +21,7 @@ exports.onCreateNode = ({node, actions, getNode}) => {
21 }
22 }
23
24 -exports.onCreateWebpackConfig = ({stage, actions}) => {
24 +exports.onCreateWebpackConfig = ({actions}) => {
25 actions.setWebpackConfig({
26 resolve: {
27 alias: {
package-lock.json
+678 -3
@@ -19,13 +19,16 @@
19 "theme": "^1.0.0"
20 },
21 "devDependencies": {
22 + "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
23 "@github/prettier-config": "^0.0.6",
24 "@npmcli/template-oss": "4.19.0",
25 "@testing-library/jest-dom": "^6.1.4",
26 "@testing-library/react": "^9.5.0",
27 "babel-jest": "^29.7.0",
28 "eslint": "^8.51.0",
29 + "eslint-config-react-app": "^7.0.1",
30 "eslint-plugin-github": "^4.10.1",
31 + "eslint-plugin-import": "^2.28.1",
32 "eslint-plugin-jsx-a11y": "^6.7.1",
33 "eslint-plugin-primer-react": "^4.0.3",
34 "eslint-plugin-react": "^7.33.2",
@@ -939,6 +942,25 @@
942 "@babel/core": "^7.0.0-0"
943 }
944 },
945 + "node_modules/@babel/plugin-proposal-decorators": {
946 + "version": "7.23.2",
947 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.2.tgz",
948 + "integrity": "sha512-eR0gJQc830fJVGz37oKLvt9W9uUIQSAovUl0e9sJ3YeO09dlcoBVYD3CLrjCj4qHdXmfiyTyFt8yeQYSN5fxLg==",
949 + "dev": true,
950 + "dependencies": {
951 + "@babel/helper-create-class-features-plugin": "^7.22.15",
952 + "@babel/helper-plugin-utils": "^7.22.5",
953 + "@babel/helper-replace-supers": "^7.22.20",
954 + "@babel/helper-split-export-declaration": "^7.22.6",
955 + "@babel/plugin-syntax-decorators": "^7.22.10"
956 + },
957 + "engines": {
958 + "node": ">=6.9.0"
959 + },
960 + "peerDependencies": {
961 + "@babel/core": "^7.0.0-0"
962 + }
963 + },
964 "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": {
965 "version": "7.18.6",
966 "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz",
@@ -1007,10 +1029,35 @@
1029 "@babel/core": "^7.0.0-0"
1030 }
1031 },
1032 + "node_modules/@babel/plugin-proposal-private-methods": {
1033 + "version": "7.18.6",
1034 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz",
1035 + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==",
1036 + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.",
1037 + "dev": true,
1038 + "dependencies": {
1039 + "@babel/helper-create-class-features-plugin": "^7.18.6",
1040 + "@babel/helper-plugin-utils": "^7.18.6"
1041 + },
1042 + "engines": {
1043 + "node": ">=6.9.0"
1044 + },
1045 + "peerDependencies": {
1046 + "@babel/core": "^7.0.0-0"
1047 + }
1048 + },
1049 "node_modules/@babel/plugin-proposal-private-property-in-object": {
1011 - "version": "7.21.0-placeholder-for-preset-env.2",
1012 - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
1013 - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==",
1050 + "version": "7.21.11",
1051 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz",
1052 + "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==",
1053 + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.",
1054 + "dev": true,
1055 + "dependencies": {
1056 + "@babel/helper-annotate-as-pure": "^7.18.6",
1057 + "@babel/helper-create-class-features-plugin": "^7.21.0",
1058 + "@babel/helper-plugin-utils": "^7.20.2",
1059 + "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
1060 + },
1061 "engines": {
1062 "node": ">=6.9.0"
1063 },
@@ -1066,6 +1113,21 @@
1113 "@babel/core": "^7.0.0-0"
1114 }
1115 },
1116 + "node_modules/@babel/plugin-syntax-decorators": {
1117 + "version": "7.22.10",
1118 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.22.10.tgz",
1119 + "integrity": "sha512-z1KTVemBjnz+kSEilAsI4lbkPOl5TvJH7YDSY1CTIzvLWJ+KHXp+mRe8VPmfnyvqOPqar1V2gid2PleKzRUstQ==",
1120 + "dev": true,
1121 + "dependencies": {
1122 + "@babel/helper-plugin-utils": "^7.22.5"
1123 + },
1124 + "engines": {
1125 + "node": ">=6.9.0"
1126 + },
1127 + "peerDependencies": {
1128 + "@babel/core": "^7.0.0-0"
1129 + }
1130 + },
1131 "node_modules/@babel/plugin-syntax-dynamic-import": {
1132 "version": "7.8.3",
1133 "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
@@ -2234,6 +2296,17 @@
2296 "@babel/core": "^7.0.0-0"
2297 }
2298 },
2299 + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-private-property-in-object": {
2300 + "version": "7.21.0-placeholder-for-preset-env.2",
2301 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
2302 + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==",
2303 + "engines": {
2304 + "node": ">=6.9.0"
2305 + },
2306 + "peerDependencies": {
2307 + "@babel/core": "^7.0.0-0"
2308 + }
2309 + },
2310 "node_modules/@babel/preset-env/node_modules/semver": {
2311 "version": "6.3.1",
2312 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@@ -7190,6 +7263,12 @@
7263 "tslib": "^2.4.0"
7264 }
7265 },
7266 + "node_modules/@rushstack/eslint-patch": {
7267 + "version": "1.5.1",
7268 + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz",
7269 + "integrity": "sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==",
7270 + "dev": true
7271 + },
7272 "node_modules/@sheerun/mutationobserver-shim": {
7273 "version": "0.3.3",
7274 "resolved": "https://registry.npmjs.org/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz",
@@ -9970,6 +10049,30 @@
10049 "@babel/core": "^7.0.0"
10050 }
10051 },
10052 + "node_modules/babel-preset-react-app": {
10053 + "version": "10.0.1",
10054 + "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-10.0.1.tgz",
10055 + "integrity": "sha512-b0D9IZ1WhhCWkrTXyFuIIgqGzSkRIH5D5AmB0bXbzYAB1OBAwHcUeyWW2LorutLWF5btNo/N7r/cIdmvvKJlYg==",
10056 + "dev": true,
10057 + "dependencies": {
10058 + "@babel/core": "^7.16.0",
10059 + "@babel/plugin-proposal-class-properties": "^7.16.0",
10060 + "@babel/plugin-proposal-decorators": "^7.16.4",
10061 + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
10062 + "@babel/plugin-proposal-numeric-separator": "^7.16.0",
10063 + "@babel/plugin-proposal-optional-chaining": "^7.16.0",
10064 + "@babel/plugin-proposal-private-methods": "^7.16.0",
10065 + "@babel/plugin-transform-flow-strip-types": "^7.16.0",
10066 + "@babel/plugin-transform-react-display-name": "^7.16.0",
10067 + "@babel/plugin-transform-runtime": "^7.16.4",
10068 + "@babel/preset-env": "^7.16.4",
10069 + "@babel/preset-react": "^7.16.0",
10070 + "@babel/preset-typescript": "^7.16.0",
10071 + "@babel/runtime": "^7.16.3",
10072 + "babel-plugin-macros": "^3.1.0",
10073 + "babel-plugin-transform-react-remove-prop-types": "^0.4.24"
10074 + }
10075 + },
10076 "node_modules/bail": {
10077 "version": "1.0.5",
10078 "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
@@ -13525,6 +13628,287 @@
13628 "eslint": ">=7.0.0"
13629 }
13630 },
13631 + "node_modules/eslint-config-react-app": {
13632 + "version": "7.0.1",
13633 + "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz",
13634 + "integrity": "sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==",
13635 + "dev": true,
13636 + "dependencies": {
13637 + "@babel/core": "^7.16.0",
13638 + "@babel/eslint-parser": "^7.16.3",
13639 + "@rushstack/eslint-patch": "^1.1.0",
13640 + "@typescript-eslint/eslint-plugin": "^5.5.0",
13641 + "@typescript-eslint/parser": "^5.5.0",
13642 + "babel-preset-react-app": "^10.0.1",
13643 + "confusing-browser-globals": "^1.0.11",
13644 + "eslint-plugin-flowtype": "^8.0.3",
13645 + "eslint-plugin-import": "^2.25.3",
13646 + "eslint-plugin-jest": "^25.3.0",
13647 + "eslint-plugin-jsx-a11y": "^6.5.1",
13648 + "eslint-plugin-react": "^7.27.1",
13649 + "eslint-plugin-react-hooks": "^4.3.0",
13650 + "eslint-plugin-testing-library": "^5.0.1"
13651 + },
13652 + "engines": {
13653 + "node": ">=14.0.0"
13654 + },
13655 + "peerDependencies": {
13656 + "eslint": "^8.0.0"
13657 + }
13658 + },
13659 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/eslint-plugin": {
13660 + "version": "5.62.0",
13661 + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
13662 + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
13663 + "dev": true,
13664 + "dependencies": {
13665 + "@eslint-community/regexpp": "^4.4.0",
13666 + "@typescript-eslint/scope-manager": "5.62.0",
13667 + "@typescript-eslint/type-utils": "5.62.0",
13668 + "@typescript-eslint/utils": "5.62.0",
13669 + "debug": "^4.3.4",
13670 + "graphemer": "^1.4.0",
13671 + "ignore": "^5.2.0",
13672 + "natural-compare-lite": "^1.4.0",
13673 + "semver": "^7.3.7",
13674 + "tsutils": "^3.21.0"
13675 + },
13676 + "engines": {
13677 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13678 + },
13679 + "funding": {
13680 + "type": "opencollective",
13681 + "url": "https://opencollective.com/typescript-eslint"
13682 + },
13683 + "peerDependencies": {
13684 + "@typescript-eslint/parser": "^5.0.0",
13685 + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
13686 + },
13687 + "peerDependenciesMeta": {
13688 + "typescript": {
13689 + "optional": true
13690 + }
13691 + }
13692 + },
13693 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/experimental-utils": {
13694 + "version": "5.62.0",
13695 + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz",
13696 + "integrity": "sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==",
13697 + "dev": true,
13698 + "dependencies": {
13699 + "@typescript-eslint/utils": "5.62.0"
13700 + },
13701 + "engines": {
13702 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13703 + },
13704 + "funding": {
13705 + "type": "opencollective",
13706 + "url": "https://opencollective.com/typescript-eslint"
13707 + },
13708 + "peerDependencies": {
13709 + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
13710 + }
13711 + },
13712 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/parser": {
13713 + "version": "5.62.0",
13714 + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
13715 + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
13716 + "dev": true,
13717 + "dependencies": {
13718 + "@typescript-eslint/scope-manager": "5.62.0",
13719 + "@typescript-eslint/types": "5.62.0",
13720 + "@typescript-eslint/typescript-estree": "5.62.0",
13721 + "debug": "^4.3.4"
13722 + },
13723 + "engines": {
13724 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13725 + },
13726 + "funding": {
13727 + "type": "opencollective",
13728 + "url": "https://opencollective.com/typescript-eslint"
13729 + },
13730 + "peerDependencies": {
13731 + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
13732 + },
13733 + "peerDependenciesMeta": {
13734 + "typescript": {
13735 + "optional": true
13736 + }
13737 + }
13738 + },
13739 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/scope-manager": {
13740 + "version": "5.62.0",
13741 + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
13742 + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
13743 + "dev": true,
13744 + "dependencies": {
13745 + "@typescript-eslint/types": "5.62.0",
13746 + "@typescript-eslint/visitor-keys": "5.62.0"
13747 + },
13748 + "engines": {
13749 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13750 + },
13751 + "funding": {
13752 + "type": "opencollective",
13753 + "url": "https://opencollective.com/typescript-eslint"
13754 + }
13755 + },
13756 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/type-utils": {
13757 + "version": "5.62.0",
13758 + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
13759 + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
13760 + "dev": true,
13761 + "dependencies": {
13762 + "@typescript-eslint/typescript-estree": "5.62.0",
13763 + "@typescript-eslint/utils": "5.62.0",
13764 + "debug": "^4.3.4",
13765 + "tsutils": "^3.21.0"
13766 + },
13767 + "engines": {
13768 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13769 + },
13770 + "funding": {
13771 + "type": "opencollective",
13772 + "url": "https://opencollective.com/typescript-eslint"
13773 + },
13774 + "peerDependencies": {
13775 + "eslint": "*"
13776 + },
13777 + "peerDependenciesMeta": {
13778 + "typescript": {
13779 + "optional": true
13780 + }
13781 + }
13782 + },
13783 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/types": {
13784 + "version": "5.62.0",
13785 + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
13786 + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
13787 + "dev": true,
13788 + "engines": {
13789 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13790 + },
13791 + "funding": {
13792 + "type": "opencollective",
13793 + "url": "https://opencollective.com/typescript-eslint"
13794 + }
13795 + },
13796 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/typescript-estree": {
13797 + "version": "5.62.0",
13798 + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
13799 + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
13800 + "dev": true,
13801 + "dependencies": {
13802 + "@typescript-eslint/types": "5.62.0",
13803 + "@typescript-eslint/visitor-keys": "5.62.0",
13804 + "debug": "^4.3.4",
13805 + "globby": "^11.1.0",
13806 + "is-glob": "^4.0.3",
13807 + "semver": "^7.3.7",
13808 + "tsutils": "^3.21.0"
13809 + },
13810 + "engines": {
13811 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13812 + },
13813 + "funding": {
13814 + "type": "opencollective",
13815 + "url": "https://opencollective.com/typescript-eslint"
13816 + },
13817 + "peerDependenciesMeta": {
13818 + "typescript": {
13819 + "optional": true
13820 + }
13821 + }
13822 + },
13823 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/utils": {
13824 + "version": "5.62.0",
13825 + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
13826 + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
13827 + "dev": true,
13828 + "dependencies": {
13829 + "@eslint-community/eslint-utils": "^4.2.0",
13830 + "@types/json-schema": "^7.0.9",
13831 + "@types/semver": "^7.3.12",
13832 + "@typescript-eslint/scope-manager": "5.62.0",
13833 + "@typescript-eslint/types": "5.62.0",
13834 + "@typescript-eslint/typescript-estree": "5.62.0",
13835 + "eslint-scope": "^5.1.1",
13836 + "semver": "^7.3.7"
13837 + },
13838 + "engines": {
13839 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13840 + },
13841 + "funding": {
13842 + "type": "opencollective",
13843 + "url": "https://opencollective.com/typescript-eslint"
13844 + },
13845 + "peerDependencies": {
13846 + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
13847 + }
13848 + },
13849 + "node_modules/eslint-config-react-app/node_modules/@typescript-eslint/visitor-keys": {
13850 + "version": "5.62.0",
13851 + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
13852 + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
13853 + "dev": true,
13854 + "dependencies": {
13855 + "@typescript-eslint/types": "5.62.0",
13856 + "eslint-visitor-keys": "^3.3.0"
13857 + },
13858 + "engines": {
13859 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
13860 + },
13861 + "funding": {
13862 + "type": "opencollective",
13863 + "url": "https://opencollective.com/typescript-eslint"
13864 + }
13865 + },
13866 + "node_modules/eslint-config-react-app/node_modules/eslint-plugin-jest": {
13867 + "version": "25.7.0",
13868 + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz",
13869 + "integrity": "sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==",
13870 + "dev": true,
13871 + "dependencies": {
13872 + "@typescript-eslint/experimental-utils": "^5.0.0"
13873 + },
13874 + "engines": {
13875 + "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
13876 + },
13877 + "peerDependencies": {
13878 + "@typescript-eslint/eslint-plugin": "^4.0.0 || ^5.0.0",
13879 + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
13880 + },
13881 + "peerDependenciesMeta": {
13882 + "@typescript-eslint/eslint-plugin": {
13883 + "optional": true
13884 + },
13885 + "jest": {
13886 + "optional": true
13887 + }
13888 + }
13889 + },
13890 + "node_modules/eslint-config-react-app/node_modules/eslint-scope": {
13891 + "version": "5.1.1",
13892 + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
13893 + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
13894 + "dev": true,
13895 + "dependencies": {
13896 + "esrecurse": "^4.3.0",
13897 + "estraverse": "^4.1.1"
13898 + },
13899 + "engines": {
13900 + "node": ">=8.0.0"
13901 + }
13902 + },
13903 + "node_modules/eslint-config-react-app/node_modules/estraverse": {
13904 + "version": "4.3.0",
13905 + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
13906 + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
13907 + "dev": true,
13908 + "engines": {
13909 + "node": ">=4.0"
13910 + }
13911 + },
13912 "node_modules/eslint-import-resolver-node": {
13913 "version": "0.3.9",
13914 "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
@@ -13642,6 +14026,24 @@
14026 "eslint": "*"
14027 }
14028 },
14029 + "node_modules/eslint-plugin-flowtype": {
14030 + "version": "8.0.3",
14031 + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz",
14032 + "integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==",
14033 + "dev": true,
14034 + "dependencies": {
14035 + "lodash": "^4.17.21",
14036 + "string-natural-compare": "^3.0.1"
14037 + },
14038 + "engines": {
14039 + "node": ">=12.0.0"
14040 + },
14041 + "peerDependencies": {
14042 + "@babel/plugin-syntax-flow": "^7.14.5",
14043 + "@babel/plugin-transform-react-jsx": "^7.14.9",
14044 + "eslint": "^8.1.0"
14045 + }
14046 + },
14047 "node_modules/eslint-plugin-github": {
14048 "version": "4.10.1",
14049 "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.1.tgz",
@@ -14035,6 +14437,144 @@
14437 "semver": "bin/semver.js"
14438 }
14439 },
14440 + "node_modules/eslint-plugin-testing-library": {
14441 + "version": "5.11.1",
14442 + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.1.tgz",
14443 + "integrity": "sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==",
14444 + "dev": true,
14445 + "dependencies": {
14446 + "@typescript-eslint/utils": "^5.58.0"
14447 + },
14448 + "engines": {
14449 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0",
14450 + "npm": ">=6"
14451 + },
14452 + "peerDependencies": {
14453 + "eslint": "^7.5.0 || ^8.0.0"
14454 + }
14455 + },
14456 + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/scope-manager": {
14457 + "version": "5.62.0",
14458 + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
14459 + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
14460 + "dev": true,
14461 + "dependencies": {
14462 + "@typescript-eslint/types": "5.62.0",
14463 + "@typescript-eslint/visitor-keys": "5.62.0"
14464 + },
14465 + "engines": {
14466 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
14467 + },
14468 + "funding": {
14469 + "type": "opencollective",
14470 + "url": "https://opencollective.com/typescript-eslint"
14471 + }
14472 + },
14473 + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/types": {
14474 + "version": "5.62.0",
14475 + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
14476 + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
14477 + "dev": true,
14478 + "engines": {
14479 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
14480 + },
14481 + "funding": {
14482 + "type": "opencollective",
14483 + "url": "https://opencollective.com/typescript-eslint"
14484 + }
14485 + },
14486 + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/typescript-estree": {
14487 + "version": "5.62.0",
14488 + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
14489 + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
14490 + "dev": true,
14491 + "dependencies": {
14492 + "@typescript-eslint/types": "5.62.0",
14493 + "@typescript-eslint/visitor-keys": "5.62.0",
14494 + "debug": "^4.3.4",
14495 + "globby": "^11.1.0",
14496 + "is-glob": "^4.0.3",
14497 + "semver": "^7.3.7",
14498 + "tsutils": "^3.21.0"
14499 + },
14500 + "engines": {
14501 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
14502 + },
14503 + "funding": {
14504 + "type": "opencollective",
14505 + "url": "https://opencollective.com/typescript-eslint"
14506 + },
14507 + "peerDependenciesMeta": {
14508 + "typescript": {
14509 + "optional": true
14510 + }
14511 + }
14512 + },
14513 + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/utils": {
14514 + "version": "5.62.0",
14515 + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
14516 + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
14517 + "dev": true,
14518 + "dependencies": {
14519 + "@eslint-community/eslint-utils": "^4.2.0",
14520 + "@types/json-schema": "^7.0.9",
14521 + "@types/semver": "^7.3.12",
14522 + "@typescript-eslint/scope-manager": "5.62.0",
14523 + "@typescript-eslint/types": "5.62.0",
14524 + "@typescript-eslint/typescript-estree": "5.62.0",
14525 + "eslint-scope": "^5.1.1",
14526 + "semver": "^7.3.7"
14527 + },
14528 + "engines": {
14529 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
14530 + },
14531 + "funding": {
14532 + "type": "opencollective",
14533 + "url": "https://opencollective.com/typescript-eslint"
14534 + },
14535 + "peerDependencies": {
14536 + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
14537 + }
14538 + },
14539 + "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/visitor-keys": {
14540 + "version": "5.62.0",
14541 + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
14542 + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
14543 + "dev": true,
14544 + "dependencies": {
14545 + "@typescript-eslint/types": "5.62.0",
14546 + "eslint-visitor-keys": "^3.3.0"
14547 + },
14548 + "engines": {
14549 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
14550 + },
14551 + "funding": {
14552 + "type": "opencollective",
14553 + "url": "https://opencollective.com/typescript-eslint"
14554 + }
14555 + },
14556 + "node_modules/eslint-plugin-testing-library/node_modules/eslint-scope": {
14557 + "version": "5.1.1",
14558 + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
14559 + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
14560 + "dev": true,
14561 + "dependencies": {
14562 + "esrecurse": "^4.3.0",
14563 + "estraverse": "^4.1.1"
14564 + },
14565 + "engines": {
14566 + "node": ">=8.0.0"
14567 + }
14568 + },
14569 + "node_modules/eslint-plugin-testing-library/node_modules/estraverse": {
14570 + "version": "4.3.0",
14571 + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
14572 + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
14573 + "dev": true,
14574 + "engines": {
14575 + "node": ">=4.0"
14576 + }
14577 + },
14578 "node_modules/eslint-rule-documentation": {
14579 "version": "1.0.23",
14580 "resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz",
@@ -17076,6 +17616,135 @@
17616 "eslint": "^7.1.0"
17617 }
17618 },
17619 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library": {
17620 + "version": "3.10.2",
17621 + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.2.tgz",
17622 + "integrity": "sha512-WAmOCt7EbF1XM8XfbCKAEzAPnShkNSwcIsAD2jHdsMUT9mZJPjLCG7pMzbcC8kK366NOuGip8HKLDC+Xk4yIdA==",
17623 + "optional": true,
17624 + "peer": true,
17625 + "dependencies": {
17626 + "@typescript-eslint/experimental-utils": "^3.10.1"
17627 + },
17628 + "engines": {
17629 + "node": "^10.12.0 || >=12.0.0",
17630 + "npm": ">=6"
17631 + },
17632 + "peerDependencies": {
17633 + "eslint": "^5 || ^6 || ^7"
17634 + }
17635 + },
17636 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/experimental-utils": {
17637 + "version": "3.10.1",
17638 + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz",
17639 + "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==",
17640 + "optional": true,
17641 + "peer": true,
17642 + "dependencies": {
17643 + "@types/json-schema": "^7.0.3",
17644 + "@typescript-eslint/types": "3.10.1",
17645 + "@typescript-eslint/typescript-estree": "3.10.1",
17646 + "eslint-scope": "^5.0.0",
17647 + "eslint-utils": "^2.0.0"
17648 + },
17649 + "engines": {
17650 + "node": "^10.12.0 || >=12.0.0"
17651 + },
17652 + "funding": {
17653 + "type": "opencollective",
17654 + "url": "https://opencollective.com/typescript-eslint"
17655 + },
17656 + "peerDependencies": {
17657 + "eslint": "*"
17658 + }
17659 + },
17660 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/types": {
17661 + "version": "3.10.1",
17662 + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz",
17663 + "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==",
17664 + "optional": true,
17665 + "peer": true,
17666 + "engines": {
17667 + "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
17668 + },
17669 + "funding": {
17670 + "type": "opencollective",
17671 + "url": "https://opencollective.com/typescript-eslint"
17672 + }
17673 + },
17674 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/typescript-estree": {
17675 + "version": "3.10.1",
17676 + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz",
17677 + "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==",
17678 + "optional": true,
17679 + "peer": true,
17680 + "dependencies": {
17681 + "@typescript-eslint/types": "3.10.1",
17682 + "@typescript-eslint/visitor-keys": "3.10.1",
17683 + "debug": "^4.1.1",
17684 + "glob": "^7.1.6",
17685 + "is-glob": "^4.0.1",
17686 + "lodash": "^4.17.15",
17687 + "semver": "^7.3.2",
17688 + "tsutils": "^3.17.1"
17689 + },
17690 + "engines": {
17691 + "node": "^10.12.0 || >=12.0.0"
17692 + },
17693 + "funding": {
17694 + "type": "opencollective",
17695 + "url": "https://opencollective.com/typescript-eslint"
17696 + },
17697 + "peerDependenciesMeta": {
17698 + "typescript": {
17699 + "optional": true
17700 + }
17701 + }
17702 + },
17703 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/visitor-keys": {
17704 + "version": "3.10.1",
17705 + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz",
17706 + "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==",
17707 + "optional": true,
17708 + "peer": true,
17709 + "dependencies": {
17710 + "eslint-visitor-keys": "^1.1.0"
17711 + },
17712 + "engines": {
17713 + "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
17714 + },
17715 + "funding": {
17716 + "type": "opencollective",
17717 + "url": "https://opencollective.com/typescript-eslint"
17718 + }
17719 + },
17720 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library/node_modules/debug": {
17721 + "version": "4.3.4",
17722 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
17723 + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
17724 + "optional": true,
17725 + "peer": true,
17726 + "dependencies": {
17727 + "ms": "2.1.2"
17728 + },
17729 + "engines": {
17730 + "node": ">=6.0"
17731 + },
17732 + "peerDependenciesMeta": {
17733 + "supports-color": {
17734 + "optional": true
17735 + }
17736 + }
17737 + },
17738 + "node_modules/gatsby/node_modules/eslint-plugin-testing-library/node_modules/eslint-visitor-keys": {
17739 + "version": "1.3.0",
17740 + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
17741 + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
17742 + "optional": true,
17743 + "peer": true,
17744 + "engines": {
17745 + "node": ">=4"
17746 + }
17747 + },
17748 "node_modules/gatsby/node_modules/eslint-scope": {
17749 "version": "5.1.1",
17750 "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@@ -22551,6 +23220,12 @@
23220 "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
23221 "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
23222 },
23223 + "node_modules/natural-compare-lite": {
23224 + "version": "1.4.0",
23225 + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
23226 + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
23227 + "dev": true
23228 + },
23229 "node_modules/negotiator": {
23230 "version": "0.6.3",
23231 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
package.json
+3
@@ -35,13 +35,16 @@
35 "theme": "^1.0.0"
36 },
37 "devDependencies": {
38 + "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
39 "@github/prettier-config": "^0.0.6",
40 "@npmcli/template-oss": "4.19.0",
41 "@testing-library/jest-dom": "^6.1.4",
42 "@testing-library/react": "^9.5.0",
43 "babel-jest": "^29.7.0",
44 "eslint": "^8.51.0",
45 + "eslint-config-react-app": "^7.0.1",
46 "eslint-plugin-github": "^4.10.1",
47 + "eslint-plugin-import": "^2.28.1",
48 "eslint-plugin-jsx-a11y": "^6.7.1",
49 "eslint-plugin-primer-react": "^4.0.3",
50 "eslint-plugin-react": "^7.33.2",
scripts/template-oss/index.js
+4 -3
@@ -33,7 +33,7 @@ module.exports = {
33 macCI: false,
34 windowsCI: false,
35 lockfile: true,
36 - allowedPackages: ['eslint'],
36 + allowedPackages: ['eslint', 'eslint-plugin-import'],
37 requiredPackages: {
38 devDependencies: [],
39 },
@@ -43,11 +43,12 @@ module.exports = {
43 '/static/',
44 '/content/',
45 '/LICENSE*',
46 - '/*.md',
46 '/gatsby-*.js',
47 + '/CODE_OF_CONDUCT.md',
48 '/CONTRIBUTING.md',
49 '/CONTENT-MODEL.md',
50 '/.nvmrc',
51 - '/.prettierIgnore',
51 + '/.prettierignore',
52 + '/.prettierrc.js',
53 ],
54 }
src/shared.js
+3 -1
@@ -3,7 +3,7 @@ import {Link} from '@primer/react'
3 import Screenshot from 'theme/src/mdx/screenshot'
4 import Note from 'theme/src/mdx/note'
5
6 -export default {
6 +const shared = {
7 /* User login */
8 'user-login': {
9 text: (
@@ -399,3 +399,5 @@ export default {
399 ),
400 },
401 }
402 +
403 +export default shared
test/index.js deleted
-3
@@ -1,3 +0,0 @@
1 -const t = require('tap')
2 -
3 -t.ok(true)
theme/.gitignore
-2
@@ -8,12 +8,10 @@
8 !/.eslintrc.js
9 !/.eslintrc.local.*
10 !/.gitignore
11 -!/.prettierIgnore
11 !/bin/
12 !/CHANGELOG*
13 !/docs/
14 !/gatsby-*.js
16 -!/index.js
15 !/jest*.js
16 !/lib/
17 !/LICENSE*
theme/gatsby-config.js
-3
@@ -44,9 +44,6 @@ module.exports = ({icon}) => ({
44 plugins: [
45 {
46 resolve: 'gatsby-plugin-styled-components',
47 - // options: {
48 - // minify: !DEV,
49 - // },
47 },
48 'gatsby-plugin-react-helmet',
49 'gatsby-plugin-catch-links',
theme/scripts/template-oss/index.js
+1 -1
@@ -1,4 +1,4 @@
1 module.exports = {
2 ...require('../../../scripts/template-oss'),
3 - allowPaths: ['/src', '/gatsby-*.js', '/jest*.js', '/index.js', '/.prettierIgnore'],
3 + allowPaths: ['/src', '/gatsby-*.js', '/jest*.js'],
4 }
theme/src/components/hero.js
-13
@@ -20,19 +20,6 @@ function Hero() {
20 </Box>
21 </ThemeProvider>
22 )
23 -
24 - return (
25 - <Box bg="black" py={6}>
26 - <Container>
27 - <Heading as="h1" color="white" fontSize={7} m={0}>
28 - {title}
29 - </Heading>
30 - <Text as="p" m={0} color="gray.4" fontSize={4}>
31 - {description}
32 - </Text>
33 - </Container>
34 - </Box>
35 - )
23 }
24
25 export default Hero
theme/src/util/aria-live.js
+1 -5
@@ -15,7 +15,7 @@ if (typeof window !== 'undefined') {
15 }
16
17 // Announce message update to screen reader.
18 -function announce(message) {
18 +export function announce(message) {
19 if (!container || !container.isConnected) {
20 /* This condition is for when the aria-live container no longer exists due to nav methods like turbo drive
21 which replace the body getting rid of the region. We add the container if it's missing. We then add a delay
@@ -63,7 +63,3 @@ function createNoticeContainer() {
63 container.style.border = '0'
64 document.body.append(container)
65 }
66 -
67 -module.exports = {
68 - announce,
69 -}
theme/src/util/nav-hierarchy.js
+3 -1
@@ -1,7 +1,7 @@
1 import {withPrefix} from 'gatsby'
2 import navItems from '../nav.yml'
3
4 -export default {
4 +const NavHierarchy = {
5 getLocation(path) {
6 const pathPrefix = withPrefix('/')
7
@@ -252,3 +252,5 @@ export default {
252 return linkItem ? this.isActiveItem(currentPath, linkItem) : false
253 },
254 }
255 +
256 +export default NavHierarchy