Skip to content

Commit

Permalink
Updated packages to their latest version, upgrade to Nest 10 (#36)
Browse files Browse the repository at this point in the history
* Updated packages to their latest version

* Add eslint config file
  • Loading branch information
seidelmartin authored Jan 13, 2025
1 parent d83478e commit 2173f4f
Show file tree
Hide file tree
Showing 11 changed files with 3,724 additions and 3,161 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [18, 20]
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ It consists of `KoaAdapter` which is basically just mapping between Nest server
`NestKoaMiddleware` and `NestKoaFunctionalMiddleware` are interfaces for writing middleware for Nest together with Koa.
`koaToNestMiddleware` is an utility function which can convert your old Koa middleware so it can be used in Nest.

## Installation

```
npm i nest-koa-adapter
```

## How to use

#### Create application
Expand Down
51 changes: 51 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin";
import mocha from "eslint-plugin-mocha";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["**/node_modules", "**/coverage", "**/dist", "**/*-min.js", "**/*.min.js"],
}, ...compat.extends(
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
), {
plugins: {
"@typescript-eslint": typescriptEslintEslintPlugin,
mocha,
},

languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "module",

parserOptions: {
project: "./tsconfig.json",
},
},

rules: {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
},
}];
Loading

0 comments on commit 2173f4f

Please sign in to comment.