Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Commit a49cc10

Browse files
authored
Update ESLint and TypeScript dependencies and config (#90)
* Update eslint dependencies and config * Update CI config * Add .prettierrc.yml
1 parent 0d29384 commit a49cc10

18 files changed

+841
-582
lines changed

.circleci/config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ workflows:
1010
- test-lint:
1111
requires:
1212
- prep-deps
13+
- prep-build
1314
- test-unit:
1415
requires:
1516
- prep-deps
@@ -36,8 +37,8 @@ jobs:
3637
- persist_to_workspace:
3738
root: .
3839
paths:
39-
- node_modules
40-
- build-artifacts
40+
- node_modules
41+
- build-artifacts
4142

4243
test-lint:
4344
docker:
@@ -63,7 +64,7 @@ jobs:
6364
- persist_to_workspace:
6465
root: .
6566
paths:
66-
- dist
67+
- dist
6768

6869
test-unit:
6970
docker:

.eslintrc.js

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,24 @@
11
module.exports = {
22
root: true,
33

4-
parserOptions: {
5-
ecmaVersion: 2017,
6-
},
7-
8-
plugins: [
9-
'json',
10-
'import',
11-
],
4+
plugins: ['import'],
125

13-
extends: [
14-
'@metamask/eslint-config',
15-
'@metamask/eslint-config/config/mocha',
16-
'@metamask/eslint-config/config/nodejs',
17-
'@metamask/eslint-config/config/typescript',
18-
],
6+
extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'],
197

208
rules: {
219
'prefer-object-spread': 'off',
2210
},
2311

24-
overrides: [{
25-
files: [
26-
'*.js',
27-
'*.json',
28-
],
29-
parserOptions: {
30-
sourceType: 'script',
12+
overrides: [
13+
{
14+
files: ['*.ts'],
15+
extends: ['@metamask/eslint-config-typescript'],
3116
},
32-
rules: {
33-
'@typescript-eslint/no-require-imports': 'off',
34-
'@typescript-eslint/no-var-requires': 'off',
17+
{
18+
files: ['test/*'],
19+
extends: ['@metamask/eslint-config-mocha'],
3520
},
36-
}],
37-
38-
ignorePatterns: [
39-
'!.eslintrc.js',
40-
'.nyc*',
41-
'coverage/',
42-
'dist/',
4321
],
22+
23+
ignorePatterns: ['!.eslintrc.js', '.nyc*', 'coverage/', 'dist/'],
4424
};

.gitignore

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,74 @@
1-
### build ###
2-
dist
3-
4-
### misc ###
5-
.nyc*
6-
coverage
7-
8-
# Created by https://www.gitignore.io/api/osx,node
9-
10-
### OSX ###
111
.DS_Store
12-
.AppleDouble
13-
.LSOverride
14-
15-
# Icon must end with two \r
16-
Icon
17-
18-
# Thumbnails
19-
._*
20-
21-
# Files that might appear in the root of a volume
22-
.DocumentRevisions-V100
23-
.fseventsd
24-
.Spotlight-V100
25-
.TemporaryItems
26-
.Trashes
27-
.VolumeIcon.icns
28-
29-
# Directories potentially created on remote AFP share
30-
.AppleDB
31-
.AppleDesktop
32-
Network Trash Folder
33-
Temporary Items
34-
.apdisk
35-
36-
### Node ###
37-
38-
package-lock.json
2+
dist/
3+
coverage/
394

405
# Logs
416
logs
427
*.log
438
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# Diagnostic reports (https://nodejs.org/api/report.html)
14+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
4415

4516
# Runtime data
4617
pids
4718
*.pid
4819
*.seed
49-
50-
# Directory for instrumented libs generated by jscoverage/JSCover
51-
lib-cov
20+
*.pid.lock
5221

5322
# Coverage directory used by tools like istanbul
5423
coverage
24+
*.lcov
5525

56-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
57-
.grunt
26+
# nyc test coverage
27+
.nyc_output
5828

5929
# node-waf configuration
6030
.lock-wscript
6131

62-
# Compiled binary addons (http://nodejs.org/api/addons.html)
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
6333
build/Release
6434

65-
# Dependency directory
66-
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
67-
node_modules
35+
# Dependency directories
36+
node_modules/
37+
38+
# TypeScript cache
39+
*.tsbuildinfo
6840

6941
# Optional npm cache directory
7042
.npm
7143

44+
# Optional eslint cache
45+
.eslintcache
46+
47+
# Microbundle cache
48+
.rpt2_cache/
49+
.rts2_cache_cjs/
50+
.rts2_cache_es/
51+
.rts2_cache_umd/
52+
7253
# Optional REPL history
7354
.node_repl_history
55+
56+
# Output of 'npm pack'
57+
*.tgz
58+
59+
# Yarn Integrity file
60+
.yarn-integrity
61+
62+
# dotenv environment variables file
63+
.env
64+
.env.test
65+
66+
# Stores VSCode versions used for testing VSCode extensions
67+
.vscode-test
68+
69+
# yarn v2
70+
.yarn/cache
71+
.yarn/unplugged
72+
.yarn/build-state.yml
73+
.yarn/install-state.gz
74+
.pnp.*

.prettierrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
quoteProps: consistent
2+
singleQuote: true
3+
trailingComma: all
4+
tabWidth: 2

CHANGELOG.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6262

6363
- Remove `async` and `promise-to-callback` dependencies
6464
- These dependencies were used internally for middleware flow control.
65-
They have been replaced with Promises and native `async`/`await`, which means that some operations are _no longer_ eagerly executed.
66-
This change may affect consumers that depend on the eager execution of middleware _during_ request processing, _outside of_ middleware functions and request handlers.
65+
They have been replaced with Promises and native `async`/`await`, which means that some operations are _no longer_ eagerly executed.
66+
This change may affect consumers that depend on the eager execution of middleware _during_ request processing, _outside of_ middleware functions and request handlers.
6767
- In general, it is a bad practice to work with state that depends on middleware execution, while the middleware are executing.
6868

69-
[Unreleased]:https://github.com/MetaMask/json-rpc-engine/compare/v6.1.0...HEAD
70-
[6.1.0]:https://github.com/MetaMask/json-rpc-engine/compare/v6.0.0...v6.1.0
71-
[6.0.0]:https://github.com/MetaMask/json-rpc-engine/compare/v5.4.0...v6.0.0
72-
[5.4.0]:https://github.com/MetaMask/json-rpc-engine/compare/v5.3.0...v5.4.0
73-
[5.3.0]:https://github.com/MetaMask/json-rpc-engine/compare/v5.2.0...v5.3.0
74-
[5.2.0]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.8...v5.2.0
75-
[5.1.8]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.6...v5.1.8
76-
[5.1.6]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.5...v5.1.6
77-
[5.1.5]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.4...v5.1.5
78-
[5.1.4]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.3...v5.1.4
79-
[5.1.3]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.1...v5.1.3
80-
[5.1.1]:https://github.com/MetaMask/json-rpc-engine/compare/v5.1.0...v5.1.1
81-
[5.1.0]:https://github.com/MetaMask/json-rpc-engine/compare/v5.0.0...v5.1.0
82-
[5.0.0]:https://github.com/MetaMask/json-rpc-engine/compare/v4.0.0...v5.0.0
69+
[unreleased]: https://github.com/MetaMask/json-rpc-engine/compare/v6.1.0...HEAD
70+
[6.1.0]: https://github.com/MetaMask/json-rpc-engine/compare/v6.0.0...v6.1.0
71+
[6.0.0]: https://github.com/MetaMask/json-rpc-engine/compare/v5.4.0...v6.0.0
72+
[5.4.0]: https://github.com/MetaMask/json-rpc-engine/compare/v5.3.0...v5.4.0
73+
[5.3.0]: https://github.com/MetaMask/json-rpc-engine/compare/v5.2.0...v5.3.0
74+
[5.2.0]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.8...v5.2.0
75+
[5.1.8]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.6...v5.1.8
76+
[5.1.6]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.5...v5.1.6
77+
[5.1.5]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.4...v5.1.5
78+
[5.1.4]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.3...v5.1.4
79+
[5.1.3]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.1...v5.1.3
80+
[5.1.1]: https://github.com/MetaMask/json-rpc-engine/compare/v5.1.0...v5.1.1
81+
[5.1.0]: https://github.com/MetaMask/json-rpc-engine/compare/v5.0.0...v5.1.0
82+
[5.0.0]: https://github.com/MetaMask/json-rpc-engine/compare/v4.0.0...v5.0.0

0 commit comments

Comments
 (0)