Skip to content

Commit

Permalink
Merge pull request #45 from wayofdev/feat/docs
Browse files Browse the repository at this point in the history
docs: updating readme files
  • Loading branch information
lotyp authored Feb 20, 2023
2 parents f45040a + 3b987a6 commit f3329db
Show file tree
Hide file tree
Showing 11 changed files with 642 additions and 355 deletions.
7 changes: 7 additions & 0 deletions .changeset/mean-doors-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@wayofdev/eslint-config-bases': patch
'@wayofdev/secretlint-config': patch
'@wayofdev/tsconfig-config': patch
---

docs: changes in readme files
476 changes: 285 additions & 191 deletions README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,29 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.0",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@types/node": "^18.13.0",
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@types/node": "^18.14.0",
"@types/prettier": "^2.7.2",
"@types/shell-quote": "^1.7.1",
"@wayofdev/eslint-config-bases": "workspace:*",
"@wayofdev/lint-staged-config": "workspace:*",
"@wayofdev/secretlint-config": "workspace:*",
"actionlint": "^2.0.6",
"commitizen": "^4.3.0",
"eslint": "^8.33.0",
"eslint": "^8.34.0",
"husky": "^8.0.3",
"is-ci": "3.0.1",
"lint-staged": "^13.1.1",
"lint-staged": "^13.1.2",
"markdownlint": "^0.27.0",
"markdownlint-cli": "^0.33.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"rimraf": "^4.1.2",
"secretlint": "^6.2.0",
"secretlint": "^6.2.3",
"shell-quote": "^1.8.0",
"sort-package-json": "^2.4.1",
"turbo": "^1.7.4",
"turbo": "^1.8.1",
"typescript": "^4.9.5"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/commitlint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"lint:types": "tsc --project tsconfig.json --noEmit"
},
"dependencies": {
"@commitlint/config-conventional": "^17.4.2"
"@commitlint/config-conventional": "^17.4.4"
},
"devDependencies": {
"es-check": "^7.1.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-config-bases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ $ pnpm pkg set scripts.lint:turbo="turbo lint"
You can also manually add commands to your workspaces, located in `apps/*` and `packages/*`. For example:

```json
...
"scripts": {
"lint": "eslint --ext .ts,.js,.cjs,.mjs --cache --cache-location ../../.cache/eslint/eslint-config-bases.eslintcache",
"lint:fix": "eslint --ext .ts,.tsx,.js,.jsx,.mjs,.cjs,.mts,.cts --fix --cache --cache-location ../../.cache/eslint/eslint-config-bases.eslintcache"
},
...
{
"scripts": {
"lint": "eslint --ext .ts,.js,.cjs,.mjs --cache --cache-location ../../.cache/eslint/eslint-config-bases.eslintcache",
"lint:fix": "eslint --ext .ts,.tsx,.js,.jsx,.mjs,.cjs,.mts,.cts --fix --cache --cache-location ../../.cache/eslint/eslint-config-bases.eslintcache"
}
}
```

<br>
Expand Down
18 changes: 9 additions & 9 deletions packages/eslint-config-bases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
"@tanstack/eslint-plugin-query": "4.24.8",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -128,27 +128,27 @@
"eslint-plugin-sonarjs": "^0.18.0",
"eslint-plugin-storybook": "^0.6.10",
"eslint-plugin-tailwindcss": "^3.8.3",
"eslint-plugin-testing-library": "^5.10.0",
"eslint-plugin-testing-library": "^5.10.2",
"eslint-plugin-unicorn": "^45.0.2",
"prettier": "^2.8.4"
},
"devDependencies": {
"@graphql-eslint/eslint-plugin": "^3.15.0",
"@graphql-eslint/eslint-plugin": "^3.16.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^18.13.0",
"@types/node": "^18.14.0",
"@types/prettier": "^2.7.2",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@wayofdev/lint-staged-config": "workspace:*",
"es-check": "^7.1.0",
"eslint": "^8.33.0",
"eslint": "^8.34.0",
"graphql": "^16.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^4.1.2",
"tailwindcss": "^3.2.4",
"tailwindcss": "^3.2.7",
"typescript": "^4.9.5"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/lint-staged-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@
},
"devDependencies": {
"@types/jest": "^29.4.0",
"@types/node": "^18.11.18",
"@types/node": "^18.14.0",
"@types/prettier": "^2.7.2",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"es-check": "^7.1.0"
},
"peerDependencies": {
Expand Down
18 changes: 9 additions & 9 deletions packages/secretlint-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ The configuration includes a set of preconfigured rules, such as `@secretlint/se

## 💿 Installation

To use Secretlint with `@wayofdev/secretlint-config` in a monorepository, you can install them at the root level and configure it to lint only the packages that require it. Follow these steps:
To use Secretlint with `@wayofdev/secretlint-config` in a mono-repository, you can install them at the root level and configure it to lint only the packages that require it. Follow these steps:

1. Install `secretlint` and `@wayofdev/secretlint-config` as development dependencies at the root of your monorepository using the package manager of your choice (`npm`, `yarn`, `pnpm`, etc.). For example, using `pnpm`:
1. Install `secretlint` and `@wayofdev/secretlint-config` as development dependencies at the root of your mono-repository using the package manager of your choice (`npm`, `yarn`, `pnpm`, etc.). For example, using `pnpm`:

```bash
pnpm add -Dw secretlint @wayofdev/secretlint-config
```

2. Create a `.secretlintrc.json` configuration file in the root of your monorepository with the following content:
2. Create a `.secretlintrc.json` configuration file in the root of your mono-repository with the following content:

```json
{
Expand All @@ -72,19 +72,19 @@ To use Secretlint with `@wayofdev/secretlint-config` in a monorepository, you ca
}
```

In this example, Secretlint is configured to use the `@wayofdev/secretlint-config` package as its configuration, and to lint only the directories in the `packages` and `apps` folders of the monorepository.
In this example, Secretlint is configured to use the `@wayofdev/secretlint-config` package as its configuration, and to lint only the directories in the `packages` and `apps` folders of the mono-repository.

You can adjust the `include` and `exclude` patterns to match your specific monorepository structure and exclude files or directories that don't need to be linted.
You can adjust the `include` and `exclude` patterns to match your specific mono-repository structure and exclude files or directories that don't need to be linted.

3. Add a linting script to the `scripts` section of the `package.json` file at the root of your monorepository:
3. Add a linting script to the `scripts` section of the `package.json` file at the root of your mono-repository:

```bash
pnpm pkg set scripts.lint:secrets="secretlint"
```

This will add the `lint:secrets` script to the `scripts` section of your `package.json`.

That's it! You can now run the `lint:secrets` script to lint the relevant packages in your monorepository.
That's it! You can now run the `lint:secrets` script to lint the relevant packages in your mono-repository.

<br>

Expand All @@ -94,15 +94,15 @@ To automatically lint files with Secretlint before committing them, you can use

1. Follow the installation instructions for `lint-staged` in the [@wayofdev/lint-staged-config](https://github.com/wayofdev/npm-shareable-configs/tree/master/packages/lint-staged-config) package. This package provides a pre-configured `lint-staged` configuration that includes [Husky](https://github.com/typicode/husky) and other tools.

2. Add the following configuration to a `lint-staged.config.js` file at the root of your monorepository:
2. Add the following configuration to a `lint-staged.config.js` file at the root of your mono-repository:

```js
module.exports = {
'*': 'secretlint',
}
```

This will configure `lint-staged` to run Secretlint on all staged files in your monorepository.
This will configure `lint-staged` to run Secretlint on all staged files in your mono-repository.

<br>

Expand Down
2 changes: 1 addition & 1 deletion packages/secretlint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lint:types": "tsc --project tsconfig.json --noEmit"
},
"dependencies": {
"@secretlint/secretlint-rule-preset-recommend": "^6.2.0"
"@secretlint/secretlint-rule-preset-recommend": "^6.2.3"
},
"devDependencies": {
"rimraf": "^4.1.2"
Expand Down
4 changes: 3 additions & 1 deletion packages/tsconfig-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ Based on:
- [shareable-configs](https://github.com/waldronmatt/shareable-configs) from [waldronmatt](https://github.com/waldronmatt)
- [shared-dx](https://github.com/belgattitude/shared-dx) from [belgattitude](https://github.com/belgattitude)
This package builds on the work of others to provide a pre-configured Secretlint configuration that can be easily shared and reused across different projects. The related projects listed above may also be useful for integrating Secretlint into your project, particularly if you're using Git and want to automatically run Secretlint before committing changes.
Guides:
- [TypeScript in a monorepo](https://turbo.build/repo/docs/handbook/linting/typescript)
<br>
Expand Down
Loading

0 comments on commit f3329db

Please sign in to comment.