Skip to content

Commit cf77bbb

Browse files
authoredJan 12, 2023
deps!: update to new linting rules (#1164)
Updates all deps to the latest versions. Includes new linting rules from `eslint-config-ipfs` that require return types on all methods to prevent tsc creating verbose derived types when we normally meant to specify that a function returns an interface. - ipfs/eslint-config-ipfs#114 - ipfs/eslint-config-ipfs#110 BREAKING CHANGE: all functions and methods need to declare a return type
1 parent 08e46ce commit cf77bbb

File tree

5 files changed

+55
-15
lines changed

5 files changed

+55
-15
lines changed
 

‎package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,19 @@
256256
"electron-mocha-main": "^11.0.3",
257257
"env-paths": "^3.0.0",
258258
"esbuild": "^0.16.1",
259-
"eslint": "^7.32.0",
260-
"eslint-config-ipfs": "^2.1.0",
261-
"eslint-plugin-etc": "^1.1.7",
259+
"eslint": "^8.31.0",
260+
"eslint-config-ipfs": "^3.1.2",
261+
"eslint-plugin-etc": "^2.0.2",
262262
"eslint-plugin-import": "^2.18.0",
263-
"eslint-plugin-jsdoc": "^36.0.8",
263+
"eslint-plugin-jsdoc": "^39.6.4",
264264
"eslint-plugin-node": "^11.1.0",
265-
"eslint-plugin-promise": "^5.1.0",
265+
"eslint-plugin-promise": "^6.1.1",
266266
"execa": "^6.1.0",
267267
"extract-zip": "^2.0.1",
268268
"fs-extra": "^11.1.0",
269269
"gh-pages": "^4.0.0",
270270
"globby": "^13.1.1",
271-
"it-glob": "^1.0.1",
271+
"it-glob": "^2.0.0",
272272
"kleur": "^4.1.4",
273273
"lilconfig": "^2.0.5",
274274
"listr": "~0.14.2",
@@ -301,13 +301,13 @@
301301
"react-native-test-runner": "^5.0.0",
302302
"read-pkg-up": "^9.1.0",
303303
"rimraf": "^3.0.2",
304-
"semantic-release": "^19.0.2",
304+
"semantic-release": "^20.0.2",
305305
"semantic-release-monorepo": "^7.0.5",
306306
"semver": "^7.3.8",
307307
"source-map-support": "^0.5.20",
308308
"strip-bom": "^5.0.0",
309309
"strip-json-comments": "^5.0.0",
310-
"tempy": "^2.0.0",
310+
"tempy": "^3.0.0",
311311
"typedoc": "^0.23.21",
312312
"typedoc-plugin-mdn-links": "^2.0.0",
313313
"typedoc-plugin-missing-exports": "^1.0.0",
@@ -325,7 +325,7 @@
325325
"@types/cors": "^2.8.10",
326326
"@types/diff": "^5.0.2",
327327
"@types/eslint": "^8.4.1",
328-
"@types/fs-extra": "^9.0.10",
328+
"@types/fs-extra": "^11.0.1",
329329
"@types/gh-pages": "^3.0.0",
330330
"@types/listr": "^0.14.2",
331331
"@types/pascalcase": "^1.0.0",

‎src/test/node.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { execa } from 'execa'
22
import path from 'path'
3-
import tempy from 'tempy'
3+
import * as tempy from 'tempy'
44
import merge from 'merge-options'
55
import { fileURLToPath } from 'url'
66

@@ -24,7 +24,7 @@ export default async function testNode (argv, execaOptions) {
2424
? [
2525
'--reporter', 'json',
2626
'--report-dir', '.coverage',
27-
'--temp-directory', tempy.directory(),
27+
'--temp-directory', tempy.temporaryDirectory(),
2828
'--clean',
2929
'mocha'
3030
]

‎test/fixtures/js+ts/tsconfig.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"compilerOptions": {
3+
"strict": true,
4+
// project options
5+
"outDir": "dist",
6+
"allowJs": true,
7+
"checkJs": true,
8+
"target": "ES2020",
9+
"module": "ES2020",
10+
"lib": ["ES2021", "ES2021.Promise", "ES2021.String", "ES2020.BigInt", "DOM", "DOM.Iterable"],
11+
"noEmit": false,
12+
"noEmitOnError": true,
13+
"emitDeclarationOnly": false,
14+
"declaration": true,
15+
"declarationMap": true,
16+
"incremental": true,
17+
"composite": true,
18+
"isolatedModules": true,
19+
"removeComments": false,
20+
"sourceMap": true,
21+
// module resolution
22+
"esModuleInterop": true,
23+
"moduleResolution": "node",
24+
// linter checks
25+
"noImplicitReturns": false,
26+
"noFallthroughCasesInSwitch": true,
27+
"noUnusedLocals": true,
28+
"noUnusedParameters": false,
29+
// advanced
30+
"importsNotUsedAsValues": "error",
31+
"forceConsistentCasingInFileNames": true,
32+
"skipLibCheck": true,
33+
"stripInternal": true,
34+
"resolveJsonModule": true
35+
},
36+
"include": [
37+
"src",
38+
"test"
39+
]
40+
}

‎test/fixtures/projects/a-ts-project/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import derp from 'an-esm-dep'
33
import type { UsedButNotExported } from './a-module.js'
44
import type { EventEmitter } from 'node:events'
55

6-
export const useHerp = () => {
6+
export const useHerp = (): void => {
77
herp()
88
}
99

10-
export const useDerp = () => {
10+
export const useDerp = (): void => {
1111
derp()
1212
}
1313

‎test/utils/set-up-project.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import fs, { copy } from 'fs-extra'
44
import path, { join } from 'path'
5-
import tempy from 'tempy'
5+
import * as tempy from 'tempy'
66
import { fileURLToPath } from 'url'
77

88
const __dirname = path.dirname(fileURLToPath(import.meta.url))
@@ -11,7 +11,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
1111
* @param {string} project
1212
*/
1313
export async function setUpProject (project) {
14-
const projectDir = tempy.directory()
14+
const projectDir = tempy.temporaryDirectory()
1515

1616
await copy(join(__dirname, '..', 'fixtures', 'projects', project), projectDir)
1717
const nodeModulesPath = path.resolve(__dirname, '../../node_modules')

0 commit comments

Comments
 (0)
Please sign in to comment.