Skip to content

Commit

Permalink
fixup! 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 21, 2025
1 parent 675172a commit b73a1e1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 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: '^_',
},
],
},
];
},
];
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 => {

const { txhash, code, height, gas_used } = tx;

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

Expand Down

0 comments on commit b73a1e1

Please sign in to comment.