File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 88 - prettier
99
1010globals:
11- __DEBUG_SERVER_ERRORS__: true
12- __SERVER_ERRORS__: true
11+ __DEBUG_SERVER_ERRORS__: writable
12+ __SERVER_ERRORS__: writable
1313
1414parserOptions:
1515 # We have @babel/eslint-parser from eslint-config-shakacode, but don't use Babel in the main project
@@ -77,3 +77,23 @@ overrides:
7777 rules:
7878 # Allows Jest mocks before import
7979 import/first: off
80+ - files: "k6/**/*.{js,ts}"
81+ globals:
82+ # See https://github.com/grafana/k6-docs/blob/65d9f8a9a53f57a4f416763f8020d0c7f40eb976/docs/sources/.eslintrc.js
83+ __ENV: readonly
84+ __VU: readonly
85+ __ITER: readonly
86+ console: readonly
87+ open: readonly
88+ window: readonly
89+ setInterval: readonly
90+ clearInterval: readonly
91+ setTimeout: readonly
92+ clearTimeout: readonly
93+ rules:
94+ "import/extensions":
95+ - error
96+ - ignorePackages
97+ "import/no-unresolved":
98+ - error
99+ - { ignore: ["k6.*"] }
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ export const url = (path) => `${__ENV.BASE_URL ?? "http://localhost:3000"}/${pat
22
33/** @type {(envVar: string) => boolean } */
44const envToBoolean = ( envVar ) => {
5- // eslint-disable-next-line no-undef -- __ENV is provided by k6
65 const value = __ENV [ envVar ] ;
76 return ! ! value && [ 'true' , '1' , 'yes' ] . includes ( value . toLowerCase ( ) ) ;
87} ;
Original file line number Diff line number Diff line change 1- /* eslint-disable import/no-unresolved */
21import { check } from 'k6' ;
32import http from 'k6/http' ;
4- /* eslint-enable import/no-unresolved */
53import { defaultOptions , url } from './_util.js' ;
64
75export const options = defaultOptions ( false ) ;
You can’t perform that action at this time.
0 commit comments