Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// @ts-check

import { configs } from "@js-soft/eslint-config-ts"
import { globalIgnores } from "eslint/config"
import tseslint from "typescript-eslint"

export default tseslint.config(globalIgnores(["**/dist", "**/node_modules"]), {
extends: [configs.base, configs.mocha],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json", "example/tsconfig.json"]
}
},
files: ["**/*.ts"],
rules: {
"no-console": "off",
"jest/expect-expect": "off"
}
})
10 changes: 5 additions & 5 deletions example/test/test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function sleep(ms: number = 500): Promise<void> {
function sleep(ms = 500): Promise<void> {
if (ms <= 0) throw new Error("Please enter a positive value greater than 0.")

return new Promise((resolve) => {
Expand All @@ -16,11 +16,11 @@ describe("Long running tests", function () {

const testVar = process.env.TEST_VAR
describe("env var mounting", function () {
it("should mount env vars on the root", async function () {
if (testVar != "test") throw new Error("TEST_VAR is not set to 'test'")
it("should mount env vars on the root", function () {
if (testVar !== "test") throw new Error("TEST_VAR is not set to 'test'")
})

it("should mount env vars", async function () {
if (process.env.TEST_VAR != "test") throw new Error("TEST_VAR is not set to 'test'")
it("should mount env vars", function () {
if (process.env.TEST_VAR !== "test") throw new Error("TEST_VAR is not set to 'test'")
})
})
1 change: 1 addition & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"strictNullChecks": true,
"lib": ["es2015", "dom"],
"baseUrl": "."
}
Expand Down
Loading