Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit e3ae33b

Browse files
authored
Merge pull request #41 from agile-ts/develop
Develop
2 parents 324093f + bdd05e6 commit e3ae33b

Some content is hidden

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

54 files changed

+2171
-467
lines changed

.eslintignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
node_modules
3+
.eslintrc.js
4+
jest.config.js
5+
jest.config.base.js
6+
scripts/
7+
examples/

.eslintrc.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const OFF = 0;
2+
const WARNING = 1;
3+
const ERROR = 2;
4+
5+
module.exports = {
6+
root: true,
7+
env: {
8+
browser: true,
9+
commonjs: true,
10+
jest: true,
11+
node: true,
12+
},
13+
extends: [
14+
'eslint:recommended',
15+
'plugin:@typescript-eslint/recommended',
16+
'prettier',
17+
],
18+
parser: '@typescript-eslint/parser',
19+
parserOptions: {
20+
allowImportExportEverywhere: true,
21+
ecmaVersion: 12,
22+
sourceType: 'module',
23+
},
24+
plugins: ['@typescript-eslint', 'prettier'],
25+
rules: {
26+
'func-names': OFF,
27+
'@typescript-eslint/no-explicit-any': OFF,
28+
'@typescript-eslint/explicit-module-boundary-types': OFF,
29+
'@typescript-eslint/ban-types': WARNING,
30+
'@typescript-eslint/ban-ts-comment': WARNING,
31+
},
32+
};

.prettierignore

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

.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"_comment": "To apply prettier config to Webstorm https://intellij-support.jetbrains.com/hc/en-us/community/posts/360002745119-How-to-have-Reformat-Code-feature-behave-exactly-like-Prettier-",
3+
"arrowParens": "always",
4+
"bracketSpacing": true,
5+
"jsxBracketSameLine": true,
6+
"printWidth": 80,
7+
"tabWidth": 2,
8+
"proseWrap": "never",
9+
"singleQuote": true,
10+
"trailingComma": "es5",
11+
"endOfLine": "lf",
12+
"semi": true
13+
}

docusaurus.config.js

+65-63
Original file line numberDiff line numberDiff line change
@@ -1,190 +1,192 @@
1-
const githubOrgUrl = "https://github.com/agile-ts";
2-
const domain = "https://agile-ts.org";
1+
const githubOrgUrl = 'https://github.com/agile-ts';
2+
const domain = 'https://agile-ts.org';
3+
const npmOrgUrl = 'https://www.npmjs.com/package/@agile-ts';
34

45
const customFields = {
56
copyright: `Created with 💜 in Germany | Copyright © ${new Date().getFullYear()} <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/DevBenno">BennoDev</a>`,
6-
description: "AgileTs is a spacy, fast, simple State Management Framework",
7+
description: 'AgileTs is a spacy, fast, simple State Management Framework',
78
domain,
89
githubOrgUrl,
910
githubUrl: `${githubOrgUrl}/agile`,
1011
githubDocsUrl: `${githubOrgUrl}/documentation`,
12+
npmCoreUrl: `${npmOrgUrl}/core`,
1113
discordUrl: `https://discord.gg/T9GzreAwPH`,
12-
stackoverflowUrl: "https://stackoverflow.com/questions/tagged/agile-ts",
13-
twitterUrl: "https://twitter.com/AgileFramework",
14-
version: "0.0.1",
14+
stackoverflowUrl: 'https://stackoverflow.com/questions/tagged/agile-ts',
15+
twitterUrl: 'https://twitter.com/AgileFramework',
16+
version: '0.0.1',
1517
announcementBarContent:
1618
'If you like AgileTs, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/agile-ts/agile">GitHub</a> 🎉 !️',
1719
};
1820

1921
const config = {
20-
title: "AgileTs",
21-
tagline: "AgileTs is a spacy, fast, simple State-Management Framework",
22+
title: 'AgileTs',
23+
tagline: 'AgileTs is a spacy, fast, simple State-Management Framework',
2224
url: customFields.domain,
2325
baseUrlIssueBanner: false,
24-
baseUrl: "/",
25-
onBrokenLinks: "throw",
26-
favicon: "img/favicon.ico",
27-
organizationName: "AgileTs",
28-
projectName: "agilets",
29-
themes: ["@docusaurus/theme-live-codeblock"],
26+
baseUrl: '/',
27+
onBrokenLinks: 'throw',
28+
favicon: 'img/favicon.ico',
29+
organizationName: 'AgileTs',
30+
projectName: 'agilets',
31+
themes: ['@docusaurus/theme-live-codeblock'],
3032
plugins: [
31-
"docusaurus-plugin-sass" /* @docusaurus/plugin-google-analytics (Not necessary because it automatically gets added) */,
33+
'docusaurus-plugin-sass' /* @docusaurus/plugin-google-analytics (Not necessary because it automatically gets added) */,
3234
],
3335
customFields: { ...customFields },
3436
themeConfig: {
3537
hideableSidebar: true,
3638
algolia: {
37-
apiKey: "6b7b98565bb82e16996fd185f378d618",
38-
indexName: "agile-ts",
39+
apiKey: '6b7b98565bb82e16996fd185f378d618',
40+
indexName: 'agile-ts',
3941
},
4042
colorMode: {
41-
defaultMode: "dark",
43+
defaultMode: 'dark',
4244
disableSwitch: false,
4345
respectPrefersColorScheme: true,
4446
},
4547
announcementBar: {
46-
id: "github-star",
48+
id: 'github-star',
4749
content: customFields.announcementBarContent,
48-
backgroundColor: "#9c9abf",
50+
backgroundColor: '#9c9abf',
4951
},
5052
prism: {
51-
theme: require("prism-react-renderer/themes/github"),
52-
darkTheme: require("prism-react-renderer/themes/dracula"),
53+
theme: require('prism-react-renderer/themes/github'),
54+
darkTheme: require('prism-react-renderer/themes/dracula'),
5355
},
5456
algolia: {
55-
apiKey: "6b7b98565bb82e16996fd185f378d618",
56-
indexName: "agile-ts",
57+
apiKey: '6b7b98565bb82e16996fd185f378d618',
58+
indexName: 'agile-ts',
5759
},
5860
navbar: {
59-
title: " ",
61+
title: ' ',
6062
hideOnScroll: true,
6163
logo: {
62-
alt: "My Site Logo",
63-
src: "img/logo.svg",
64+
alt: 'My Site Logo',
65+
src: 'img/logo.svg',
6466
},
6567
items: [
6668
// left
6769
{
68-
label: "Get Started",
69-
position: "left",
70+
label: 'Get Started',
71+
position: 'left',
7072
items: [
7173
{
72-
label: "Installation",
73-
to: "/docs/installation/",
74+
label: 'Installation',
75+
to: '/docs/installation/',
7476
},
7577
{
76-
label: "React",
77-
to: "/docs/quick-start/react/",
78+
label: 'React',
79+
to: '/docs/quick-start/react/',
7880
},
7981
{
80-
label: "Style Guide",
81-
to: "/docs/style-guide/",
82+
label: 'Style Guide',
83+
to: '/docs/style-guide/',
8284
},
8385
],
8486
},
8587
{
86-
label: "Community",
87-
position: "left",
88+
label: 'Community',
89+
position: 'left',
8890
items: [
8991
{
90-
label: "GitHub",
92+
label: 'GitHub',
9193
href: customFields.githubUrl,
9294
},
9395
{
94-
label: "Discord",
96+
label: 'Discord',
9597
href: customFields.discordUrl,
9698
},
9799
{
98-
label: "Stack Overflow",
100+
label: 'Stack Overflow',
99101
href: customFields.stackoverflowUrl,
100102
},
101103
{
102-
label: "Twitter",
104+
label: 'Twitter',
103105
href: customFields.twitterUrl,
104106
},
105107
],
106108
},
107109
{
108-
label: "Documentation",
109-
position: "left",
110-
to: "docs/introduction/",
110+
label: 'Documentation',
111+
position: 'left',
112+
to: 'docs/introduction/',
111113
},
112114
],
113115
},
114116
footer: {
115117
copyright: customFields.copyright,
116-
style: "dark",
118+
style: 'dark',
117119
copyright: customFields.copyright,
118120
links: [
119121
{
120-
title: "Docs",
122+
title: 'Docs',
121123
items: [
122124
{
123-
label: "Get Started",
124-
to: "docs/introduction",
125+
label: 'Get Started',
126+
to: 'docs/introduction',
125127
},
126128
],
127129
},
128130
{
129-
title: "Community",
131+
title: 'Community',
130132
items: [
131133
{
132-
label: "Stack Overflow",
134+
label: 'Stack Overflow',
133135
href: customFields.stackoverflowUrl,
134136
},
135137
{
136-
label: "Discord",
138+
label: 'Discord',
137139
href: customFields.discordUrl,
138140
},
139141
{
140-
label: "Twitter",
142+
label: 'Twitter',
141143
href: customFields.twitterUrl,
142144
},
143145
],
144146
},
145147
{
146-
title: "More",
148+
title: 'More',
147149
items: [
148150
{
149-
label: "Blog",
150-
to: "/blog/",
151+
label: 'Blog',
152+
to: '/blog/',
151153
},
152154
{
153-
label: "GitHub",
155+
label: 'GitHub',
154156
href: customFields.githubUrl,
155157
},
156158
],
157159
},
158160
],
159161
},
160162
googleAnalytics: {
161-
trackingID: "UA-189394644-1",
163+
trackingID: 'UA-189394644-1',
162164
anonymizeIP: true, // Should IPs be anonymized?
163165
},
164166
},
165167
presets: [
166168
[
167-
"@docusaurus/preset-classic",
169+
'@docusaurus/preset-classic',
168170
{
169171
docs: {
170-
path: "docs",
172+
path: 'docs',
171173
admonitions: {
172-
icons: "emoji",
174+
icons: 'emoji',
173175
},
174-
sidebarPath: require.resolve("./sidebars.js"),
176+
sidebarPath: require.resolve('./sidebars.js'),
175177
editUrl: `${customFields.githubDocsUrl}/tree/develop`,
176178
showLastUpdateAuthor: false,
177179
showLastUpdateTime: true,
178180
remarkPlugins: [
179-
[require("@docusaurus/remark-plugin-npm2yarn"), { sync: true }],
181+
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
180182
],
181183
},
182184
blog: {
183185
showReadingTime: true,
184186
editUrl: `${customFields.githubDocsUrl}/tree/develop`,
185187
},
186188
theme: {
187-
customCss: [require.resolve("./src/css/custom.scss")],
189+
customCss: [require.resolve('./src/css/custom.scss')],
188190
},
189191
},
190192
],

package.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"deploy": "docusaurus deploy",
1111
"serve": "docusaurus serve",
1212
"buildserve": "yarn run build && yarn run serve",
13-
"install-docusaurus": "yalc add @docusaurus/core & yarn install"
13+
"install-docusaurus": "yalc add @docusaurus/core & yarn install",
14+
"prettier": "prettier --config .prettierrc --write \"**/*.{js,ts}\"",
15+
"lint": "eslint --cache \"**/*.{js,jsx,ts,tsx}\""
1416
},
1517
"dependencies": {
1618
"@agile-ts/core": "0.0.11",
@@ -39,6 +41,13 @@
3941
"@types/react-helmet": "^6.1.0",
4042
"@types/react-router-dom": "^5.1.6",
4143
"@types/styled-components": "^5.1.0",
44+
"eslint": "^7.17.0",
45+
"eslint-plugin-prettier": "^3.3.1",
46+
"eslint-config-prettier": "^6.11.0",
47+
"eslint-plugin-node": "^11.1.0",
48+
"eslint-config-node": "^4.1.0",
49+
"prettier": "2.1.2",
50+
"ts-node": "^8.10.2",
4251
"typescript": "^4.1.5"
4352
},
4453
"browserslist": {

0 commit comments

Comments
 (0)