Skip to content

Commit b071a1e

Browse files
Editor react (#433)
1 parent 184ef9b commit b071a1e

Some content is hidden

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

46 files changed

+13105
-3731
lines changed

docs/.eslintrc

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"plugins": ["prettier", "unused-imports", "react"],
3+
"extends": ["plugin:prettier/recommended", "plugin:react/recommended"],
4+
"ignorePatterns": ["build/"],
5+
"overrides": [
6+
{
7+
"files": ["*.md", "*.mdx"],
8+
"extends": ["plugin:mdx/recommended"]
9+
}
10+
],
11+
"parserOptions": {
12+
"sourceType": "module",
13+
"ecmaVersion": "latest",
14+
"ecmaFeatures": {
15+
"jsx": true,
16+
"modules": true
17+
}
18+
},
19+
"settings": {
20+
"mdx/code-blocks": false
21+
},
22+
"rules": {
23+
"no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
24+
"unused-imports/no-unused-imports": "error",
25+
"unused-imports/no-unused-vars": [
26+
"warn",
27+
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
28+
]
29+
}
30+
}

docs/.prettierrc

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": "*.js",
5+
"options": {
6+
"arrowParens": "avoid",
7+
"bracketSpacing": false,
8+
"bracketSameLine": true,
9+
"printWidth": 80,
10+
"singleQuote": true,
11+
"trailingComma": "es5",
12+
"endOfLine": "auto"
13+
}
14+
},
15+
{
16+
"files": "*.md",
17+
"options": {
18+
"arrowParens": "avoid",
19+
"bracketSpacing": false,
20+
"bracketSameLine": true,
21+
"printWidth": 66,
22+
"proseWrap": "preserve",
23+
"singleQuote": true,
24+
"trailingComma": "all",
25+
"endOfLine": "auto"
26+
}
27+
},
28+
{
29+
"files": ["*.scss", "*.css"],
30+
"options": {
31+
"printWidth": 80,
32+
"endOfLine": "auto"
33+
}
34+
}
35+
]
36+
}

docs/docusaurus.config.js

+27-25
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ const config = {
1919
projectName: 'go-feature-flag',
2020
trailingSlash: false,
2121

22-
customFields:{
23-
logo: "img/logo/logo.png",
24-
github: "https://github.com/thomaspoignant/go-feature-flag",
25-
sponsor: "https://github.com/sponsors/thomaspoignant",
26-
openfeature: "https://openfeature.dev",
27-
mailchimpURL: "//gofeatureflag.us14.list-manage.com/subscribe/post?u=86acc1a78e371bf66a9683672&id=f42abfec51&amp",
28-
swaggerURL: "https://github.com/thomaspoignant/go-feature-flag/blob/main/cmd/relayproxy/docs/swagger.yaml"
29-
},
22+
customFields: {
23+
logo: 'img/logo/logo.png',
24+
github: 'https://github.com/thomaspoignant/go-feature-flag',
25+
sponsor: 'https://github.com/sponsors/thomaspoignant',
26+
openfeature: 'https://openfeature.dev',
27+
mailchimpURL:
28+
'//gofeatureflag.us14.list-manage.com/subscribe/post?u=86acc1a78e371bf66a9683672&id=f42abfec51&amp',
29+
swaggerURL:
30+
'https://github.com/thomaspoignant/go-feature-flag/blob/main/cmd/relayproxy/docs/swagger.yaml',
31+
},
3032
// Even if you don't use internalization, you can use this field to set useful
3133
// metadata like html lang. For example, if your site is Chinese, you may want
3234
// to replace "en" with "zh-Hans".
@@ -66,11 +68,11 @@ const config = {
6668
],
6769
stylesheets: [
6870
'css/pushy-buttons.css', //https://github.com/iRaul/pushy-buttons
69-
'css/simplegrid.css',
71+
'css/simplegrid.css', //https://thisisdallas.github.io/Simple-Grid/
7072
'https://fonts.googleapis.com/css?family=Poppins:400,500,700',
7173
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css',
7274
'https://cdn.jsdelivr.net/gh/devicons/[email protected]/devicon.min.css', // https://devicon.dev/
73-
],
75+
],
7476
themeConfig:
7577
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
7678
({
@@ -92,38 +94,42 @@ const config = {
9294
label: 'Docs',
9395
},
9496
{to: '/blog', label: 'Blog', position: 'left'},
95-
{to: 'https://editor.gofeatureflag.org', html: 'Flag Editor <i class="fas fa-external-link-alt"></i>', position: 'left'},
97+
{to: '/editor', html: 'Flag Editor', position: 'left'},
9698
// {
9799
// type: 'doc',
98100
// docId:'migrate_v0_v1',
99101
// label: 'v1.x.x migration',
100102
// position: 'left'
101103
// },
102-
{to: 'https://github.com/sponsors/thomaspoignant', label: 'Sponsor us ❤️', position: 'right'},
104+
{
105+
to: 'https://github.com/sponsors/thomaspoignant',
106+
label: 'Sponsor us ❤️',
107+
position: 'right',
108+
},
103109
{type: 'docsVersionDropdown', position: 'right'},
104110
{
105111
href: 'https://github.com/thomaspoignant/go-feature-flag',
106112
position: 'right',
107-
className: "header-github-link navbar__right",
108-
"aria-label": "GitHub repository",
113+
className: 'header-github-link navbar__right',
114+
'aria-label': 'GitHub repository',
109115
},
110116
{
111117
href: 'https://twitter.com/gofeatureflag',
112118
position: 'right',
113-
className: "header-twitter-link navbar__right",
114-
"aria-label": "Twitter",
119+
className: 'header-twitter-link navbar__right',
120+
'aria-label': 'Twitter',
115121
},
116122
{
117123
href: 'https://gophers.slack.com/messages/go-feature-flag',
118124
position: 'right',
119-
className: "header-slack-link navbar__right",
120-
"aria-label": "Slack",
125+
className: 'header-slack-link navbar__right',
126+
'aria-label': 'Slack',
121127
},
122128
{
123129
href: 'mailto:[email protected]',
124130
position: 'right',
125-
className: "header-email-link navbar__right",
126-
"aria-label": "Email",
131+
className: 'header-email-link navbar__right',
132+
'aria-label': 'Email',
127133
},
128134
],
129135
},
@@ -175,17 +181,13 @@ const config = {
175181
},
176182
],
177183
},
178-
179184
],
180185
copyright: `Copyright © ${new Date().getFullYear()} GO Feature Flag.`,
181186
},
182187
prism: {
183188
theme: lightCodeTheme,
184189
darkTheme: darkCodeTheme,
185-
additionalLanguages: [
186-
'toml',
187-
'php',
188-
]
190+
additionalLanguages: ['toml', 'php'],
189191
},
190192
}),
191193
};

0 commit comments

Comments
 (0)