-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed content for linting and monorepo
- Loading branch information
Vinod Kumar
authored and
Vinod Kumar
committed
May 30, 2022
1 parent
162991a
commit b6ee947
Showing
7 changed files
with
14 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,10 @@ | ||
--- | ||
id: quality-control | ||
title: Static Quality Control | ||
sidebar_label: Quality Control | ||
--- | ||
|
||
# XT Page Source Code Quality Config Package | ||
## Linting | ||
|
||
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. | ||
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. | ||
|
||
## Eslint Package | ||
|
||
To Install package <@xt-pagesource/eslint-config> | ||
|
||
```sh | ||
npm install @xt-pagesource/eslint-config-react | ||
``` | ||
|
||
#### Configure | ||
|
||
Create the file .eslintrc in your app root folder and extend rules. you can also add additional rules as per your desire. | ||
|
||
``` | ||
{ | ||
"extends":["@xt-pagesource/eslint-config-react"] | ||
} | ||
``` | ||
|
||
#### Note: | ||
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. | ||
|
||
``` | ||
{ | ||
"extends":["@xt-pagesource/eslint-config-react"], | ||
rules:{ | ||
your rules here | ||
} | ||
} | ||
``` | ||
|
||
### Usage | ||
|
||
Like you will do normally with eslint, this package is nothing else just a wrapper. - For just linting and to see the report, run: | ||
|
||
``` | ||
eslint path/to/folder | ||
``` | ||
|
||
For linting and autofix the problems, run: | ||
|
||
``` | ||
eslint --fix path/to/folder | ||
``` | ||
|
||
Recommended | ||
Add in your package.json at the scripts section the two following scripts: | ||
|
||
``` | ||
{ | ||
"scripts": { | ||
"lint:js": "eslint path/to/folder", | ||
"lint:fix": "eslint --fix path/to/folder" | ||
} | ||
} | ||
``` | ||
|
||
--- | ||
|
||
## Stylint Package | ||
|
||
To Install package <@xt-pagesource/stylelint-config> | ||
|
||
``` | ||
npm install @xt-pagesource/stylelint-config-react | ||
``` | ||
|
||
#### Configure | ||
|
||
Create the file .stylelintrc in your app root folder and extend rules. you can also add additional rules as per your desire. | ||
|
||
``` | ||
{ | ||
"extends":["@xt-pagesource/stylelint-config-react"] | ||
} | ||
``` | ||
|
||
#### Note: | ||
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. | ||
|
||
``` | ||
{ | ||
"extends":["@xt-pagesource/stylelint-config-react"], | ||
rules:{ | ||
your rules here | ||
} | ||
} | ||
``` | ||
|
||
### Usage | ||
|
||
Like you will do normally with stylelint, this package is a wrapper. - For just linting and to see the report, run: | ||
|
||
``` | ||
stylelint path/to/folder | ||
``` | ||
|
||
For linting and autofix the problems, run: | ||
|
||
``` | ||
stylelint --fix path/to/folder | ||
``` | ||
|
||
Recommended | ||
Add in your package.json at the scripts section the two following scripts: | ||
|
||
``` | ||
{ | ||
"scripts": { | ||
"lint:css": "stylelint path/to/folder", | ||
} | ||
} | ||
``` | ||
![Linting config in Turborepo](/img/linting-config.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
someSidebar: { | ||
Introduction: ['intro', 'why', 'how', 'features', 'road-map', 'contribution', 'adoption', 'support'], | ||
Features: ['quality-control', 'smart-context', 'unit-testing', 'design-system', 'loader', 'web-component', 'logger', 'generate-plop', 'module-federation', 'monorepo', 'storybook'], | ||
Features: ['monorepo', 'smart-context', 'design-system', 'loader', 'logger', 'generate-plop', 'module-federation', 'storybook', 'quality-control', 'unit-testing' ], | ||
}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.