diff --git a/package.json b/package.json index 2ff143e3..b2cf8fa0 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,6 @@ "nyc": "^15.1.0", "ts-loader": "^9.3.1", "ts-node": "^10.2.1", - "tslint": "^5.20.1", "typedoc": "^0.22.13", "typescript": "^4.6.0", "webpack": "^5.73.0", diff --git a/src/types.d.ts b/src/types.d.ts index 0ace508c..da0a6449 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -4,7 +4,6 @@ import Client from "./Client"; import { getPath, byCodes, byCode } from "./lib"; import { IncomingMessage } from "http"; -// tslint:disable-next-line: no-namespace declare namespace fhirclient { interface RequestWithSession extends IncomingMessage { diff --git a/test/Client.test.ts b/test/Client.test.ts index b0b69064..a861ba5d 100644 --- a/test/Client.test.ts +++ b/test/Client.test.ts @@ -70,7 +70,6 @@ function crossPlatformTest(callback: (env: Adapter) => void) { "works on the server" : new ServerEnv({ session: {} }) }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, () => callback(tests[name])); } @@ -1027,7 +1026,6 @@ describe("FHIR.client", () => { "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -1049,7 +1047,6 @@ describe("FHIR.client", () => { "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -1071,7 +1068,6 @@ describe("FHIR.client", () => { "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -1092,7 +1088,7 @@ describe("FHIR.client", () => { "works in the browser": new BrowserEnv(), "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin + for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -1114,7 +1110,6 @@ describe("FHIR.client", () => { "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -2769,7 +2764,6 @@ describe("FHIR.client", () => { "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -2923,7 +2917,6 @@ describe("FHIR.client", () => { "works on the server" : new ServerEnv() }; - // tslint:disable-next-line:forin for (const name in tests) { it (name, async () => { const client = new Client(tests[name], { serverUrl: mockUrl }); @@ -2932,6 +2925,7 @@ describe("FHIR.client", () => { url: "/Patient/patient-id", includeResponse: true }); + // @ts-ignore expect(result.body).to.include({ id: "patient-id" }); expect(result.response.status).to.equal(200); }); @@ -3052,7 +3046,7 @@ describe("FHIR.client", () => { expect(result.response.status).to.equal(200); expect(result.response.headers.get("x-custom")).to.equal("test"); - expect(result.body).to.equal([ + expect(result.body as any).to.equal([ { resourceType: "Bundle", pageId: 1, diff --git a/test/mocks/HttpResponse.ts b/test/mocks/HttpResponse.ts index ffb67456..089e6885 100644 --- a/test/mocks/HttpResponse.ts +++ b/test/mocks/HttpResponse.ts @@ -14,6 +14,5 @@ export default class HttpResponse Object.assign(this.headers, headers); } - // tslint:disable-next-line:no-empty end(): void {} } diff --git a/test/mocks/Window.ts b/test/mocks/Window.ts index d489eae9..4791516a 100644 --- a/test/mocks/Window.ts +++ b/test/mocks/Window.ts @@ -17,7 +17,6 @@ class History } } -// tslint:disable-next-line:max-classes-per-file export default class Window extends EventEmitter { FHIR: any; diff --git a/tslint.json b/tslint.json deleted file mode 100644 index b8d30d03..00000000 --- a/tslint.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended" - ], - "jsRules": { - "object-literal-sort-keys": false, - "trailing-comma": false, - "no-consecutive-blank-lines": false, - "max-line-length": false, - "no-empty": false - }, - "rules": { - "import-spacing": false, - "ordered-imports": false, - "one-variable-per-declaration": false, - "object-literal-sort-keys": false, - "trailing-comma": false, - "arrow-parens": false, - "object-literal-key-quotes": false, - "one-line": false, - "triple-equals": false, - "no-console": false, - "max-line-length": [true, 200], - "typedef-whitespace": false, - "no-consecutive-blank-lines": false, - "member-ordering": false, - "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"], - "interface-name": false, - "no-bitwise": false, - "curly": false, - "no-var-requires": false, - "forin": false, - "member-access": [true, "no-public"] - }, - "rulesDirectory": [] -} \ No newline at end of file