Skip to content

Commit

Permalink
fixup! chore(multichain-testing): adapt to eslint v9 flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
iomekam committed Jan 22, 2025
1 parent 6b34373 commit 6593986
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 31 deletions.
61 changes: 34 additions & 27 deletions multichain-testing/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},
languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
},
parser: tsParser,
},

rules: {
"@typescript-eslint/no-unused-vars": ["error", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
}],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
];
},
];
4 changes: 2 additions & 2 deletions multichain-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"type": "module",
"scripts": {
"build": "exit 0",
"lint": "yarn tsc && yarn eslint --flag unstable_config_lookup_from_file .",
"lint-fix": "yarn lint --fix",
"lint": "yarn tsc && yarn eslint .",
"lint-fix": "yarn eslint . --fix",
"test": "echo 'Run specific test suites:\nyarn test:main (needs `make start`)\nyarn test:fast-usdc (needs `make start FILE=config.fusdc.yaml`)'",
"test:main": "ava --config ava.main.config.js",
"test:fast-usdc": "ava --config ava.fusdc.config.js",
Expand Down
3 changes: 1 addition & 2 deletions multichain-testing/tools/e2e-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ const trace = makeTracer('E2ET');
const BLD = '000000ubld';

export const txAbbr = tx => {
// eslint-disable-next-line camelcase
const { txhash, code, height, gas_used } = tx;
// eslint-disable-next-line camelcase

return { txhash, code, height, gas_used };
};

Expand Down

0 comments on commit 6593986

Please sign in to comment.