The test then works without problems.
import {spec} from "pactum";
const url = "http://localhost:8080/api";
describe("Configuration data", () => {
test("should get a response with status code 200", async () => {
await spec()
.get(url)
.expectStatus(200);
});
});
parser: '@typescript-eslint/parser'
plugins:
- node
- promise
- import
- '@typescript-eslint'
- no-useless-assign
- eslint-comments
- dollar-sign
- optimize-regex
- const-case
- jest
- jest-formatting
- unicorn
- security
- array-plural
- no-unsafe-regex
- deprecate
- '@delagen/deprecation'
- sonarjs
- regexp
- '@alasdair/max-len'
- 'tsdoc'
extends:
- 'eslint:recommended'
- 'plugin:eslint-comments/recommended'
- 'plugin:promise/recommended'
- 'plugin:node/recommended'
- 'plugin:import/errors'
- 'plugin:import/warnings'
- 'plugin:import/typescript'
- 'plugin:@typescript-eslint/recommended'
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
- 'plugin:jquery/slim'
- 'plugin:jquery/deprecated'
- 'plugin:jest/recommended'
- 'plugin:jest/style'
- 'plugin:jest-formatting/recommended'
- 'plugin:unicorn/recommended'
- 'plugin:security/recommended'
- 'plugin:sonarjs/recommended'
- 'plugin:regexp/recommended'
parserOptions:
ecmaVersion: 2021
ecmaFeatures:
impliedStrict: true
project:
- ./server/tsconfig.json
- ./tests/tsconfig.json
- ./ingest/tsconfig.json
- ./common/tsconfig.json
warnOnUnsupportedTypeScriptVersion: false
reportUnusedDisableDirectives: true
settings:
import/parsers: {'@typescript-eslint/parser': [.ts, .tsx]}
import/resolver: {typescript: {}}
import/extensions: [.js, .ts]
import/ignore: [node_modules]
env:
es2021: true
node: true
jest: true
jest/globals: true
rules:
node/no-deprecated-api: error
node/exports-style: [error, exports]
node/no-unsupported-features/node-builtins: [error, {version: '>=16'}]
node/no-unsupported-features/es-builtins: [error, {version: '>=16'}]
node/no-unsupported-features/es-syntax: [off, {version: '>=16'}]
node/no-missing-import:
- off
- allowModules: [marked]
tryExtensions: [.js, .json]
node/handle-callback-err: error
node/global-require: error
node/no-process-exit: off
'@typescript-eslint/consistent-type-assertions': [warn, {assertionStyle: 'as'}]
'@typescript-eslint/array-type': [warn, {default: array, readonly: array}]
'@alasdair/max-len/max-len':
- warn
- code: 115
ignoreTrailingComments: true
ignoreUrls: true
ignoreStrings: true
ignoreTemplateLiterals: true
ignoreRegExpLiterals: true
no-dupe-class-members: off
'@typescript-eslint/no-dupe-class-members': error
no-buffer-constructor: error
no-redeclare: [off, {builtinGlobals: true}]
'@typescript-eslint/no-redeclare': [error, {builtinGlobals: true}]
no-unused-vars: off
'@typescript-eslint/no-unused-vars': error
no-empty-function: off
'@typescript-eslint/no-empty-function': warn
no-useless-constructor: off
'@typescript-eslint/no-useless-constructor': warn
lines-between-class-members: off
'@typescript-eslint/lines-between-class-members': off
no-undef: error
no-extend-native: error
no-sequences: error
no-new: error
no-bitwise: error
no-unsafe-negation: [warn, {enforceForOrderingRelations: true}]
quotes: [off, double, {avoidEscape: true}]
'@typescript-eslint/quotes': [warn, double, {avoidEscape: true}]
eqeqeq: [error, always]
strict: [error, global]
no-loop-func: off
'@typescript-eslint/no-loop-func': error
no-unused-expressions: off
'@typescript-eslint/no-unused-expressions': warn
max-params: [warn, 4]
max-len: [off, 113]
space-before-function-paren: off
'@typescript-eslint/space-before-function-paren':
- error
- anonymous: never
named: never
asyncArrow: always
space-before-blocks: warn
no-shadow: off
'@typescript-eslint/no-shadow':
- error
- hoist: all
builtinGlobals: true
allow: [$, event, self]
comma-spacing: off
'@typescript-eslint/comma-spacing': [error, {before: false, after: true}]
keyword-spacing: off
'@typescript-eslint/keyword-spacing':
- warn
- before: true
after: false
overrides:
else: {after: true}
return: {after: true}
try: {after: true}
catch: {after: false}
case: {after: true}
const: {after: true}
throw: {after: true}
let: {after: true}
do: {after: true}
of: {after: true}
as: {after: true}
finally: {after: true}
from: {after: true}
import: {after: true}
export: {after: true}
default: {after: true}
no-trailing-spaces: warn
no-implicit-coercion: error
id-length: [warn, {exceptions: [$, i, j, k, x, y, w, h, g]}]
prefer-const: warn
for-direction: error
no-template-curly-in-string: error
consistent-return: [error, {treatUndefinedAsUnspecified: false}]
no-unmodified-loop-condition: error
array-bracket-spacing: [warn, never]
object-curly-spacing: off
'@typescript-eslint/object-curly-spacing': ['warn']
brace-style: off
'@typescript-eslint/brace-style': [warn, stroustrup, {allowSingleLine: true}]
spaced-comment: [warn, always, {markers: [':', '-', '+', '::', '/']}]
no-var: error
block-scoped-var: error
yoda: error
camelcase: [warn, {properties: never}]
comma-dangle: [off, never]
'@typescript-eslint/comma-dangle': [off, {arrays: only-multiline, objects: only-multiline}]
max-depth: [warn, 8]
arrow-parens: error
no-confusing-arrow: [error, {allowParens: false}]
dot-location: [error, property]
no-else-return: error
no-throw-literal: off
'@typescript-eslint/no-throw-literal': error
require-await: off
'@typescript-eslint/require-await': error
no-return-await: off
'@typescript-eslint/return-await': error
dot-notation: off
'@typescript-eslint/dot-notation': off
eol-last: [error, always]
newline-per-chained-call: [error, {ignoreChainWithDepth: 3}]
nonblock-statement-body-position: [warn, beside]
space-infix-ops: off
'@typescript-eslint/space-infix-ops': warn
semi-spacing: error
operator-assignment: [error, always]
object-shorthand: [error, properties, {avoidQuotes: true}]
no-process-exit: off
no-negated-condition: warn
no-constant-condition: [error, {checkLoops: false}]
prefer-destructuring:
- error
- VariableDeclarator: {array: false, object: true}
AssignmentExpression: {array: false, object: false}
- enforceForRenamedProperties: false
no-extra-parens: off
'@typescript-eslint/no-extra-parens': [warn, functions]
no-invalid-this: off
'@typescript-eslint/no-invalid-this': [off, {capIsConstructor: false}]
prefer-template: warn
semi: off
'@typescript-eslint/semi': [error, always]
'@typescript-eslint/explicit-function-return-type': [warn, {allowExpressions: true}]
'@typescript-eslint/method-signature-style': warn
'@typescript-eslint/no-implicit-any-catch': warn
'@typescript-eslint/prefer-includes': warn
'@typescript-eslint/prefer-nullish-coalescing': warn
'@typescript-eslint/prefer-optional-chain': warn
'@typescript-eslint/no-base-to-string': warn
'@typescript-eslint/non-nullable-type-assertion-style': warn
'@typescript-eslint/no-unnecessary-boolean-literal-compare': warn
'@typescript-eslint/prefer-readonly': warn
'@typescript-eslint/prefer-readonly-parameter-types': off
'@typescript-eslint/no-confusing-void-expression': [off, {ignoreArrowShorthand: true}]
'@typescript-eslint/explicit-member-accessibility':
- warn
- accessibility: 'explicit'
overrides:
constructors: 'no-public'
properties: 'explicit'
parameterProperties: 'explicit'
methods: 'no-public'
accessors: 'no-public'
no-multiple-empty-lines: [warn, {max: 2, maxEOF: 1}]
prefer-arrow-callback: warn
array-callback-return: [error, {allowImplicit: true}]
init-declarations: off
'@typescript-eslint/init-declarations': off
func-call-spacing: off
'@typescript-eslint/func-call-spacing': warn
default-param-last: off
'@typescript-eslint/default-param-last': warn
optimize-regex/optimize-regex: off
const-case/uppercase: off
import/no-unresolved: off
import/no-named-as-default: error
import/no-named-as-default-member: error
import/default: error
import/no-deprecated: warn
jest-formatting/padding-around-expect-groups: warn
jest/no-disabled-tests: off
array-plural/array-plural:
- off
- allows:
- ignore
- array
- list
- match
- count
- table
unicorn/no-keyword-prefix: [warn, {checkProperties: false}]
unicorn/prefer-array-some: warn
unicorn/prefer-default-parameters: warn
unicorn/prefer-array-index-of: warn
unicorn/prefer-regexp-test: warn
unicorn/consistent-destructuring: warn
unicorn/prefer-string-starts-ends-with: warn
'@typescript-eslint/prefer-string-starts-ends-with': warn
unicorn/numeric-separators-style: [error, number: {onlyIfContainsSeparator: true, minimumDigits: 3}]
unicorn/no-console-spaces: warn
unicorn/prefer-string-replace-all: warn
unicorn/prevent-abbreviations:
- warn
- replacements:
len: false
params: false
doc: false
pkg: false
ctx: false
i: false
j: false
idx: false
args: false
dir: false
checkFilenames: false
promise/catch-or-return: [error, {allowFinally: true}]
dollar-sign/dollar-sign: [warn, ignoreProperties]
no-useless-assign/no-useless-assign: warn
deprecate/function: warn
deprecate/member-expression: warn
deprecate/import: warn
'@delagen/deprecation/deprecation': warn
no-unsafe-regex/no-unsafe-regex: error
'@typescript-eslint/member-delimiter-style': warn
tsdoc/syntax: warn
no-loss-of-precision: off
'@typescript-eslint/no-loss-of-precision': error
no-magic-numbers: [off, {ignoreArrayIndexes: true, ignore: [0]}]
'@typescript-eslint/no-magic-numbers': [off, {ignoreArrayIndexes: true, ignore: [0]}]
promise/always-return: off
linebreak-style: [off, windows]
no-tabs: off
one-var: [off, always]
no-mixed-spaces-and-tabs: off
no-multi-spaces: off
no-plusplus: [off, {allowForLoopAfterthoughts: true}]
no-console: off
unicorn/filename-case: [off, {case: camelCase}]
node/no-missing-require: off
node/no-unpublished-require: off
node/no-unpublished-import: off
unicorn/throw-new-error: 0
unicorn/new-for-builtins: 0
unicorn/no-process-exit: 0
unicorn/prefer-query-selector: 0
unicorn/consistent-function-scoping: 0
unicorn/no-for-loop: 0
unicorn/no-useless-undefined: 0
unicorn/no-array-reduce: 0
security/detect-non-literal-fs-filename: 0
security/detect-object-injection: 0
unicorn/prefer-node-protocol: warn
'@typescript-eslint/interface-name-prefix': 0
indent: [off, tab]
'@typescript-eslint/indent': [off, tab]
no-use-before-define: off
'@typescript-eslint/no-use-before-define': off
'@typescript-eslint/no-non-null-assertion': off
sonarjs/cognitive-complexity: [warn, 50]
sonarjs/no-duplicate-string: [off, 6]
sonarjs/elseif-without-else: 0
sonarjs/no-nested-switch: 0
unicorn/better-regex: 0
unicorn/prefer-json-parse-buffer: 0