Skip to content

Commit

Permalink
Merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
colincasey committed Apr 17, 2023
2 parents c42cf1c + 2bc6217 commit 49aa487
Show file tree
Hide file tree
Showing 23 changed files with 2,740 additions and 562 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
node_modules
test
jest.config.ts
50 changes: 8 additions & 42 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
//"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": "./",
"project": ["tsconfig.json"]
},
"reportUnusedDisableDirectives": true,
"rules": {
// our parser is written with control characters
"no-control-regex": "off",

// this is only needed because `createPromiseCallback` uses arguments to support the callback-style api
// we should strongly consider dropping the callback and sync api variants (in say v6) to reduce the
// surface area and complexity of tough-cookie
Expand All @@ -22,44 +26,6 @@
"@typescript-eslint/ban-ts-comment": "warn",

// i'd like to clean up all usages of any but the current api is just too loose
"@typescript-eslint/no-explicit-any": "warn",

// we can't rely on node standard modules in "native" or "browser" environments
// - except "punycode" (since it's a package.json dependency)
"no-restricted-modules": [
"error",
"assert",
"buffer",
"child_process",
"cluster",
"crypto",
"dgram",
"dns",
"domain",
"events",
"freelist",
"fs",
"http",
"https",
"module",
"net",
"os",
"path",
"querystring",
"readline",
"repl",
"smalloc",
"stream",
"string_decoder",
"sys",
"timers",
"tls",
"tracing",
"tty",
"url",
"util",
"vm",
"zlib"
]
"@typescript-eslint/no-explicit-any": "warn"
}
}
11 changes: 3 additions & 8 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
import type { JestConfigWithTsJest } from 'ts-jest'
import type { JestConfigWithTsJest } from "ts-jest";

const config: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.ts$',
testPathIgnorePatterns: ['dist'],
maxWorkers: 1,
globals: {
'*.ts': ['ts-jest', { isolatedModules: false }],
},
rootDir: './lib/',
testPathIgnorePatterns: ['./lib/__tests__/data/'],
}

export default config
Loading

0 comments on commit 49aa487

Please sign in to comment.