Skip to content

Commit 82f7f3a

Browse files
authored
fix: update timeout from 10s to 60s (#331)
* fix: update timeout from 10s to 60s * update * update * update * fix
1 parent 9b46cb2 commit 82f7f3a

File tree

8 files changed

+90
-83
lines changed

8 files changed

+90
-83
lines changed

.changeset/orange-squids-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-json-schema-validator": patch
3+
---
4+
5+
fix: update timeout from 10s to 60s

.github/workflows/Release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
node-version: 18
2323

2424
- name: Install Dependencies
25-
run: npm install --legacy-peer-deps
25+
run: yarn --ignore-engines
2626
- name: Build
27-
run: npm run build
27+
run: yarn build
2828

2929
- name: Create Release Pull Request or Publish to npm
3030
id: changesets
3131
uses: changesets/action@v1
3232
with:
3333
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
34-
version: npm run version:ci
34+
version: yarn version:ci
3535
# This expects you to have a script called release which does a build for your packages and calls changeset publish
36-
publish: npm run release
36+
publish: yarn release
3737
commit: "chore: release eslint-plugin-json-schema-validator"
3838
title: "chore: release eslint-plugin-json-schema-validator"
3939
env:

.github/workflows/format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- name: Setup node
1414
uses: actions/setup-node@v4
1515
- name: Install deps
16-
run: npm install
16+
run: yarn --ignore-engines
1717
- name: Format
18-
run: npm run lint-fix
18+
run: yarn lint-fix
1919
- name: Commit
2020
run: |
2121
git config --local user.email "github-actions[bot]@users.noreply.github.com"

README.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ Use `eslint.config.js` file to configure rules. See also: <https://eslint.org/do
5050
Example **eslint.config.js**:
5151

5252
```js
53-
import eslintPluginJsonSchemaValidator from 'eslint-plugin-json-schema-validator';
53+
import eslintPluginJsonSchemaValidator from "eslint-plugin-json-schema-validator";
5454
export default [
5555
// add more generic rule sets here, such as:
5656
// js.configs.recommended,
57-
...eslintPluginJsonSchemaValidator.configs['flat/recommended'],
57+
...eslintPluginJsonSchemaValidator.configs["flat/recommended"],
5858
{
5959
rules: {
6060
// override/add rules settings here, such as:
6161
// 'json-schema-validator/no-invalid': 'warn'
62-
}
63-
}
62+
},
63+
},
6464
];
6565
```
6666

@@ -80,13 +80,13 @@ module.exports = {
8080
extends: [
8181
// add more generic rulesets here, such as:
8282
// 'eslint:recommended',
83-
'plugin:json-schema-validator/recommended'
83+
"plugin:json-schema-validator/recommended",
8484
],
8585
rules: {
8686
// override/add rules settings here, such as:
8787
// 'json-schema-validator/no-invalid': 'error'
88-
}
89-
}
88+
},
89+
};
9090
```
9191

9292
This plugin provides configs:
@@ -117,15 +117,15 @@ Example **.vscode/settings.json**:
117117

118118
```json
119119
{
120-
"eslint.validate": [
121-
"javascript",
122-
"javascriptreact",
123-
"json",
124-
"jsonc",
125-
"json5",
126-
"yaml",
127-
"toml"
128-
]
120+
"eslint.validate": [
121+
"javascript",
122+
"javascriptreact",
123+
"json",
124+
"jsonc",
125+
"json5",
126+
"yaml",
127+
"toml"
128+
]
129129
}
130130
```
131131

@@ -137,6 +137,7 @@ Example **.vscode/settings.json**:
137137
<!--RULES_SECTION_START-->
138138

139139
<!-- The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench :wrench: below. -->
140+
140141
The rules with the following star :star: are included in the configs.
141142

142143
<!--RULES_TABLE_START-->
@@ -169,10 +170,10 @@ module.exports = {
169170
http: {
170171
getModulePath: "",
171172
requestOptions: {},
172-
}
173-
}
174-
}
175-
}
173+
},
174+
},
175+
},
176+
};
176177
```
177178

178179
- `http` ... Settings to resolve schema URLs.
@@ -186,22 +187,22 @@ Example of using the `request` module for HTTP requests.
186187
**`./path/to/request-get.js`**:
187188

188189
```js
189-
const request = require("request")
190+
const request = require("request");
190191

191192
/**
192193
* GET Method using request module.
193194
*/
194195
module.exports = function get(url, options) {
195-
return new Promise((resolve, reject) => {
196-
request.get(url, options, (error, _res, body) => {
197-
if (error) {
198-
reject(error)
199-
return
200-
}
201-
resolve(body)
202-
})
203-
})
204-
}
196+
return new Promise((resolve, reject) => {
197+
request.get(url, options, (error, _res, body) => {
198+
if (error) {
199+
reject(error);
200+
return;
201+
}
202+
resolve(body);
203+
});
204+
});
205+
};
205206
```
206207

207208
**.eslintrc.js**:
@@ -216,12 +217,12 @@ module.exports = {
216217
getModulePath: require.resolve("./path/to/request-get.js"),
217218
requestOptions: {
218219
// Example of proxy settings.
219-
proxy: "http://my.proxy.com:8080/"
220+
proxy: "http://my.proxy.com:8080/",
220221
},
221-
}
222-
}
223-
}
224-
}
222+
},
223+
},
224+
},
225+
};
225226
```
226227

227228
<!--ADVANCED_USAGE_GUIDE_END-->
@@ -234,8 +235,8 @@ Please use GitHub's Issues/PRs.
234235

235236
### Development Tools
236237

237-
- `npm test` runs tests and measures coverage.
238-
- `npm run update` runs in order to update readme and recommended configuration.
238+
- `yarn test` runs tests and measures coverage.
239+
- `yarn update` runs in order to update readme and recommended configuration.
239240

240241
### Working With Rules
241242

docs/user-guide/index.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ Use `eslint.config.js` file to configure rules. See also: <https://eslint.org/do
2525
Example **eslint.config.js**:
2626

2727
```js
28-
import eslintPluginJsonSchemaValidator from 'eslint-plugin-json-schema-validator';
28+
import eslintPluginJsonSchemaValidator from "eslint-plugin-json-schema-validator";
2929
export default [
3030
// add more generic rule sets here, such as:
3131
// js.configs.recommended,
32-
...eslintPluginJsonSchemaValidator.configs['flat/recommended'],
32+
...eslintPluginJsonSchemaValidator.configs["flat/recommended"],
3333
{
3434
rules: {
3535
// override/add rules settings here, such as:
3636
// 'json-schema-validator/no-invalid': 'warn'
37-
}
38-
}
37+
},
38+
},
3939
];
4040
```
4141

@@ -55,13 +55,13 @@ module.exports = {
5555
extends: [
5656
// add more generic rulesets here, such as:
5757
// 'eslint:recommended',
58-
'plugin:json-schema-validator/recommended'
58+
"plugin:json-schema-validator/recommended",
5959
],
6060
rules: {
6161
// override/add rules settings here, such as:
6262
// 'json-schema-validator/no-invalid': 'error'
63-
}
64-
}
63+
},
64+
};
6565
```
6666

6767
This plugin provides configs:
@@ -92,15 +92,15 @@ Example **.vscode/settings.json**:
9292

9393
```json
9494
{
95-
"eslint.validate": [
96-
"javascript",
97-
"javascriptreact",
98-
"json",
99-
"jsonc",
100-
"json5",
101-
"yaml",
102-
"toml"
103-
]
95+
"eslint.validate": [
96+
"javascript",
97+
"javascriptreact",
98+
"json",
99+
"jsonc",
100+
"json5",
101+
"yaml",
102+
"toml"
103+
]
104104
}
105105
```
106106

@@ -123,10 +123,10 @@ module.exports = {
123123
http: {
124124
getModulePath: "",
125125
requestOptions: {},
126-
}
127-
}
128-
}
129-
}
126+
},
127+
},
128+
},
129+
};
130130
```
131131

132132
- `http` ... Settings to resolve schema URLs.
@@ -140,22 +140,22 @@ Example of using the `request` module for HTTP requests.
140140
**`./path/to/request-get.js`**:
141141

142142
```js
143-
const request = require("request")
143+
const request = require("request");
144144

145145
/**
146146
* GET Method using request module.
147147
*/
148148
module.exports = function get(url, options) {
149-
return new Promise((resolve, reject) => {
150-
request.get(url, options, (error, _res, body) => {
151-
if (error) {
152-
reject(error)
153-
return
154-
}
155-
resolve(body)
156-
})
157-
})
158-
}
149+
return new Promise((resolve, reject) => {
150+
request.get(url, options, (error, _res, body) => {
151+
if (error) {
152+
reject(error);
153+
return;
154+
}
155+
resolve(body);
156+
});
157+
});
158+
};
159159
```
160160

161161
**.eslintrc.js**:
@@ -170,12 +170,12 @@ module.exports = {
170170
getModulePath: require.resolve("./path/to/request-get.js"),
171171
requestOptions: {
172172
// Example of proxy settings.
173-
proxy: "http://my.proxy.com:8080/"
173+
proxy: "http://my.proxy.com:8080/",
174174
},
175-
}
176-
}
177-
}
178-
}
175+
},
176+
},
177+
},
178+
};
179179
```
180180

181181
<!--ADVANCED_USAGE_GUIDE_END-->

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
"eslint-plugin-toml": "^0.11.0",
9797
"eslint-plugin-vue": "^9.0.0",
9898
"eslint-plugin-yml": "^1.0.0",
99-
"espree": "^10.0.0",
10099
"events": "^3.3.0",
101100
"mocha": "^10.0.0",
102101
"monaco-editor": "^0.49.0",
@@ -119,5 +118,6 @@
119118
},
120119
"publishConfig": {
121120
"access": "public"
122-
}
121+
},
122+
"packageManager": "[email protected]"
123123
}

src/utils/http-client/get-modules/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import http from "http";
44
// @ts-expect-error -- no types
55
import tunnel from "tunnel-agent";
66

7-
const TIMEOUT = 10000;
7+
const TIMEOUT = 60000;
88

99
/**
1010
* GET Method using http modules.

src/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ function compositingVisitors(
146146
for (const v of visitors) {
147147
for (const key in v) {
148148
if (visitor[key]) {
149+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- false positive?
149150
const o = visitor[key]!;
150151
visitor[key] = (...args) => {
151152
o(...args);

0 commit comments

Comments
 (0)