Skip to content

Commit aeca071

Browse files
build(estlint): remove ESLint configuration files and update documentation formatting
1 parent 72897e5 commit aeca071

File tree

19 files changed

+158
-160
lines changed

19 files changed

+158
-160
lines changed

.eslintignore

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

.eslintrc.json

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

.github/linters/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@
99
"skipLibCheck": true,
1010
"moduleResolution": "NodeNext"
1111
},
12-
"include": ["src/**/*.ts"],
13-
"exclude": ["node_modules"]
12+
"include": ["src/**/*.ts"]
1413
}

dist/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { replaceInFile } from "replace-in-file";
33
* Wraps the `callback` in a new function that passes the `context` as the
44
* final argument to the `callback` when it gets called.
55
*/
6-
// eslint-disable-next-line @typescript-eslint/ban-types
76
function applyContextToCallback(callback, context) {
8-
// eslint-disable-next-line prefer-spread
97
return (...args) => callback.apply(null, args.concat(context));
108
}
119
/**
@@ -123,7 +121,10 @@ function deepEqual(a, b) {
123121
*/
124122
function deepDiff(obj1, obj2, path = "") {
125123
let differences = [];
126-
if (typeof obj1 !== "object" || typeof obj2 !== "object" || obj1 === null || obj2 === null) {
124+
if (typeof obj1 !== "object" ||
125+
typeof obj2 !== "object" ||
126+
obj1 === null ||
127+
obj2 === null) {
127128
if (obj1 !== obj2) {
128129
differences.push(`Difference at ${path}: ${obj1} !== ${obj2}`);
129130
}

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**semantic-release-replace-plugin**
22

3-
***
3+
---
44

55
# semantic-release-replace-plugin
66

docs/functions/prepare.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[**semantic-release-replace-plugin**](../README.md)
22

3-
***
3+
---
44

55
[semantic-release-replace-plugin](../README.md) / prepare
66

77
# Function: prepare()
88

99
> **prepare**(`PluginConfig`, `context`): `Promise`\<`void`\>
1010
11-
Defined in: [index.ts:306](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L306)
11+
Defined in: [index.ts:314](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L314)
1212

1313
## Parameters
1414

docs/interfaces/PluginConfig.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[**semantic-release-replace-plugin**](../README.md)
22

3-
***
3+
---
44

55
[semantic-release-replace-plugin](../README.md) / PluginConfig
66

77
# Interface: PluginConfig
88

9-
Defined in: [index.ts:111](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L111)
9+
Defined in: [index.ts:111](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L111)
1010

1111
PluginConfig is used to provide multiple replacement.
1212

@@ -40,6 +40,6 @@ PluginConfig is used to provide multiple replacement.
4040

4141
> **replacements**: [`Replacement`](Replacement.md)[]
4242
43-
Defined in: [index.ts:113](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L113)
43+
Defined in: [index.ts:113](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L113)
4444

4545
An array of replacements to be made.

docs/interfaces/Replacement.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[**semantic-release-replace-plugin**](../README.md)
22

3-
***
3+
---
44

55
[semantic-release-replace-plugin](../README.md) / Replacement
66

77
# Interface: Replacement
88

9-
Defined in: [index.ts:19](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L19)
9+
Defined in: [index.ts:19](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L19)
1010

1111
Replacement is similar to the interface used by https://www.npmjs.com/package/replace-in-file
1212
with the difference being the single string for `to` and `from`.
@@ -17,57 +17,57 @@ with the difference being the single string for `to` and `from`.
1717

1818
> `optional` **allowEmptyPaths**: `boolean`
1919
20-
Defined in: [index.ts:68](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L68)
20+
Defined in: [index.ts:68](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L68)
2121

22-
***
22+
---
2323

2424
### countMatches?
2525

2626
> `optional` **countMatches**: `boolean`
2727
28-
Defined in: [index.ts:69](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L69)
28+
Defined in: [index.ts:69](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L69)
2929

30-
***
30+
---
3131

3232
### disableGlobs?
3333

3434
> `optional` **disableGlobs**: `boolean`
3535
36-
Defined in: [index.ts:70](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L70)
36+
Defined in: [index.ts:70](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L70)
3737

38-
***
38+
---
3939

4040
### dry?
4141

4242
> `optional` **dry**: `boolean`
4343
44-
Defined in: [index.ts:72](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L72)
44+
Defined in: [index.ts:72](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L72)
4545

46-
***
46+
---
4747

4848
### encoding?
4949

5050
> `optional` **encoding**: `string`
5151
52-
Defined in: [index.ts:71](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L71)
52+
Defined in: [index.ts:71](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L71)
5353

54-
***
54+
---
5555

5656
### files
5757

5858
> **files**: `string`[]
5959
60-
Defined in: [index.ts:23](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L23)
60+
Defined in: [index.ts:23](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L23)
6161

6262
files to search for replacements
6363

64-
***
64+
---
6565

6666
### from
6767

6868
> **from**: [`From`](../type-aliases/From.md) \| [`From`](../type-aliases/From.md)[]
6969
70-
Defined in: [index.ts:39](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L39)
70+
Defined in: [index.ts:39](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L39)
7171

7272
The RegExp pattern to use to match.
7373

@@ -83,21 +83,21 @@ functions, etc.
8383
Multiple matchers may be provided as an array, following the same
8484
conversion rules as mentioned above.
8585

86-
***
86+
---
8787

8888
### ignore?
8989

9090
> `optional` **ignore**: `string`[]
9191
92-
Defined in: [index.ts:67](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L67)
92+
Defined in: [index.ts:67](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L67)
9393

94-
***
94+
---
9595

9696
### results?
9797

9898
> `optional` **results**: `object`[]
9999
100-
Defined in: [index.ts:77](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L77)
100+
Defined in: [index.ts:77](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L77)
101101

102102
The results array can be passed to ensure that the expected replacements
103103
have been made, and if not, throw and exception with the diff.
@@ -118,13 +118,13 @@ have been made, and if not, throw and exception with the diff.
118118

119119
> `optional` **numReplacements**: `number`
120120
121-
***
121+
---
122122

123123
### to
124124

125125
> **to**: [`To`](../type-aliases/To.md) \| [`To`](../type-aliases/To.md)[]
126126
127-
Defined in: [index.ts:66](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L66)
127+
Defined in: [index.ts:66](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L66)
128128

129129
The replacement value using a template of variables.
130130

@@ -134,6 +134,7 @@ The context object is used to render the template. Additional values
134134
can be found at: https://semantic-release.gitbook.io/semantic-release/developer-guide/js-api#result
135135

136136
For advanced replacement (NOTE: only for use with `release.config.js` file version), pass in a function to replace non-standard variables
137+
137138
```
138139
{
139140
from: `__VERSION__ = 11`, // eslint-disable-line

docs/type-aliases/From.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[**semantic-release-replace-plugin**](../README.md)
22

3-
***
3+
---
44

55
[semantic-release-replace-plugin](../README.md) / From
66

77
# Type Alias: From
88

99
> **From**: [`FromCallback`](FromCallback.md) \| `RegExp` \| `string`
1010
11-
Defined in: [index.ts:7](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L7)
11+
Defined in: [index.ts:7](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L7)

docs/type-aliases/FromCallback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[**semantic-release-replace-plugin**](../README.md)
22

3-
***
3+
---
44

55
[semantic-release-replace-plugin](../README.md) / FromCallback
66

77
# Type Alias: FromCallback()
88

99
> **FromCallback**: (`filename`, ...`args`) => `RegExp` \| `string`
1010
11-
Defined in: [index.ts:8](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/3c967f53ff3edf273839579fb756410beeb0ef7d/src/index.ts#L8)
11+
Defined in: [index.ts:8](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin/blob/72897e5fd6a629573f597e0e200d3cdd145a96b9/src/index.ts#L8)
1212

1313
## Parameters
1414

0 commit comments

Comments
 (0)