Skip to content

Commit

Permalink
Add and configure ESLint (because Codacy)
Browse files Browse the repository at this point in the history
  • Loading branch information
rblaine95 committed Aug 1, 2024
1 parent 3c41e3f commit 3696427
Show file tree
Hide file tree
Showing 12 changed files with 1,236 additions and 216 deletions.
20 changes: 20 additions & 0 deletions scripts/k6/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import globals from "globals";

export default [
{
languageOptions: {
globals: globals.browser,
},
rules: {
"import/no-unresolved": 0,
"no-restricted-globals": 0,
"import/extensions": 0,
"no-prototype-builtins": 0,
"no-undef": 0,
"no-console": 0,
camelcase: 0,
semi: 1,
quotes: 2,
},
},
];
4 changes: 0 additions & 4 deletions scripts/k6/libs/auth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* global __ENV, __ITER, __VU */
/* eslint no-undef: "error" */
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */

import http from "k6/http";

export function getBearerToken() {
Expand Down
4 changes: 0 additions & 4 deletions scripts/k6/libs/functions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* global __ENV, __ITER, __VU, console */
/* eslint no-undef: "error" */
/* eslint no-console: ["error", { allow: ["warn", "error", "log"] }] */

import { check, sleep } from "k6";
import http from "k6/http";
import { Counter, Trend } from "k6/metrics";
Expand Down
8 changes: 2 additions & 6 deletions scripts/k6/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* global __ENV, __ITER, __VU */
/* eslint no-undef: "error" */
/* eslint no-console: ["error", { allow: ["warn", "error", "log"] }] */

import { check } from "k6";
import { SharedArray } from "k6/data";
import { Counter, Trend } from "k6/metrics";
Expand Down Expand Up @@ -48,8 +44,8 @@ const wallets = new SharedArray("wallets", () => {
const walletsArray = [];
for (let i = 0; i < options.iterations; i++) {
walletsArray.push({
wallet_label: `xk6 holder ${i}`, // eslint-disable-line camelcase
wallet_name: `xk6_wallet_${i}`, // eslint-disable-line camelcase
wallet_label: `xk6 holder ${i}`,
wallet_name: `xk6_wallet_${i}`,
});
}
return walletsArray;
Expand Down
Loading

0 comments on commit 3696427

Please sign in to comment.