Skip to content

Commit d70be87

Browse files
committed
Updated packages to their latest version, upgrade to Nest 10 (#36)
* Updated packages to their latest version * Add eslint config file
1 parent d83478e commit d70be87

File tree

11 files changed

+3725
-3162
lines changed

11 files changed

+3725
-3162
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [18, 20]
18+
node-version: [18, 20, 22]
1919

2020
steps:
2121
- uses: actions/checkout@v2

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ It consists of `KoaAdapter` which is basically just mapping between Nest server
77
`NestKoaMiddleware` and `NestKoaFunctionalMiddleware` are interfaces for writing middleware for Nest together with Koa.
88
`koaToNestMiddleware` is an utility function which can convert your old Koa middleware so it can be used in Nest.
99

10+
## Installation
11+
12+
```
13+
npm i nest-koa-adapter
14+
```
15+
1016
## How to use
1117

1218
#### Create application

eslint.config.mjs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin";
2+
import mocha from "eslint-plugin-mocha";
3+
import globals from "globals";
4+
import tsParser from "@typescript-eslint/parser";
5+
import path from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
import js from "@eslint/js";
8+
import { FlatCompat } from "@eslint/eslintrc";
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all
16+
});
17+
18+
export default [{
19+
ignores: ["**/node_modules", "**/coverage", "**/dist", "**/*-min.js", "**/*.min.js"],
20+
}, ...compat.extends(
21+
"plugin:@typescript-eslint/eslint-recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"prettier",
24+
), {
25+
plugins: {
26+
"@typescript-eslint": typescriptEslintEslintPlugin,
27+
mocha,
28+
},
29+
30+
languageOptions: {
31+
globals: {
32+
...globals.node,
33+
...globals.mocha,
34+
},
35+
36+
parser: tsParser,
37+
ecmaVersion: 5,
38+
sourceType: "module",
39+
40+
parserOptions: {
41+
project: "./tsconfig.json",
42+
},
43+
},
44+
45+
rules: {
46+
"@typescript-eslint/interface-name-prefix": "off",
47+
"@typescript-eslint/explicit-function-return-type": "off",
48+
"@typescript-eslint/no-explicit-any": "off",
49+
"@typescript-eslint/no-unused-vars": "off",
50+
},
51+
}];

0 commit comments

Comments
 (0)