Skip to content

Commit

Permalink
feat: upgrade eslint to v9.15 (#603)
Browse files Browse the repository at this point in the history
* feat: upgrade eslint to v9

* feat: remove deprecated eslintrc.json config
  • Loading branch information
ecshreve authored Nov 22, 2024
1 parent 9827e72 commit a65aabe
Show file tree
Hide file tree
Showing 7 changed files with 422 additions and 359 deletions.
46 changes: 0 additions & 46 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.3.1
20.18.0
50 changes: 50 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// @ts-check

import eslint from '@eslint/js';
import jestPlugin from 'eslint-plugin-jest';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
ignores: ['**/coverage/**', '**/dist/**', '**/node_modules/**'],
},
{
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.jquery,
...globals.browser,
...globals.node,
...globals.jest,
},
},
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'warn',
},
},
{
// disable type-aware linting on JS files
files: ['**/*.js'],
...tseslint.configs.disableTypeChecked
},
{
// enable jest rules on test files
files: ['**/*.test.{js,ts}'],
...jestPlugin.configs['flat/recommended'],
rules: {
'@typescript-eslint/no-unsafe-argument': 'off',
},
},
);
Loading

0 comments on commit a65aabe

Please sign in to comment.