Skip to content

Commit

Permalink
chore: update ESLint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Nov 8, 2024
1 parent cc9b5f7 commit 4e521c8
Show file tree
Hide file tree
Showing 19 changed files with 596 additions and 365 deletions.
48 changes: 0 additions & 48 deletions .eslintrc.js

This file was deleted.

47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import pluginJs from '@eslint/js';
import imports from 'eslint-plugin-import';
import jestConfig from 'eslint-plugin-jest';
import node from 'eslint-plugin-n';
import globals from 'globals';
import tsEslint from 'typescript-eslint';

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{
ignores: ['dist', 'contracts', 'typechain', 'node_modules'],
},
{ languageOptions: { globals: globals.node } },

pluginJs.configs.recommended,
...tsEslint.configs.recommended,
imports.flatConfigs.errors,
imports.flatConfigs.warnings,
imports.flatConfigs.typescript,
node.configs['flat/recommended'],
jestConfig.configs['flat/recommended'],

{
rules: {
'jest/expect-expect': 'off',
'jest/no-conditional-expect': 'off',

'n/no-missing-import': 'off',
'n/no-extraneous-import': 'off',
'n/no-unsupported-features/es-syntax': 'off',

'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'off',
'@typescript-eslint/no-unsafe-declaration-merging': 'off',

'import/no-unresolved': 'off',

semi: 'error',
'no-trailing-spaces': 'error',
'no-unexpected-multiline': 'off',
quotes: ['error', 'single', { avoidEscape: true }],
},
},
];
Loading

0 comments on commit 4e521c8

Please sign in to comment.