Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Commit 9e006a3

Browse files
run prettier
1 parent f59f4ad commit 9e006a3

File tree

748 files changed

+7349
-7555
lines changed

Some content is hidden

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

748 files changed

+7349
-7555
lines changed

.prettierignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# built component library
26+
/lib
27+
28+
# built docs
29+
/docs
30+
31+
# Generated component data
32+
/config/componentData.js
33+
34+
# Webstorm
35+
.idea
36+
37+
# secrets (figma access token, etc.)
38+
.env
39+

.prettierrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
trailingComma: 'all',
3+
tabWidth: 2,
4+
semi: false,
5+
singleQuote: true,
6+
bracketSpacing: true,
7+
useTabs: false,
8+
}

config/cachedIconData.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1136,4 +1136,4 @@
11361136
"svgBody": "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<g clip-path=\"url(#clip0_3870_2374)\">\n<path d=\"M13.5682 4.05628C13.8696 4.79195 14.2349 5.61097 14.4188 6.34143C14.5839 6.98931 14.6516 7.65807 14.6197 8.32581C14.5886 8.99281 14.4567 9.65129 14.2284 10.2789C14.0028 10.8976 13.6843 11.4785 13.2838 12.0016C12.8847 12.5188 12.4087 12.9719 11.8722 13.3453C11.6729 13.486 11.4665 13.6164 11.2538 13.736C11.0416 13.8558 10.8241 13.9638 10.6015 14.0602C10.126 14.271 9.62787 14.4265 9.11681 14.5237C8.61532 14.6193 8.10425 14.6551 7.59431 14.6305L7.43644 14.6201L7.07637 15.9586L7.32294 15.9782C7.97311 16.0278 8.62694 15.9967 9.26945 15.8857C9.92138 15.7707 10.557 15.5774 11.1625 15.3102C11.4182 15.1973 11.6717 15.0702 11.9231 14.9287C12.167 14.7907 12.4123 14.6357 12.6563 14.4664C13.9756 13.5501 14.9778 12.2482 15.5252 10.7399C16.0751 9.21915 16.1524 7.56817 15.7469 6.00289C15.486 5.25159 15.2016 4.2594 14.6628 3.50029C14.3066 2.99768 13.2629 3.29586 13.5734 4.05628H13.5682ZM7.30598 5.82581C7.30191 5.73205 7.3169 5.63845 7.35005 5.55063C7.38319 5.46281 7.4338 5.3826 7.49884 5.31482C7.56387 5.24704 7.64197 5.19311 7.72845 5.15626C7.81492 5.11941 7.90798 5.10041 8.002 5.10041C8.09603 5.10041 8.18908 5.11941 8.27556 5.15626C8.36203 5.19311 8.44014 5.24704 8.50517 5.31482C8.5702 5.3826 8.62081 5.46281 8.65396 5.55063C8.6871 5.63845 8.70209 5.73205 8.69802 5.82581V7.30498H10.1762C10.3609 7.30498 10.5381 7.37823 10.6688 7.50863C10.7994 7.63902 10.8728 7.81588 10.8728 8.00029C10.8728 8.1847 10.7994 8.36155 10.6688 8.49195C10.5381 8.62235 10.3609 8.6956 10.1762 8.6956H8.69672V10.1748C8.70079 10.2685 8.6858 10.3621 8.65265 10.4499C8.61951 10.5378 8.5689 10.618 8.50387 10.6858C8.43883 10.7535 8.36073 10.8075 8.27425 10.8443C8.18778 10.8812 8.09472 10.9002 8.0007 10.9002C7.90667 10.9002 7.81362 10.8812 7.72714 10.8443C7.64067 10.8075 7.56256 10.7535 7.49753 10.6858C7.4325 10.618 7.38189 10.5378 7.34874 10.4499C7.3156 10.3621 7.30061 10.2685 7.30468 10.1748V8.6956H5.82131C5.63654 8.6956 5.45934 8.62235 5.32869 8.49195C5.19804 8.36155 5.12464 8.1847 5.12464 8.00029C5.12464 7.81588 5.19804 7.63902 5.32869 7.50863C5.45934 7.37823 5.63654 7.30498 5.82131 7.30498H7.30598V5.82581ZM3.16378 14.3701C3.62634 14.7289 4.12786 15.0346 4.65888 15.2815L4.87937 15.3844L5.23814 14.0498L5.08811 13.9782C4.70147 13.7862 4.33519 13.5559 3.99483 13.2907C3.65023 13.022 3.33337 12.7198 3.04897 12.3883L2.93808 12.2581L1.74173 12.9469L1.89568 13.1331C2.27125 13.5902 2.69656 14.0042 3.16378 14.3675V14.3701ZM0.0744102 9.05367C0.157648 9.63916 0.307789 10.2132 0.521899 10.7646L0.6067 10.9886L1.80305 10.2998L1.74564 10.1383C1.59853 9.72813 1.49362 9.30407 1.43253 8.87268C1.37173 8.44146 1.35556 8.00513 1.38426 7.5706L1.39339 7.40263L0.0535361 7.05107L0.0313574 7.29195C-0.0222568 7.87889 -0.00781024 8.47004 0.0744102 9.05367ZM1.09333 4.03675C0.973301 4.23857 0.865017 4.44169 0.765865 4.64873L0.66019 4.87008L1.99744 5.22815L2.07311 5.07841C2.14877 4.93128 2.22836 4.78805 2.31185 4.65003C2.39535 4.51201 2.48798 4.37268 2.58583 4.23727C2.74437 4.01479 2.91419 3.80053 3.09463 3.59534C3.26974 3.39438 3.45617 3.20353 3.65301 3.02373L3.77434 2.91305L3.08159 1.71383L2.89372 1.87659C2.62941 2.10647 2.37933 2.35214 2.14486 2.61227C1.90527 2.87758 1.68095 3.15624 1.47298 3.4469C1.33599 3.63961 1.21205 3.83753 1.09202 4.03284L1.09333 4.03675ZM6.58061 0.101851C6.12779 0.177558 5.68343 0.297044 5.2538 0.458622L5.02679 0.543257L5.71825 1.73857L5.87741 1.68258C6.53596 1.45488 7.23028 1.3477 7.92699 1.36617C8.08485 1.36617 8.25054 1.3805 8.42144 1.40003C8.59235 1.41956 8.7489 1.443 8.90937 1.47555C9.06984 1.5081 9.24205 1.54847 9.40513 1.59664C9.56821 1.64482 9.73129 1.70081 9.89959 1.76591C9.98351 1.79947 10.0733 1.81609 10.1637 1.81479C10.2541 1.8135 10.3433 1.79432 10.4262 1.75836C10.5092 1.72241 10.5841 1.6704 10.6468 1.60534C10.7094 1.54027 10.7585 1.46346 10.7912 1.37933C10.8239 1.2952 10.8396 1.20544 10.8373 1.11524C10.835 1.02503 10.8148 0.936177 10.7778 0.853818C10.7409 0.771458 10.688 0.697229 10.6221 0.635428C10.5562 0.573627 10.4787 0.525481 10.394 0.493778C10.1957 0.416955 9.99222 0.347944 9.78478 0.286747C9.57735 0.225549 9.37774 0.177371 9.17813 0.137007C8.97852 0.0966423 8.77761 0.0653923 8.5793 0.0432569C8.381 0.0211215 8.17095 0.00679855 7.9583 0.000288129C7.49688 -0.00946483 7.03558 0.024542 6.58061 0.101851Z\" fill=\"#3D3D3D\"/>\n</g>\n<defs>\n<clipPath id=\"clip0_3870_2374\">\n<rect width=\"16\" height=\"16\" fill=\"white\"/>\n</clipPath>\n</defs>\n</svg>\n"
11371137
}
11381138
}
1139-
}
1139+
}

config/documentsData.js

+62-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,62 @@
1-
module.exports = [{"id":"getting-started","fileName":"GettingStarted","name":"Getting Started","parentName":"GettingStarted","level":0,"children":[{"id":"c-h-a-n-g-e-l-o-g","fileName":"CHANGELOG","name":"C H A N G E L O G","level":1,"parentName":"GettingStarted"},{"id":"component-status","fileName":"ComponentStatus","name":"Component Status","level":1,"parentName":"GettingStarted"},{"id":"contributing","fileName":"Contributing","name":"Contributing","level":1,"parentName":"GettingStarted"},{"id":"getting-started","fileName":"GettingStarted","name":"Getting Started","level":1,"parentName":"GettingStarted"},{"id":"new-component-checklist","fileName":"NewComponentChecklist","name":"New Component Checklist","level":1,"parentName":"GettingStarted"}]},{"id":"guides","fileName":"Guides","name":"Guides","parentName":"Guides","level":0,"children":[{"id":"guides","fileName":"Guides","name":"Guides","level":1,"parentName":"Guides"}]}]
1+
module.exports = [
2+
{
3+
id: 'getting-started',
4+
fileName: 'GettingStarted',
5+
name: 'Getting Started',
6+
parentName: 'GettingStarted',
7+
level: 0,
8+
children: [
9+
{
10+
id: 'c-h-a-n-g-e-l-o-g',
11+
fileName: 'CHANGELOG',
12+
name: 'C H A N G E L O G',
13+
level: 1,
14+
parentName: 'GettingStarted',
15+
},
16+
{
17+
id: 'component-status',
18+
fileName: 'ComponentStatus',
19+
name: 'Component Status',
20+
level: 1,
21+
parentName: 'GettingStarted',
22+
},
23+
{
24+
id: 'contributing',
25+
fileName: 'Contributing',
26+
name: 'Contributing',
27+
level: 1,
28+
parentName: 'GettingStarted',
29+
},
30+
{
31+
id: 'getting-started',
32+
fileName: 'GettingStarted',
33+
name: 'Getting Started',
34+
level: 1,
35+
parentName: 'GettingStarted',
36+
},
37+
{
38+
id: 'new-component-checklist',
39+
fileName: 'NewComponentChecklist',
40+
name: 'New Component Checklist',
41+
level: 1,
42+
parentName: 'GettingStarted',
43+
},
44+
],
45+
},
46+
{
47+
id: 'guides',
48+
fileName: 'Guides',
49+
name: 'Guides',
50+
parentName: 'Guides',
51+
level: 0,
52+
children: [
53+
{
54+
id: 'guides',
55+
fileName: 'Guides',
56+
name: 'Guides',
57+
level: 1,
58+
parentName: 'Guides',
59+
},
60+
],
61+
},
62+
]

config/env.js

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
'use strict';
1+
'use strict'
22

3-
const fs = require('fs');
4-
const path = require('path');
5-
const paths = require('./paths');
3+
const fs = require('fs')
4+
const path = require('path')
5+
const paths = require('./paths')
66

77
// Make sure that including paths.js after env.js will read .env variables.
8-
delete require.cache[require.resolve('./paths')];
8+
delete require.cache[require.resolve('./paths')]
99

10-
const NODE_ENV = process.env.NODE_ENV;
10+
const NODE_ENV = process.env.NODE_ENV
1111
if (!NODE_ENV) {
1212
throw new Error(
13-
'The NODE_ENV environment variable is required but was not specified.'
14-
);
13+
'The NODE_ENV environment variable is required but was not specified.',
14+
)
1515
}
1616

1717
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
@@ -23,22 +23,22 @@ let dotenvFiles = [
2323
// results for everyone
2424
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
2525
paths.dotenv,
26-
].filter(Boolean);
26+
].filter(Boolean)
2727

2828
// Load environment variables from .env* files. Suppress warnings using silent
2929
// if this file is missing. dotenv will never modify any environment variables
3030
// that have already been set. Variable expansion is supported in .env files.
3131
// https://github.com/motdotla/dotenv
3232
// https://github.com/motdotla/dotenv-expand
33-
dotenvFiles.forEach(dotenvFile => {
33+
dotenvFiles.forEach((dotenvFile) => {
3434
if (fs.existsSync(dotenvFile)) {
3535
require('dotenv-expand')(
3636
require('dotenv').config({
3737
path: dotenvFile,
38-
})
39-
);
38+
}),
39+
)
4040
}
41-
});
41+
})
4242

4343
// We support resolving modules according to `NODE_PATH`.
4444
// This lets you use absolute paths in imports inside large monorepos:
@@ -49,24 +49,24 @@ dotenvFiles.forEach(dotenvFile => {
4949
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
5050
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
5151
// We also resolve them to make sure all tools using them work consistently.
52-
const appDirectory = fs.realpathSync(process.cwd());
52+
const appDirectory = fs.realpathSync(process.cwd())
5353
process.env.NODE_PATH = (process.env.NODE_PATH || '')
5454
.split(path.delimiter)
55-
.filter(folder => folder && !path.isAbsolute(folder))
56-
.map(folder => path.resolve(appDirectory, folder))
57-
.join(path.delimiter);
55+
.filter((folder) => folder && !path.isAbsolute(folder))
56+
.map((folder) => path.resolve(appDirectory, folder))
57+
.join(path.delimiter)
5858

5959
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
6060
// injected into the application via DefinePlugin in Webpack configuration.
61-
const REACT_APP = /^REACT_APP_/i;
61+
const REACT_APP = /^REACT_APP_/i
6262

6363
function getClientEnvironment(publicUrl) {
6464
const raw = Object.keys(process.env)
65-
.filter(key => REACT_APP.test(key))
65+
.filter((key) => REACT_APP.test(key))
6666
.reduce(
6767
(env, key) => {
68-
env[key] = process.env[key];
69-
return env;
68+
env[key] = process.env[key]
69+
return env
7070
},
7171
{
7272
// Useful for determining whether we’re running in production mode.
@@ -77,17 +77,17 @@ function getClientEnvironment(publicUrl) {
7777
// This should only be used as an escape hatch. Normally you would put
7878
// images into the `src` and `import` them in code to get their paths.
7979
PUBLIC_URL: publicUrl,
80-
}
81-
);
80+
},
81+
)
8282
// Stringify all values so we can feed into Webpack DefinePlugin
8383
const stringified = {
8484
'process.env': Object.keys(raw).reduce((env, key) => {
85-
env[key] = JSON.stringify(raw[key]);
86-
return env;
85+
env[key] = JSON.stringify(raw[key])
86+
return env
8787
}, {}),
88-
};
88+
}
8989

90-
return { raw, stringified };
90+
return { raw, stringified }
9191
}
9292

93-
module.exports = getClientEnvironment;
93+
module.exports = getClientEnvironment

config/jest/cssTransform.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'use strict';
1+
'use strict'
22

33
// This is a custom Jest transformer turning style imports into empty objects.
44
// http://facebook.github.io/jest/docs/en/webpack.html
55

66
module.exports = {
77
process() {
8-
return 'module.exports = {};';
8+
return 'module.exports = {};'
99
},
10-
};
10+
}

config/jest/fileTransform.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
'use strict';
1+
'use strict'
22

3-
const path = require('path');
3+
const path = require('path')
44

55
// This is a custom Jest transformer turning file imports into filenames.
66
// http://facebook.github.io/jest/docs/en/webpack.html
77

88
module.exports = {
99
process(src, filename) {
10-
const assetFilename = JSON.stringify(path.basename(filename));
10+
const assetFilename = JSON.stringify(path.basename(filename))
1111

1212
if (filename.match(/\.svg$/)) {
1313
return `module.exports = {
@@ -22,9 +22,9 @@ module.exports = {
2222
children: ${assetFilename}
2323
})
2424
}),
25-
};`;
25+
};`
2626
}
2727

28-
return `module.exports = ${assetFilename};`;
28+
return `module.exports = ${assetFilename};`
2929
},
30-
};
30+
}

config/paths.js

+25-27
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
'use strict';
1+
'use strict'
22

3-
const path = require('path');
4-
const fs = require('fs');
5-
const url = require('url');
3+
const path = require('path')
4+
const fs = require('fs')
5+
const url = require('url')
66

77
// Make sure any symlinks in the project folder are resolved:
88
// https://github.com/facebook/create-react-app/issues/637
9-
const appDirectory = fs.realpathSync(process.cwd());
10-
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
9+
const appDirectory = fs.realpathSync(process.cwd())
10+
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath)
1111

12-
const envPublicUrl = process.env.PUBLIC_URL;
12+
const envPublicUrl = process.env.PUBLIC_URL
1313

1414
function ensureSlash(inputPath, needsSlash) {
15-
const hasSlash = inputPath.endsWith('/');
15+
const hasSlash = inputPath.endsWith('/')
1616
if (hasSlash && !needsSlash) {
17-
return inputPath.substr(0, inputPath.length - 1);
17+
return inputPath.substr(0, inputPath.length - 1)
1818
} else if (!hasSlash && needsSlash) {
19-
return `${inputPath}/`;
19+
return `${inputPath}/`
2020
} else {
21-
return inputPath;
21+
return inputPath
2222
}
2323
}
2424

25-
const getPublicUrl = appPackageJson =>
26-
envPublicUrl || require(appPackageJson).homepage;
25+
const getPublicUrl = (appPackageJson) =>
26+
envPublicUrl || require(appPackageJson).homepage
2727

2828
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
2929
// "public path" at which the app is served.
@@ -32,10 +32,10 @@ const getPublicUrl = appPackageJson =>
3232
// We can't use a relative path in HTML because we don't want to load something
3333
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
3434
function getServedPath(appPackageJson) {
35-
const publicUrl = getPublicUrl(appPackageJson);
35+
const publicUrl = getPublicUrl(appPackageJson)
3636
const servedUrl =
37-
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
38-
return ensureSlash(servedUrl, true);
37+
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/')
38+
return ensureSlash(servedUrl, true)
3939
}
4040

4141
const moduleFileExtensions = [
@@ -50,20 +50,20 @@ const moduleFileExtensions = [
5050
'json',
5151
'web.jsx',
5252
'jsx',
53-
];
53+
]
5454

5555
// Resolve file paths in the same order as webpack
5656
const resolveModule = (resolveFn, filePath) => {
57-
const extension = moduleFileExtensions.find(extension =>
58-
fs.existsSync(resolveFn(`${filePath}.${extension}`))
59-
);
57+
const extension = moduleFileExtensions.find((extension) =>
58+
fs.existsSync(resolveFn(`${filePath}.${extension}`)),
59+
)
6060

6161
if (extension) {
62-
return resolveFn(`${filePath}.${extension}`);
62+
return resolveFn(`${filePath}.${extension}`)
6363
}
6464

65-
return resolveFn(`${filePath}.js`);
66-
};
65+
return resolveFn(`${filePath}.js`)
66+
}
6767

6868
// config after eject: we're in ./config/
6969
module.exports = {
@@ -82,8 +82,6 @@ module.exports = {
8282
appNodeModules: resolveApp('node_modules'),
8383
publicUrl: getPublicUrl(resolveApp('package.json')),
8484
servedPath: getServedPath(resolveApp('package.json')),
85-
};
86-
87-
85+
}
8886

89-
module.exports.moduleFileExtensions = moduleFileExtensions;
87+
module.exports.moduleFileExtensions = moduleFileExtensions

0 commit comments

Comments
 (0)