Skip to content

Commit 32d042c

Browse files
[core] Simplify career (#39112)
1 parent baae379 commit 32d042c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+154
-41
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ module.exports = {
119119
'material-ui/docgen-ignore-before-comment': 'error',
120120
'material-ui/rules-of-use-theme-variants': 'error',
121121
'material-ui/no-empty-box': 'error',
122+
'material-ui/straight-quotes': 'error',
122123

123124
'react-hooks/exhaustive-deps': ['error', { additionalHooks: 'useEnhancedEffect' }],
124125
'react-hooks/rules-of-hooks': 'error',

crowdin.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ files:
1010
- /docs/src/pages/discover-more/backers/*
1111
- /docs/src/pages/discover-more/roadmap/*
1212
- /docs/src/pages/company/**/*
13-
- /docs/src/pages/careers/**/*
13+
- /docs/pages/careers/**/*
1414
translation: /%original_path%/%file_name%-%two_letters_code%.%file_extension%
1515
- source: /docs/data/**/*.md
1616
ignore:

docs/data/joy/components/card/CardUsage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function CardUsage() {
6363
Yosemite - Your Next Adventure
6464
</Typography>
6565
<Typography>
66-
Yosemite National Park is in Californias Sierra Nevada mountains.
66+
{"Yosemite National Park is in California's Sierra Nevada mountains."}
6767
</Typography>
6868
<CardActions>
6969
<Button variant="outlined" size="sm">

docs/data/joy/getting-started/templates/messages/data.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ export const chats: ChatProps[] = [
8383
{
8484
id: '6',
8585
content:
86-
'Thanks Olivia! Almost there. Ill work on making those changes you suggested and will shoot it over.',
86+
"Thanks Olivia! Almost there. I'll work on making those changes you suggested and will shoot it over.",
8787
timestamp: 'Thursday 10:16am',
8888
sender: users[0],
8989
},
9090
{
9191
id: '7',
9292
content:
93-
'Hey Olivia, Ive finished with the requirements doc! I made some notes in the gdoc as well for Phoenix to look over.',
93+
"Hey Olivia, I've finished with the requirements doc! I made some notes in the gdoc as well for Phoenix to look over.",
9494
timestamp: 'Thursday 11:40am',
9595
sender: users[0],
9696
},
@@ -109,13 +109,13 @@ export const chats: ChatProps[] = [
109109
id: '8',
110110
timestamp: 'Thursday 11:41am',
111111
sender: 'You',
112-
content: 'Awesome! Thanks. Ill look at this today.',
112+
content: "Awesome! Thanks. I'll look at this today.",
113113
},
114114
{
115115
id: '9',
116116
timestamp: 'Thursday 11:44am',
117117
sender: users[0],
118-
content: 'No rush though — we still have to wait for Lanas designs.',
118+
content: "No rush though — we still have to wait for Lana's designs.",
119119
},
120120
{
121121
id: '10',
@@ -127,7 +127,7 @@ export const chats: ChatProps[] = [
127127
id: '11',
128128
timestamp: 'Just now',
129129
sender: 'You',
130-
content: 'Sure thing, Ill have a look today. Theyre looking great!',
130+
content: "Sure thing, I'll have a look today. They're looking great!",
131131
},
132132
],
133133
},
@@ -262,7 +262,7 @@ export const chats: ChatProps[] = [
262262
{
263263
id: '1',
264264
content:
265-
'Hey Olivia, Ive finished with the requirements doc! I made some notes in the gdoc as well for Phoenix to look over.',
265+
"Hey Olivia, I've finished with the requirements doc! I made some notes in the gdoc as well for Phoenix to look over.",
266266
timestamp: '5 mins ago',
267267
sender: users[6],
268268
unread: true,

docs/nextConfigDocsInfra.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function withDocsInfra(nextConfig) {
4646
DEPLOY_ENV,
4747
...nextConfig.env,
4848
// https://docs.netlify.com/configure-builds/environment-variables/#git-metadata
49-
// reference ID (also known as SHA or hash) of the commit were building.
49+
// reference ID (also known as "SHA" or "hash") of the commit we're building.
5050
COMMIT_REF: process.env.COMMIT_REF,
5151
// ID of the PR and the Deploy Preview it generated (for example, 1211)
5252
PULL_REQUEST_ID: process.env.REVIEW_ID,

docs/pages/careers/accessibility-engineer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/accessibility-engineer.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/accessibility-engineer.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/design-engineer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/design-engineer.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/design-engineer.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/fullstack-engineer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/full-stack-engineer.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/full-stack-engineer.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/product-engineer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/product-engineer.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/product-engineer.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/product-marketing-manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/product-marketing-manager.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/product-marketing-manager.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/react-community-engineer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/react-community-engineer.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/react-community-engineer.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/react-engineer-core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/react-engineer-core.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/react-engineer-core.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/react-engineer-x.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/react-engineer-x.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/react-engineer-x.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/react-tech-lead-core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/react-tech-lead-core.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/react-tech-lead-core.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/react-tech-lead-x-grid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/react-tech-lead-x-grid.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/react-tech-lead-x-grid.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/pages/careers/technical-recruiter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import TopLayoutCareers from 'docs/src/modules/components/TopLayoutCareers';
3-
import * as pageProps from 'docs/src/pages/careers/technical-recruiter.md?@mui/markdown';
3+
import * as pageProps from 'docs/pages/careers/technical-recruiter.md?@mui/markdown';
44

55
export default function Page() {
66
return <TopLayoutCareers {...pageProps} />;

docs/src/components/about/OurValues.tsx

+16-14
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ import SectionHeadline from 'docs/src/components/typography/SectionHeadline';
1414
const values = [
1515
{
1616
title: 'Put community first 💙',
17-
description: 'We never lose sight of who were serving and why.',
17+
description: "We never lose sight of who we're serving and why.",
1818
lightIcon: 'url(/static/branding/about/illustrations/community-light.svg)',
1919
darkIcon: 'url(/static/branding/about/illustrations/community-dark.svg)',
2020
width: 92,
2121
height: 84,
2222
},
2323
{
2424
title: 'Avoid bureaucracy 🚫',
25-
description: 'We’re so not corporate — and we like it that way.',
25+
description: 'Were so not corporate — and we like it that way.',
2626
lightIcon: 'url(/static/branding/about/illustrations/bureaucracy-light.svg)',
2727
darkIcon: 'url(/static/branding/about/illustrations/bureaucracy-dark.svg)',
2828
width: 81,
2929
height: 94,
3030
},
3131
{
32-
title: 'Chase better 🌱',
33-
description: 'We’re driven by an unending desire to improve.',
32+
title: 'Chase "better" 🌱',
33+
description: "We're driven by an unending desire to improve.",
3434
lightIcon: 'url(/static/branding/about/illustrations/better-light.svg)',
3535
darkIcon: 'url(/static/branding/about/illustrations/better-dark.svg)',
3636
width: 89,
@@ -95,16 +95,18 @@ export default function OurValues() {
9595
}),
9696
})}
9797
>
98-
<Box
99-
sx={(theme) => ({
100-
background: `${lightIcon}`,
101-
...theme.applyDarkStyles({
102-
background: `${darkIcon}`,
103-
}),
104-
})}
105-
width={width}
106-
height={height}
107-
/>
98+
<Box sx={{ height: 94 }}>
99+
<Box
100+
sx={(theme) => ({
101+
background: `${lightIcon}`,
102+
...theme.applyDarkStyles({
103+
background: `${darkIcon}`,
104+
}),
105+
})}
106+
width={width}
107+
height={height}
108+
/>
109+
</Box>
108110
<Box sx={{ flexGrow: 1 }}>
109111
<Typography
110112
fontWeight="bold"

docs/src/components/icon/IconImage.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export type IconImageProps = {
3434
| 'companies/patreon'
3535
| 'companies/ebay'
3636
| 'companies/samsung'
37-
| 'companies/volvo';
37+
| 'companies/volvo'
38+
| string;
3839
height?: number;
3940
mode?: '' | 'light' | 'dark';
4041
sx?: SxProps<Theme>;
@@ -50,10 +51,8 @@ export default function IconImage(props: IconImageProps) {
5051
const theme = useTheme();
5152
const [firstRender, setFirstRender] = React.useState(true);
5253
React.useEffect(() => {
53-
if (neverHydrated) {
54-
setFirstRender(false);
55-
neverHydrated = false;
56-
}
54+
setFirstRender(false);
55+
neverHydrated = false;
5756
}, []);
5857
let defaultWidth;
5958
let defaultHeight;

docs/src/components/productBaseUI/BaseUIComponents.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default function BaseUIComponents() {
8484
<br /> <GradientText>CSS adventure</GradientText>
8585
</Typography>
8686
}
87-
description="Base UIs skeletal components give you a sturdy foundation to apply custom styles with ease. With no defaults to override, youre free to start from scratch using vanilla CSS, Tailwind CSS, MUI System, or any other framework you prefer."
87+
description="Base UI's skeletal components give you a sturdy foundation to apply custom styles with ease. With no defaults to override, you're free to start from scratch using vanilla CSS, Tailwind CSS, MUI System, or any other framework you prefer."
8888
/>
8989
</Box>
9090
<Group desktopColumns={2} sx={{ m: -2, p: 2 }}>

docs/src/components/productBaseUI/BaseUITestimonial.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable material-ui/straight-quotes */
12
import * as React from 'react';
23
import Avatar from '@mui/material/Avatar';
34
import Box from '@mui/material/Box';

packages/eslint-plugin-material-ui/src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ module.exports.rules = {
66
'no-hardcoded-labels': require('./rules/no-hardcoded-labels'),
77
'rules-of-use-theme-variants': require('./rules/rules-of-use-theme-variants'),
88
'no-empty-box': require('./rules/no-empty-box'),
9+
'straight-quotes': require('./rules/straight-quotes'),
910
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// eslint-disable-next-line material-ui/straight-quotes
2+
const nonStraightQuotes = /[]/gm;
3+
4+
/**
5+
* @type {import('eslint').Rule.RuleModule}
6+
*/
7+
const rule = {
8+
meta: {
9+
docs: {
10+
description:
11+
'Only allow straight quotes. Curly quotes can still be used but in specific context where relevant.',
12+
},
13+
messages: {
14+
wrongQuotes:
15+
'Only allow straight quotes. Curly quotes can still be used but in specific context where relevant.',
16+
},
17+
// fixable: 'code', TODO
18+
type: 'suggestion',
19+
schema: [],
20+
},
21+
create(context) {
22+
return {
23+
Program(node) {
24+
const value = context.sourceCode.text;
25+
let match;
26+
27+
// eslint-disable-next-line no-cond-assign
28+
while ((match = nonStraightQuotes.exec(value)) !== null) {
29+
context.report({
30+
node,
31+
loc: {
32+
start: context.sourceCode.getLocFromIndex(match.index),
33+
end: context.sourceCode.getLocFromIndex(match.index + 1),
34+
},
35+
messageId: 'wrongQuotes',
36+
});
37+
}
38+
},
39+
};
40+
},
41+
};
42+
43+
module.exports = rule;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* eslint-disable material-ui/straight-quotes */
2+
const eslint = require('eslint');
3+
const rule = require('./straight-quotes');
4+
5+
const ruleTester = new eslint.RuleTester({ parser: require.resolve('@typescript-eslint/parser') });
6+
7+
ruleTester.run('straight-quotes', rule, {
8+
valid: [
9+
`
10+
const values = [
11+
{
12+
title: 'Put community first 💙',
13+
},
14+
];
15+
`,
16+
],
17+
invalid: [
18+
{
19+
code: `
20+
const values = [
21+
{
22+
title: 'Put community first 💙',
23+
description: 'We never lose sight of who we’re serving and why.',
24+
},
25+
];
26+
`,
27+
errors: [
28+
{
29+
messageId: 'wrongQuotes',
30+
line: 5,
31+
},
32+
],
33+
},
34+
{
35+
code: `
36+
// reference ID (also known as “SHA” or “hash”) of the commit we're building.
37+
const values = 'foo';
38+
`,
39+
errors: [
40+
{
41+
line: 2,
42+
column: 32,
43+
messageId: 'wrongQuotes',
44+
},
45+
{
46+
line: 2,
47+
column: 36,
48+
messageId: 'wrongQuotes',
49+
},
50+
{
51+
line: 2,
52+
column: 41,
53+
messageId: 'wrongQuotes',
54+
},
55+
{
56+
line: 2,
57+
column: 46,
58+
messageId: 'wrongQuotes',
59+
},
60+
],
61+
},
62+
],
63+
});

packages/markdownlint-rule-mui/straight-quotes.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// eslint-disable-next-line material-ui/straight-quotes
2+
const nonStraightQuotes = /[]/;
3+
14
module.exports = {
25
names: ['straightQuotes'],
36
description: 'Only allow straight quotes.',
@@ -9,7 +12,7 @@ module.exports = {
912
// closing single quote: \xE2\x80\x99
1013
// opening double quote: \xE2\x80\x9C
1114
// closing double quote: \xE2\x80\x9D
12-
if (line.match('[‘’“”]')) {
15+
if (nonStraightQuotes.test(line)) {
1316
onError({
1417
lineNumber: lineNumber + 1,
1518
detail: `For line: ${line}`,

0 commit comments

Comments
 (0)