Skip to content

Commit f150b1f

Browse files
RoyEJohnsonclaudeCopilot
committed
Lint stuff
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 0175e41 commit f150b1f

6 files changed

Lines changed: 4 additions & 141 deletions

File tree

.stylelintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
} ],
3535
"font-family-no-duplicate-names": true,
3636
"font-family-no-missing-generic-family-keyword": true,
37-
"function-comma-space-after": [ "always", {
37+
"function-comma-space-after": [ "always-single-line", {
3838
"severity": "warning"
3939
} ],
4040
"function-max-empty-lines": 0,

src/app/components/Footer/Footer.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@
3131
*/
3232
@media (min-width: 60.1em) and (max-width: 90em) {
3333
.footer-wrapper--vertical-nav-toolbar {
34-
padding-left: clamp(
35-
0rem,
36-
calc(8rem - (100vw - 128rem) / 2),
37-
8rem
38-
);
34+
padding-left: clamp(0rem, calc(8rem - (100vw - 128rem) / 2), 8rem);
3935
}
4036
}
4137

src/app/components/Footer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const SocialIconMessage: React.FunctionComponent<{
203203
aria-label={`OpenStax on ${useIntl().formatMessage({ id })}`}
204204
href={href}
205205
target='_blank'
206-
rel='noopener'
206+
rel="noopener noreferrer"
207207
>
208208
<Icon />
209209
</a>
@@ -333,7 +333,7 @@ const SocialDirectory = () => (
333333
Icon={IGIcon}
334334
/>
335335
<li>
336-
<a className="footer-bottom-link" href={riceUrl} target='_blank' rel='noopener'>
336+
<a className="footer-bottom-link" href={riceUrl} target='_blank' rel="noopener noreferrer">
337337
<img
338338
className="footer-logo"
339339
src={RiceWhiteLogo}

src/app/components/Footer/styled.tsx

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -31,118 +31,6 @@ export const iconStyles = css`
3131
height: 1em;
3232
`;
3333

34-
interface IconProps extends React.SVGAttributes<SVGSVGElement> {
35-
className?: string;
36-
}
37-
38-
/**
39-
* Facebook icon for social media links.
40-
* SVG path from Font Awesome Free (https://fontawesome.com - MIT License)
41-
*
42-
* Note: Wrapped with styled() to enable styled-components styling
43-
*/
44-
function FacebookIconBase({ className, ...props }: IconProps) {
45-
return (
46-
<svg
47-
className={className}
48-
viewBox="0 0 320 512"
49-
aria-hidden="true"
50-
{...props}
51-
>
52-
<path
53-
fill="currentColor"
54-
d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"
55-
/>
56-
</svg>
57-
);
58-
}
59-
60-
export const FBIcon = styled(FacebookIconBase)`
61-
${iconStyles}
62-
`;
63-
64-
/**
65-
* X (Twitter) icon for social media links.
66-
* SVG path from Font Awesome Free (https://fontawesome.com - MIT License)
67-
*/
68-
function XTwitter() {
69-
return (
70-
<svg
71-
aria-hidden='true'
72-
focusable='false'
73-
data-prefix='fab'
74-
data-icon='x-twitter'
75-
role='img'
76-
xmlns='http://www.w3.org/2000/svg'
77-
viewBox='0 0 512 512'
78-
className='svg-inline--fa fa-x-twitter'
79-
height='1em'
80-
>
81-
<path
82-
fill='currentColor'
83-
d={
84-
'M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5' +
85-
' 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'
86-
}
87-
></path>
88-
</svg>
89-
);
90-
}
91-
92-
export const TwitterIcon = XTwitter;
93-
94-
/**
95-
* Instagram icon for social media links.
96-
* SVG path from Font Awesome Free (https://fontawesome.com - MIT License)
97-
*
98-
* Note: Wrapped with styled() to enable styled-components styling
99-
*/
100-
function InstagramIconBase({ className, ...props }: IconProps) {
101-
return (
102-
<svg
103-
className={className}
104-
viewBox="0 0 448 512"
105-
aria-hidden="true"
106-
{...props}
107-
>
108-
<path
109-
fill="currentColor"
110-
d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"
111-
/>
112-
</svg>
113-
);
114-
}
115-
116-
export const IGIcon = styled(InstagramIconBase)`
117-
${iconStyles}
118-
`;
119-
120-
/**
121-
* LinkedIn icon for social media links.
122-
* SVG path from Font Awesome Free (https://fontawesome.com - MIT License)
123-
*
124-
* Note: Wrapped with styled() to enable styled-components styling
125-
*/
126-
function LinkedInIconBase({ className, ...props }: IconProps) {
127-
return (
128-
<svg
129-
className={className}
130-
viewBox="0 0 448 512"
131-
aria-hidden="true"
132-
{...props}
133-
>
134-
<path
135-
fill="currentColor"
136-
d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"
137-
/>
138-
</svg>
139-
);
140-
}
141-
142-
export const LinkedInIcon = styled(LinkedInIconBase)`
143-
${iconStyles}
144-
`;
145-
14634
const boxedMargin = 1.5;
14735
export const boxed = css`
14836
max-width: ${contentWrapperMaxWidth + boxedMargin * 2}rem;

src/app/components/NavBar/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { FormattedMessage, useIntl } from 'react-intl';
33
import { useSelector } from 'react-redux';
44
import { Dialog, ModalOverlay, Modal } from 'react-aria-components';
55
import { ProfileMenu, ProfileMenuButton, ProfileMenuItem, UserIcon } from '@openstax/ui-components';
6-
import classNames from 'classnames';
76
import Color from 'color';
87
import openstaxLogo from '../../../assets/logo.svg';
98
import * as authSelect from '../../auth/selectors';
@@ -295,7 +294,6 @@ const NavigationBar = ({user, loggedOut, currentPath, hasUnsavedHighlight, param
295294
onClick={(e) => unsavedHighlightsHandler(e, logoUrl)}
296295
>
297296
<img
298-
role='img'
299297
src={openstaxLogo}
300298
alt={intl.formatMessage({id: 'i18n:nav:logo:alt'})}
301299
className="navbar-header-image"

src/app/components/NavBar/styled.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import React from 'react';
21
import styled, { css, keyframes } from 'styled-components/macro';
32
import { ModalOverlay, Modal } from 'react-aria-components';
43
import Color from 'color';
54
import { contentWrapperMaxWidth } from '../../content/components/constants';
65
import { disablePrint } from '../../content/components/utils/disablePrint';
76
import theme from '../../theme';
8-
import Times from '../Times';
97
import { h4DesktopStyle, linkHover, textRegularStyle } from '../Typography';
108
import { defaultFocusOutline } from '../../theme';
119

@@ -186,23 +184,6 @@ export const DropdownOverlay = styled.div`
186184
}
187185
`;
188186

189-
export const TimesIcon = styled((
190-
{ theme: _theme, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & { theme?: unknown }
191-
) =>
192-
<button type="button" aria-label='close menu' {...props}><Times /></button>
193-
)`
194-
cursor: pointer;
195-
border: none;
196-
padding: 0;
197-
background: none;
198-
position: absolute;
199-
height: ${navMobileHeight}rem;
200-
width: ${navMobileHeight}rem;
201-
top: 0;
202-
right: 0;
203-
color: ${theme.color.primary.gray.base};
204-
`;
205-
206187
export const BarWrapper = styled.div`
207188
overflow: visible;
208189
z-index: ${theme.zIndex.navbar}; /* above book nav */

0 commit comments

Comments
 (0)