Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes typos and linting issues in the documentation #75

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## What is Rotten Deps?

Rotten Deps builds upon tools like `yarn outdated` and `npm outdated` to provide more than just a pass or fail state to outdated dependecies. You can configure a global or per dependency compliance period which will trigger a warn instead of a fail. This provides more breathing room for updating without blocking your builds.
Rotten Deps builds upon tools like `yarn outdated` and `npm outdated` to provide more than just a pass or fail state to outdated dependencies. You can configure a global or per dependency compliance period which will trigger a warn instead of a fail. This provides more breathing room for updating without blocking your builds.

## Why and when should I use this?

Expand All @@ -18,7 +18,7 @@ Assuming you've decided that 14 days is an acceptable compliance periods for upd

### Global compliance period

This is good for setting organization base rules if you are working in an organization that has patching compliance windows.
This is good for setting organization base rules if you are working in an organization that has patching compliance windows.

## How is days outdated determined?

Expand Down Expand Up @@ -47,21 +47,21 @@ a `node_modules/` so the wanted version is used instead which is determined base

### Usage

You can find more in-depth documentation at https://ominestre.github.io/rotten-deps/.
You can find more in-depth documentation hosted on our [GitHub pages](https://ominestre.github.io/rotten-deps/).

#### CLI

To see details on command usage and options use `rotten-deps --help`, or if you installed it locally `node ./node_modules/.bin/rotten-deps --help`.

#### API

At this time the API isn't officially supported but you can probably figure it out based on the reference docs at https://ominestre.github.io/rotten-deps/
At this time the API isn't officially supported but you can probably figure it out based on the reference docs hosted on our [GitHub Pages](https://ominestre.github.io/rotten-deps/)

#### Exit codes and meanings

* `0` indicates that no dependencies are stale or outdated
* `1` indicates that you have outdated dependencies
* `2` indicates that you have stale dependencies but no outdated
- `0` indicates that no dependencies are stale or outdated
- `1` indicates that you have outdated dependencies
- `2` indicates that you have stale dependencies but no outdated

## Contributing

Expand Down
15 changes: 7 additions & 8 deletions documentation/how-to/contribute-to-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Structure and organization

The documentation system this is based on is https://documentation.divio.com/. This system doesn't have one thing called _documentation_, it has four: tutorials, how-to guides, technical reference, and explanations.
The documentation is based on the [Divio Documentation System](https://documentation.divio.com/). This system doesn't have one thing called _documentation_, it has four: tutorials, how-to guides, technical reference, and explanations.

Technical references are generated by https://github.com/TypeStrong/typedoc based one comments within the TypeScript files themselves using the https://github.com/microsoft/tsdoc standard. You can also use https://typedoc.org/guides/options/#includes to pull these markdown files into the reference docs.
Technical references are generated by [Typedoc](https://github.com/TypeStrong/typedoc) based one comments within the TypeScript files themselves using the [TSDoc](https://github.com/microsoft/tsdoc) standard. You can also use [TypeDoc Includes](https://typedoc.org/guides/options/#includes) to pull these markdown files into the reference docs.

How-to, explanations, and tutorials reside as markdown files within `documentation/`. **`docs/` is the generated output for github pages and is ignored.
How-to, explanations, and tutorials reside as markdown files within `documentation/`. `docs/` is the generated output for github pages and is ignored.

```
```text
documentation
├── explanations
├── how-tos
Expand All @@ -31,7 +31,7 @@ Update the `typedoc.json` configuration file. The `pages` object contains all of
{
"title": "How To",
"pages": [
{ "title": "Contibute to the documentation", "source": "./documentation/how-to/contribute-to-docs.md" }
{ "title": "Contribute to the documentation", "source": "./documentation/how-to/contribute-to-docs.md" }
]
}
],
Expand All @@ -49,15 +49,14 @@ A `group` is a section header that the documents belong to. In the example above

## Updating API/Reference documentation

To modify the reference documents you need to change the https://github.com/microsoft/tsdoc comments in the actual typescript source files under `src/`.
To modify the reference documents you need to change the [TSDoc comments](https://github.com/microsoft/tsdoc) in the actual typescript source files under `src/`.

```typescript
/**
* Creates a filereader function for fetching the contents of a config
* Creates a file-reader function for fetching the contents of a config
* file at the provided path.
* @param absoluteFilePath absolute path to the configuration file
*/
```

When the `tsdoc` generator runs it will pull this comment into the reference docs for that particular module. In this example we have a function description and a parameter description. The param types and returns are generated from the function definition.

34 changes: 18 additions & 16 deletions documentation/how-to/create-a-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,39 @@ Let's assume you're in a situation where you want to use a global compliance per
1. Create a `.json` configuration file, named anything you want, somewhere on your file system
2. Create a config with 2 rules for your specific use case

```json
{
"rules": [
```json
{
"dependencyName": "express",
"ignore": true,
},
{
"dependencyName": "captain-picard",
"daysUntilExpiration": 100
"rules": [
{
"dependencyName": "express",
"ignore": true,
},
{
"dependencyName": "captain-picard",
"daysUntilExpiration": 100
}
]
}
]
}
```
```

3. Run Rotten Deps by using `rotten-deps --config-path <absolute-path-to-your-config>`. Rotten Deps will attempt to resolve a relative path which is useful if you're keeping it with your project but absolute path is preferred.

You should now see an output that reflects that `express` was ignored as well as not failing if you're other dependencies are within their defined compliance period. If this doesn't work as expected or you have questions feel free to drop us an issue at https://github.com/ominestre/rotten-deps/issues.
You should now see an output that reflects that `express` was ignored as well as not failing if you're other dependencies are within their defined compliance period. If this doesn't work as expected or you have questions feel free to drop us an issue on [our issue board](https://github.com/ominestre/rotten-deps/issues).

## Options

### Rules: Array<Rule>
### Rules: `Array<Rule>`

#### Rule

##### dependencyName: string

This is the exact name of the dependency you are configuraing a rule for.
This is the exact name of the dependency you are configuring a rule for.

##### OPTIONAL ignore: boolean

If this value is set to true then this specific dependency being outdated will not trigger a failure. It will still show up in the report.

##### OPTIONAL daysUntilExpiration: number

This value sets the compliance period, measured in days, for the specific dependency.
This value sets the compliance period, measured in days, for the specific dependency.