Skip to content

Commit

Permalink
Hide links alumni (#684)
Browse files Browse the repository at this point in the history
* Update `yarn` version

* Fix a bunch of erros in the console

* 📦 Update packages

* Upgrade eslint and fix errors

* Fix buld error
  • Loading branch information
bradystroud authored Sep 25, 2024
1 parent 7b3a7dd commit 3abba53
Show file tree
Hide file tree
Showing 24 changed files with 1,108 additions and 760 deletions.
16 changes: 0 additions & 16 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc

This file was deleted.

448 changes: 224 additions & 224 deletions .yarn/releases/yarn-4.4.0.cjs → .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ supportedArchitectures:
- linux
- win32

yarnPath: .yarn/releases/yarn-4.4.0.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
80 changes: 80 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import prettier from 'eslint-plugin-prettier';
import jsxA11Y from 'eslint-plugin-jsx-a11y';
import globals from 'globals';
import babelParser from '@babel/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: [
'**/.DS_Store',
'**/node_modules/',
'**/.env*',
'**/logs',
'**/*.log',
'**/npm-debug.log*',
'**/yarn-debug.log*',
'**/yarn-error.log*',
'**/.cache/',
'**/public',
'**/build',
'**/lib/**/*',
],
},
...compat.extends(
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended'
),
{
plugins: {
prettier,
'jsx-a11y': jsxA11Y,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: babelParser,
ecmaVersion: 12,
sourceType: 'module',

parserOptions: {
requireConfigFile: false,

babelOptions: {
presets: ['@babel/preset-react'],
},
},
},

settings: {
react: {
version: 'detect',
},
},

rules: {
strict: 0,
'no-console': 'warn',
quotes: ['warn', 'single'],
'prettier/prettier': 'warn',
'react/prop-types': 'warn',
'no-unused-vars': 'warn',
},
},
];
2 changes: 1 addition & 1 deletion gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if (!appInsightsConnectionString) {
}

// React Context in Browser
// eslint-disable-next-line react/prop-types

export const wrapRootElement = ({ element }) => {
return <AppProvider>{element}</AppProvider>;
};
Expand Down
5 changes: 3 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (!appInsightsConnectionString) {
const client = appInsights.defaultClient;

// Add a telemetry initializer if needed
client.addTelemetryProcessor((envelope, contextObjects) => {
client.addTelemetryProcessor((envelope) => {
envelope.tags[appInsights.defaultClient.context.keys.cloudRole] =
'GatsbyBuildProcess';
});
Expand Down Expand Up @@ -134,7 +134,7 @@ const loadSampleData = (crmData) => {
crmData.push(user);
}
});
} catch (err) {
} catch {
// if error, then we don't add anything
}
};
Expand Down Expand Up @@ -492,6 +492,7 @@ exports.createPages = async function ({ actions, graphql }) {
toPath: `/${person.path}`,
isPermanent: true,
});
/* eslint-disable no-console */
console.log(
'Creating redirect from ' + nicknamePath + ' to ' + person.path
);
Expand Down
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "ssw-people",
"license": "MIT",
"author": "SSWDevelopers <SSWDevelopers@ssw.com.au>",
"type": "commonjs",
"scripts": {
"dev": "gatsby develop",
"serve": "gatsby serve",
Expand All @@ -12,7 +13,7 @@
"build": "yarn run build:dir && yarn run build:favicons && gatsby build --prefix-paths --log-pages",
"devbuild": "yarn run build:dir && yarn run build:favicons && gatsby build",
"test": "ava **/*.test.js --verbose",
"lint": "eslint --max-warnings=0 . --ext ts --ext tsx --ext js --ext jsx"
"lint": "eslint --max-warnings=0 ."
},
"greenkeeper": {
"ignore": [
Expand All @@ -24,11 +25,11 @@
"@brainhubeu/react-carousel": "^2.0.4",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@microsoft/applicationinsights-web": "^3.3.1",
"@microsoft/applicationinsights-web": "^3.3.3",
"@raae/gatsby-remark-oembed": "^0.3.3",
"@reach/router": "^1.3.4",
"assert": "^2.1.0",
"axios": "^1.7.3",
"axios": "^1.7.7",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"classnames": "^2.5.1",
Expand All @@ -44,13 +45,13 @@
"gatsby-plugin-react-svg": "^3.3.0",
"gatsby-plugin-sharp": "^5.13.1",
"gatsby-plugin-sitemap": "^6.13.1",
"gatsby-remark-copy-linked-files": "^6.13.1",
"gatsby-remark-copy-linked-files": "^6.13.2",
"gatsby-remark-custom-blocks": "^3.15.0",
"gatsby-remark-embed-video": "^3.2.1",
"gatsby-remark-figure-caption": "^2.0.0",
"gatsby-remark-images": "^7.13.1",
"gatsby-remark-images": "^7.13.2",
"gatsby-remark-relative-images": "^0.3.0",
"gatsby-remark-responsive-iframe": "^6.13.1",
"gatsby-remark-responsive-iframe": "^6.13.2",
"gatsby-source-filesystem": "^5.13.1",
"gatsby-source-git": "^1.1.0",
"gatsby-transformer-json": "^5.13.1",
Expand All @@ -63,7 +64,7 @@
"moment": "^2.30.1",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"postcss": "^8.4.41",
"postcss": "^8.4.47",
"postcss-import": "^16.1.0",
"postcss-nested": "^6.2.0",
"preval.macro": "^5.0.0",
Expand All @@ -72,7 +73,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-ga": "^3.3.1",
"react-github-calendar": "^4.2.2",
"react-github-calendar": "^4.3.1",
"react-helmet": "^6.1.0",
"react-hot-toast": "^2.4.1",
"react-jotform": "^1.0.2",
Expand All @@ -84,7 +85,7 @@
"ssw.rules.widget": "^2.0.5",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"styled-components": "^6.1.12",
"styled-components": "^6.1.13",
"url": "^0.11.4",
"util": "^0.12.5",
"webpack-assets-manifest": "^5.2.1"
Expand All @@ -95,24 +96,24 @@
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"applicationinsights": "^3.2.1",
"applicationinsights": "^3.3.0",
"array-flat-polyfill": "^1.0.1",
"autoprefixer": "^10.4.20",
"ava": "^6.1.3",
"babel-eslint": "^10.1.0",
"chrome-launcher": "^1.1.2",
"directory-named-webpack-plugin": "^4.1.0",
"dotenv": "^16.4.5",
"eslint": "^9.9.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint": "^9.11.1",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react": "^7.36.1",
"favicons": "^6.2.2",
"gatsby-cli": "^5.13.3",
"lighthouse": "^12.2.0",
"lighthouse": "^12.2.1",
"mkdirp": "^3.0.1",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.9"
"tailwindcss": "^3.4.13"
},
"packageComments": {
"⚠️ gatsby-remark-custom-blocks": "Locked to ^3.2.0 - Higher versions are incompatible with gatsby-transformer-remark@^4.0.0 as per https://www.gatsbyjs.com/plugins/gatsby-remark-custom-blocks/",
Expand All @@ -124,5 +125,5 @@
"resolutions": {
"sharp": "0.33.2"
},
"packageManager": "yarn@4.4.0"
}
"packageManager": "yarn@4.5.0"
}
1 change: 0 additions & 1 deletion src/components/contact/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const Contact = ({ firstNameOrNickname, alumni }) => {

Contact.propTypes = {
firstNameOrNickname: PropTypes.string.isRequired,
fullName: PropTypes.string.isRequired,
alumni: PropTypes.bool.isRequired,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import GitHubCalendar from 'react-github-calendar';
import PropTypes from 'prop-types';


const GitHubContributionCalendar = ({ githubUrl }) => {
let userName = githubUrl.split('/');
return (
Expand All @@ -12,11 +11,12 @@ const GitHubContributionCalendar = ({ githubUrl }) => {
<div className="mx-3">
<GitHubCalendar
username={userName[userName.length - 1]}
blockSize={20}
blockSize={15}
blockMargin={3}
fontSize={10}
hideColorLegend={true}
colorScheme="light"/>
colorScheme="light"
/>
</div>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/head/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Head = ({
<meta content={siteDescription} property="og:description" />
<meta content={siteDescription} name="twitter:description" />

<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="yes" name="mobile-web-app-capable" />
<meta
content="black-translucent"
name="apple-mobile-web-app-status-bar-style"
Expand Down
2 changes: 1 addition & 1 deletion src/components/location-filter/location-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const LocationFilter = ({
const onLocationClicked = (location) => {
onLocationChange(location);
search.location = location;
history.pushState(
window.history.pushState(
{ search },
'Location',
'?' + queryString.stringify(search)
Expand Down
6 changes: 4 additions & 2 deletions src/components/profile-description/profile-description.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const ProfileDescription = ({
</div>
</div>
)}

{children}
</div>
<h4 className="mb-0">
Expand All @@ -56,7 +55,10 @@ ProfileDescription.propTypes = {
jobTitle: PropTypes.string.isRequired,
location: PropTypes.string,
qualifications: PropTypes.string,
children: PropTypes.arrayOf(PropTypes.element),
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.element),
PropTypes.element,
]),
isActive: PropTypes.bool,
};

Expand Down
7 changes: 5 additions & 2 deletions src/components/profile-photo/profile-photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ProfilePhoto = ({ profileImage, sketchImage, children }) => {
profileImage={profileImage}
sketchImage={sketchImage}
/>
{children ? children : null}
{children}
</div>
);
};
Expand All @@ -55,7 +55,10 @@ ProfilePhoto.propTypes = {
sketchImage: PropTypes.shape({
src: PropTypes.string.isRequired,
}).isRequired,
children: PropTypes.arrayOf(PropTypes.element),
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.element),
PropTypes.element,
]),
};

export default ProfilePhoto;
2 changes: 1 addition & 1 deletion src/components/profile-utils/profile-photo-utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ProfilePhotoUtils = ({ profile }) => {
<ProfileImageDownload profileImage={profile?.profileImage} />
<CopyProfileInformation
billingRate={+profile.billingRate}
profileImage={profile.profileImage}
profileImage={profile.profileImage?.src}
slug={profile.slug}
fullName={profile.fullName}
/>
Expand Down
Loading

0 comments on commit 3abba53

Please sign in to comment.