Skip to content

Commit

Permalink
chore: eslint typescript resolver related minors (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss authored Sep 5, 2024
1 parent 65340a9 commit cf97d99
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 17 deletions.
7 changes: 3 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/* eslint-disable import-x/no-extraneous-dependencies */
import eslint from '@eslint/js';
// eslint-disable-next-line import-x/no-unresolved
import tseslint from 'typescript-eslint';
import { configs, config } from 'typescript-eslint';
import eslintPluginImportX from 'eslint-plugin-import-x';
import jest from 'eslint-plugin-jest';

/* eslint-disable @typescript-eslint/naming-convention */

export default tseslint.config(
export default config(
eslint.configs.recommended,
...tseslint.configs.strict,
...configs.strict,
eslintPluginImportX.flatConfigs.recommended,
eslintPluginImportX.flatConfigs.typescript,
{
Expand Down
102 changes: 93 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@
"@types/supertest": "^6.0.2",
"@types/xml2js": "^0.4.14",
"eslint": "^9.9.1",
"eslint-plugin-import-x": "^4.1.1",
"eslint-plugin-jest": "^28.8.2",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.2.1",
"eslint-plugin-jest": "^28.8.3",
"husky": "^9.1.5",
"is-ci": "~3.0.1",
"jest": "^29.7.0",
Expand Down
4 changes: 2 additions & 2 deletions src/misc/services/xml.service.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Injectable } from '@nestjs/common';
import xml2js from 'xml2js';
import { parseStringPromise } from 'xml2js';

@Injectable()
export class XmlService {
public parse(xml: string): Promise<string> {
const resolved = this.resolveExternalEntities(xml);

return xml2js.parseStringPromise(resolved);
return parseStringPromise(resolved);
}

private resolveExternalEntities(xml: string): string {
Expand Down

0 comments on commit cf97d99

Please sign in to comment.