Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 90dcc38

Browse files
chore(prettier): add prettier config based on main repo config
1 parent efaa45e commit 90dcc38

File tree

7 files changed

+146
-133
lines changed

7 files changed

+146
-133
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
.next
4+
build

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "next",
2+
"extends": ["next", "prettier"],
33
"rules": {
44
"react/react-in-jsx-scope": "off",
55
"react/display-name": "off",

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
.next
4+
build

.prettierrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"bracketSpacing": true,
3+
"jsxSingleQuote": false,
4+
"printWidth": 80,
5+
"proseWrap": "always",
6+
"semi": false,
7+
"singleQuote": false,
8+
"tabWidth": 2,
9+
"trailingComma": "all"
10+
}

next.config.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const locales = require('./i18n/locales');
2-
const withPlugins = require('next-compose-plugins');
3-
const withBundleAnalyzer = require('@next/bundle-analyzer')({
4-
enabled: process.env.ANALYZE === 'true',
5-
});
1+
const locales = require("./i18n/locales")
2+
const withPlugins = require("next-compose-plugins")
3+
const withBundleAnalyzer = require("@next/bundle-analyzer")({
4+
enabled: process.env.ANALYZE === "true",
5+
})
66

77
const defaultConfig = {
88
experimental: {
@@ -14,10 +14,10 @@ const defaultConfig = {
1414
defaultLocale: locales.defaultLocale,
1515
},
1616
swcMinify: true,
17-
redirects: require('./next-redirect'),
17+
redirects: require("./next-redirect"),
1818
experimental: {
1919
esmExternals: false,
2020
},
21-
};
21+
}
2222

23-
module.exports = withPlugins([withBundleAnalyzer], defaultConfig);
23+
module.exports = withPlugins([withBundleAnalyzer], defaultConfig)

package.json

+94-91
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,95 @@
11
{
2-
"name": "@chakra-ui/docs",
3-
"version": "2.1.2",
4-
"private": true,
5-
"scripts": {
6-
"dev": "next",
7-
"build": "next build",
8-
"lint": "next lint",
9-
"gen:theme-typings": "chakra-cli tokens theme.ts",
10-
"avatars:gen": "ts-node scripts/avatars.ts",
11-
"members:gen": "ts-node scripts/all-members.ts",
12-
"start": "next start",
13-
"test": "jest",
14-
"clean": "rimraf .next .mdx-data",
15-
"analyze": "ANALYZE=true next build"
16-
},
17-
"dependencies": {
18-
"@chakra-ui/cli": "1.5.3",
19-
"@chakra-ui/icons": "^1.0.17",
20-
"@chakra-ui/props-docs": "1.0.37",
21-
"@chakra-ui/react": "1.6.12",
22-
"@chakra-ui/skip-nav": "^1.1.13",
23-
"@chakra-ui/theme-tools": "1.2.3",
24-
"@chakra-ui/utils": "1.8.4",
25-
"@docsearch/react": "^1.0.0-alpha.27",
26-
"@docusaurus/utils": "^2.0.0-alpha.69",
27-
"@emotion/jest": "11.1.0",
28-
"@emotion/react": "^11.1.4",
29-
"@emotion/styled": "^11.0.0",
30-
"@mdx-js/react": "^1.6.22",
31-
"@octokit/rest": "^18.0.12",
32-
"country-flag-icons": "^1.4.11",
33-
"date-fns": "^2.16.1",
34-
"docsearch.js": "^2.6.3",
35-
"dotenv-cli": "^4.0.0",
36-
"execa": "^5.1.1",
37-
"focus-visible": "5.2.0",
38-
"formik": "^2.2.9",
39-
"framer-motion": "^4.1.17",
40-
"github-slugger": "^1.3.0",
41-
"gray-matter": "^4.0.3",
42-
"highlight-words-core": "^1.2.2",
43-
"i18next": "^21.3.2",
44-
"i18next-browser-languagedetector": "^6.1.2",
45-
"i18next-resources-to-backend": "^1.0.0",
46-
"lodash": "^4.17.21",
47-
"match-sorter": "^6.1.0",
48-
"next": "^12.0.1",
49-
"next-mdx-enhanced": "^5.0.0",
50-
"next-mdx-remote": "^3.0.4",
51-
"next-seo": "^4.17.0",
52-
"prism-react-renderer": "^1.1.1",
53-
"react": "^17.0.1",
54-
"react-dom": "^17.0.1",
55-
"react-focus-lock": "^2.5.2",
56-
"react-i18next": "^11.12.0",
57-
"react-icons": "^4.1.0",
58-
"react-live": "^2.2.3",
59-
"react-lorem-component": "^0.13.0",
60-
"react-multi-ref": "1.0.0",
61-
"react-player": "^2.9.0",
62-
"react-spinners": "^0.11.0",
63-
"react-table": "^7.7.0",
64-
"remark": "^14.0.1",
65-
"remark-autolink-headings": "^7.0.1",
66-
"remark-emoji": "^3.0.1",
67-
"remark-images": "^3.0.0",
68-
"remark-mdx": "^1.6.22",
69-
"remark-slug": "^7.0.1",
70-
"remark-toc": "^8.0.1",
71-
"remark-unwrap-images": "^3.0.0",
72-
"scroll-into-view-if-needed": "^2.2.26",
73-
"shelljs": "^0.8.4",
74-
"superjson": "^1.7.4",
75-
"typescript": "^4.1.3"
76-
},
77-
"devDependencies": {
78-
"@next/bundle-analyzer": "^10.0.5",
79-
"@types/github-slugger": "^1.3.0",
80-
"@types/node": "^14.14.19",
81-
"@types/react": "^17.0.0",
82-
"@types/react-dom": "^17.0.0",
83-
"@types/sharp": "^0.26.1",
84-
"babel-plugin-superjson-next": "^0.3.0",
85-
"eslint": "<8.0.0",
86-
"eslint-config-next": "^12.0.1",
87-
"imagemin": "7.0.1",
88-
"imagemin-jpegtran": "7.0.0",
89-
"next-compose-plugins": "^2.2.1",
90-
"ts-node": "9.1.1"
91-
}
92-
}
2+
"name": "@chakra-ui/docs",
3+
"version": "2.1.2",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next",
7+
"build": "next build",
8+
"lint": "next lint",
9+
"gen:theme-typings": "chakra-cli tokens theme.ts",
10+
"avatars:gen": "ts-node scripts/avatars.ts",
11+
"members:gen": "ts-node scripts/all-members.ts",
12+
"start": "next start",
13+
"test": "jest",
14+
"clean": "rimraf .next .mdx-data",
15+
"analyze": "ANALYZE=true next build"
16+
},
17+
"dependencies": {
18+
"@chakra-ui/cli": "1.5.3",
19+
"@chakra-ui/icons": "^1.0.17",
20+
"@chakra-ui/props-docs": "1.0.37",
21+
"@chakra-ui/react": "1.6.12",
22+
"@chakra-ui/skip-nav": "^1.1.13",
23+
"@chakra-ui/theme-tools": "1.2.3",
24+
"@chakra-ui/utils": "1.8.4",
25+
"@docsearch/react": "^1.0.0-alpha.27",
26+
"@docusaurus/utils": "^2.0.0-alpha.69",
27+
"@emotion/jest": "11.1.0",
28+
"@emotion/react": "^11.1.4",
29+
"@emotion/styled": "^11.0.0",
30+
"@mdx-js/react": "^1.6.22",
31+
"@octokit/rest": "^18.0.12",
32+
"country-flag-icons": "^1.4.11",
33+
"date-fns": "^2.16.1",
34+
"docsearch.js": "^2.6.3",
35+
"dotenv-cli": "^4.0.0",
36+
"execa": "^5.1.1",
37+
"focus-visible": "5.2.0",
38+
"formik": "^2.2.9",
39+
"framer-motion": "^4.1.17",
40+
"github-slugger": "^1.3.0",
41+
"gray-matter": "^4.0.3",
42+
"highlight-words-core": "^1.2.2",
43+
"i18next": "^21.3.2",
44+
"i18next-browser-languagedetector": "^6.1.2",
45+
"i18next-resources-to-backend": "^1.0.0",
46+
"lodash": "^4.17.21",
47+
"match-sorter": "^6.1.0",
48+
"next": "^12.0.1",
49+
"next-mdx-enhanced": "^5.0.0",
50+
"next-mdx-remote": "^3.0.4",
51+
"next-seo": "^4.17.0",
52+
"prism-react-renderer": "^1.1.1",
53+
"react": "^17.0.1",
54+
"react-dom": "^17.0.1",
55+
"react-focus-lock": "^2.5.2",
56+
"react-i18next": "^11.12.0",
57+
"react-icons": "^4.1.0",
58+
"react-live": "^2.2.3",
59+
"react-lorem-component": "^0.13.0",
60+
"react-multi-ref": "1.0.0",
61+
"react-player": "^2.9.0",
62+
"react-spinners": "^0.11.0",
63+
"react-table": "^7.7.0",
64+
"remark": "^14.0.1",
65+
"remark-autolink-headings": "^7.0.1",
66+
"remark-emoji": "^3.0.1",
67+
"remark-images": "^3.0.0",
68+
"remark-mdx": "^1.6.22",
69+
"remark-slug": "^7.0.1",
70+
"remark-toc": "^8.0.1",
71+
"remark-unwrap-images": "^3.0.0",
72+
"scroll-into-view-if-needed": "^2.2.26",
73+
"shelljs": "^0.8.4",
74+
"superjson": "^1.7.4",
75+
"typescript": "^4.1.3"
76+
},
77+
"devDependencies": {
78+
"@next/bundle-analyzer": "^10.0.5",
79+
"@types/github-slugger": "^1.3.0",
80+
"@types/node": "^14.14.19",
81+
"@types/react": "^17.0.0",
82+
"@types/react-dom": "^17.0.0",
83+
"@types/sharp": "^0.26.1",
84+
"babel-plugin-superjson-next": "^0.3.0",
85+
"eslint": "<8.0.0",
86+
"eslint-config-next": "^12.0.1",
87+
"eslint-config-prettier": "^8.3.0",
88+
"eslint-plugin-prettier": "^4.0.0",
89+
"imagemin": "7.0.1",
90+
"imagemin-jpegtran": "7.0.0",
91+
"next-compose-plugins": "^2.2.1",
92+
"prettier": "^2.4.1",
93+
"ts-node": "9.1.1"
94+
}
95+
}

yarn.lock

+25-33
Original file line numberDiff line numberDiff line change
@@ -3757,6 +3757,11 @@ eslint-config-next@^12.0.1:
37573757
eslint-plugin-react "^7.23.1"
37583758
eslint-plugin-react-hooks "^4.2.0"
37593759

3760+
eslint-config-prettier@^8.3.0:
3761+
version "8.3.0"
3762+
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
3763+
integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
3764+
37603765
eslint-import-resolver-node@^0.3.4, eslint-import-resolver-node@^0.3.6:
37613766
version "0.3.6"
37623767
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
@@ -3821,6 +3826,13 @@ eslint-plugin-jsx-a11y@^6.4.1:
38213826
jsx-ast-utils "^3.1.0"
38223827
language-tags "^1.0.5"
38233828

3829+
eslint-plugin-prettier@^4.0.0:
3830+
version "4.0.0"
3831+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0"
3832+
integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==
3833+
dependencies:
3834+
prettier-linter-helpers "^1.0.0"
3835+
38243836
eslint-plugin-react-hooks@^4.2.0:
38253837
version "4.2.0"
38263838
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556"
@@ -4084,6 +4096,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
40844096
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
40854097
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
40864098

4099+
fast-diff@^1.1.2:
4100+
version "1.2.0"
4101+
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
4102+
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
4103+
40874104
fast-glob@^3.0.3, fast-glob@^3.1.1:
40884105
version "3.2.7"
40894106
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
@@ -4975,28 +4992,6 @@ [email protected]:
49754992
p-pipe "^3.0.0"
49764993
replace-ext "^1.0.0"
49774994

4978-
4979-
version "7.0.0"
4980-
resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-7.0.0.tgz#7728f84876362d489b9a1656e0cc8e2009406e6f"
4981-
integrity sha512-MJoyTCW8YjMJf56NorFE41SR/WkaGA3IYk4JgvMlRwguJEEd3PnP9UxA8Y2UWjquz8d+On3Ds/03ZfiiLS8xTQ==
4982-
dependencies:
4983-
exec-buffer "^3.0.0"
4984-
is-jpg "^2.0.0"
4985-
jpegtran-bin "^5.0.0"
4986-
4987-
4988-
version "7.0.1"
4989-
resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-7.0.1.tgz#f6441ca647197632e23db7d971fffbd530c87dbf"
4990-
integrity sha512-33AmZ+xjZhg2JMCe+vDf6a9mzWukE7l+wAtesjE7KyteqqKjzxv7aVQeWnul1Ve26mWvEQqyPwl0OctNBfSR9w==
4991-
dependencies:
4992-
file-type "^12.0.0"
4993-
globby "^10.0.0"
4994-
graceful-fs "^4.2.2"
4995-
junk "^3.1.0"
4996-
make-dir "^3.0.0"
4997-
p-pipe "^3.0.0"
4998-
replace-ext "^1.0.0"
4999-
50004995
immediate@^3.2.3:
50014996
version "3.3.0"
50024997
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266"
@@ -5819,11 +5814,6 @@ longest@^1.0.0:
58195814
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
58205815
integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=
58215816

5822-
longest@^1.0.0:
5823-
version "1.0.1"
5824-
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
5825-
integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=
5826-
58275817
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0:
58285818
version "1.4.0"
58295819
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -7092,7 +7082,14 @@ prepend-http@^2.0.0:
70927082
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
70937083
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
70947084

7095-
prettier@^2.0.5:
7085+
prettier-linter-helpers@^1.0.0:
7086+
version "1.0.0"
7087+
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
7088+
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
7089+
dependencies:
7090+
fast-diff "^1.1.2"
7091+
7092+
prettier@^2.0.5, prettier@^2.4.1:
70967093
version "2.4.1"
70977094
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
70987095
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==
@@ -8551,11 +8548,6 @@ to-buffer@^1.1.1:
85518548
resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
85528549
integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
85538550

8554-
to-buffer@^1.1.1:
8555-
version "1.1.1"
8556-
resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
8557-
integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
8558-
85598551
to-factory@^1.0.0:
85608552
version "1.0.0"
85618553
resolved "https://registry.yarnpkg.com/to-factory/-/to-factory-1.0.0.tgz#8738af8bd97120ad1d4047972ada5563bf9479b1"

0 commit comments

Comments
 (0)