Skip to content

Commit b6ee947

Browse files
Vinod KumarVinod Kumar
authored andcommitted
Fixed content for linting and monorepo
1 parent 162991a commit b6ee947

File tree

7 files changed

+14
-163
lines changed

7 files changed

+14
-163
lines changed

docs/adoption.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Universal React accelerator has taken several steps to ensure the Adoption Readi
1515

1616
Universal React accelerator can be adopted into your projects in multiple ways.
1717

18-
1. **Out of the box Adoption**: You can use `npx create-universal-react`to setup your project, if you are completely aligned with [Technology choices](/universal-react-docs/docs/features/). You can make necessary tweaks and adjust these choices post initial setup.
19-
2. **Clone The Generator**: You can clone the generator, customize it as per your organization needs.
18+
1. **Out of the box adoption**: You can use `npx create-universal-react`to setup your project, if you are completely aligned with [Technology choices](/universal-react-docs/docs/features/). You can make necessary tweaks and adjust these choices post initial setup.
19+
2. **Clone the Generator**: You can clone the generator, customize it as per your organization needs and publish it to artifactory.

docs/consuming-web-component-in-react.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/monorepo.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ title: Monorepo
44
sidebar_label: Monorepo
55
---
66

7-
# Setup Monorepo structure with Turborepo
7+
## Monorepo structure with Turborepo
88

99
Monorepos are incredible for productivity, especially on the frontend, but the tooling can be a nightmare. [Turborepo](https://turborepo.org/) makes it easy.
1010

11+
Learn more here, on why use [Turborepo](https://turborepo.org/docs#why-turborepo)?
12+
13+
Read this for a [comparison of NX vs Turborepo](https://nx.dev/guides/turbo-and-nx)
14+
15+
## Project structure in Turborepo
16+
17+
![Project structure in Turborepo](/img/turborepo-structure.png)

docs/quality-control.md

Lines changed: 3 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,10 @@
11
---
22
id: quality-control
33
title: Static Quality Control
4-
sidebar_label: Quality Control
54
---
65

7-
# XT Page Source Code Quality Config Package
6+
## Linting
87

9-
Package to unify code quality control configuration and rules across projects. No need to install those packages anymore in your projects and maintain them all separately.
8+
Config packages to unify code linting and typescript configuration and rules across projects. No need to install those packages anymore in your each project and maintain them all separately, thanks to monorepo structure.
109

11-
## Eslint Package
12-
13-
To Install package <@xt-pagesource/eslint-config>
14-
15-
```sh
16-
npm install @xt-pagesource/eslint-config-react
17-
```
18-
19-
#### Configure
20-
21-
Create the file .eslintrc in your app root folder and extend rules. you can also add additional rules as per your desire.
22-
23-
```
24-
{
25-
"extends":["@xt-pagesource/eslint-config-react"]
26-
}
27-
```
28-
29-
#### Note:
30-
You can extend or modify this rules in your project as is described on the documentation of eslint, the same way as you will do when extending eslint recommended rules.
31-
32-
```
33-
{
34-
"extends":["@xt-pagesource/eslint-config-react"],
35-
36-
rules:{
37-
your rules here
38-
}
39-
}
40-
```
41-
42-
### Usage
43-
44-
Like you will do normally with eslint, this package is nothing else just a wrapper. - For just linting and to see the report, run:
45-
46-
```
47-
eslint path/to/folder
48-
```
49-
50-
For linting and autofix the problems, run:
51-
52-
```
53-
eslint --fix path/to/folder
54-
```
55-
56-
Recommended
57-
Add in your package.json at the scripts section the two following scripts:
58-
59-
```
60-
{
61-
"scripts": {
62-
"lint:js": "eslint path/to/folder",
63-
"lint:fix": "eslint --fix path/to/folder"
64-
}
65-
}
66-
```
67-
68-
---
69-
70-
## Stylint Package
71-
72-
To Install package <@xt-pagesource/stylelint-config>
73-
74-
```
75-
npm install @xt-pagesource/stylelint-config-react
76-
```
77-
78-
#### Configure
79-
80-
Create the file .stylelintrc in your app root folder and extend rules. you can also add additional rules as per your desire.
81-
82-
```
83-
{
84-
"extends":["@xt-pagesource/stylelint-config-react"]
85-
}
86-
```
87-
88-
#### Note:
89-
You can extend or modify this rules in your project as is described on the documentation of eslint, the same way as you will do when extending eslint recommended rules.
90-
91-
```
92-
{
93-
"extends":["@xt-pagesource/stylelint-config-react"],
94-
95-
rules:{
96-
your rules here
97-
}
98-
99-
}
100-
```
101-
102-
### Usage
103-
104-
Like you will do normally with stylelint, this package is a wrapper. - For just linting and to see the report, run:
105-
106-
```
107-
stylelint path/to/folder
108-
```
109-
110-
For linting and autofix the problems, run:
111-
112-
```
113-
stylelint --fix path/to/folder
114-
```
115-
116-
Recommended
117-
Add in your package.json at the scripts section the two following scripts:
118-
119-
```
120-
{
121-
"scripts": {
122-
123-
"lint:css": "stylelint path/to/folder",
124-
}
125-
}
126-
```
10+
![Linting config in Turborepo](/img/linting-config.png)

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
someSidebar: {
33
Introduction: ['intro', 'why', 'how', 'features', 'road-map', 'contribution', 'adoption', 'support'],
4-
Features: ['quality-control', 'smart-context', 'unit-testing', 'design-system', 'loader', 'web-component', 'logger', 'generate-plop', 'module-federation', 'monorepo', 'storybook'],
4+
Features: ['monorepo', 'smart-context', 'design-system', 'loader', 'logger', 'generate-plop', 'module-federation', 'storybook', 'quality-control', 'unit-testing' ],
55
},
66
};

static/img/linting-config.png

386 KB
Loading

static/img/turborepo-structure.png

460 KB
Loading

0 commit comments

Comments
 (0)