-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v5' into port_283_fix_to_v5
* v5: Apply lint fixes. Extend prettier plugin, rather than config. Run validations on v5 branch Run validations on v5 branch Run validations on v5 branch Run validations on v5 branch changes from linter changes from formatter updates to eslint and prettier tooling # Conflicts: # lib/__tests__/cookieJar.spec.ts # lib/memstore.ts
- Loading branch information
Showing
51 changed files
with
16,333 additions
and
5,133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
dist | ||
node_modules | ||
test | ||
jest.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
{ | ||
"extends": ["plugin:prettier/recommended"], | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
//"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6 | ||
"tsconfigRootDir": "./", | ||
"project": ["tsconfig.json"] | ||
}, | ||
"reportUnusedDisableDirectives": true, | ||
"rules": { | ||
"no-debugger": "error", | ||
"no-var": "error", | ||
"prefer-arrow-callback": "error", | ||
"prefer-const": "error", | ||
"prefer-template": "error", | ||
"no-restricted-modules": ["error", | ||
// we can't rely on node standard modules in "native" or "browser" environments | ||
// - exceptions: | ||
// "punycode": since it's a package.json dependency | ||
"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" | ||
] | ||
// 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 | ||
"prefer-rest-params": "warn", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
|
||
// used by callSync which needs to use Function because it's used by several apis | ||
"@typescript-eslint/ban-types": "warn", | ||
|
||
// there are several areas that still have ts-ignore comments, let's try to eliminate those | ||
"@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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
name: Actions-CI | ||
name: Actions-CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master, v5] | ||
pull_request: | ||
branches: [ master ] | ||
branches: [master, v5] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
node-version: [latest, lts/*, lts/-1] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Install dependencies and test | ||
run: npm install | ||
- run: npm test | ||
- run: npm run eslint | ||
- run: npm run prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
lib/version.js | ||
dist/*.js | ||
dist | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { JestConfigWithTsJest } from "ts-jest"; | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
rootDir: './lib/', | ||
testPathIgnorePatterns: ['./lib/__tests__/data/'], | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.