Skip to content

Commit

Permalink
Add docs and changelog for new minor release (#71)
Browse files Browse the repository at this point in the history
* add documentation for new change

* Change files

* bump minor version

---------

Co-authored-by: Anmol Shrestha <[email protected]>
  • Loading branch information
anmolshres98 and anmolshres98 authored Jun 17, 2024
1 parent 2114521 commit 7eff7fb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@itwin/eslint-plugin",
"entries": [
{
"date": "Mon, 17 Jun 2024 20:27:49 GMT",
"version": "4.1.0",
"tag": "@itwin/eslint-plugin_v4.1.0",
"comments": {
"minor": [
{
"author": "[email protected]",
"package": "@itwin/eslint-plugin",
"commit": "a5372db788c2ad940b3e3641666e869dffda2769",
"comment": "Add new custom formatter for 'no-internal' rule violations that creates a summary table with report of all violations and writes the table to a csv file."
}
]
}
},
{
"date": "Wed, 08 May 2024 15:56:58 GMT",
"version": "4.0.2",
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @itwin/eslint-plugin

This log was last generated on Wed, 08 May 2024 15:56:58 GMT and should not be manually modified.
This log was last generated on Mon, 17 Jun 2024 20:27:49 GMT and should not be manually modified.

<!-- Start content -->

## 4.1.0

Mon, 17 Jun 2024 20:27:49 GMT

### Minor changes

- Add new custom formatter for 'no-internal' rule violations that creates a summary table with report of all violations and writes the table to a csv file. ([email protected])

## 4.0.2

Wed, 08 May 2024 15:56:58 GMT
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,13 @@ This command forwards all arguments to eslint, so it can be further customized a
},

```
In addition to this we also have a custom formatter that can be used to generate a summary table report of the no-internal violations in your codebase.

It creates a easily readable summary table of all your violations. For example:
![Summary Table](./images/no-internal-summary-table.png)

In addition, this also creates a csv with the same table in the current working directory. You can call it like this:
```sh
eslint ./**/*.{ts,tsx} 1>&2 -f ./node_modules/@itwin/eslint-plugin/dist/formatters/no-internal-summary-with-table.js
```
If you want to import the table creator directly into your code and acquire the string before printing, you can do so by importing the function `noInternalSummaryTableCreator` from `@itwin/eslint-plugin` package, then pass in the [Message[]](https://github.com/evanw/esbuild/blob/fc37c2fa9de2ad77476a6d4a8f1516196b90187e/lib/shared/types.ts#L180) type objects or directly pass in the [LintResult[]](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/24f12f9d70f49911bae646eb8d864ea48b45fae1/types/eslint/index.d.ts#L1412) objects you get when calling [`eslint.lintFiles()`](https://eslint.org/docs/latest/integrate/nodejs-api#-eslintlintfilespatterns).
Binary file added images/no-internal-summary-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itwin/eslint-plugin",
"version": "4.0.2",
"version": "4.1.0",
"description": "ESLint plugin with default configuration and custom rules for iTwin.js projects",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 7eff7fb

Please sign in to comment.