Skip to content

Commit

Permalink
chore(eslint): upgrade to v9 (#74)
Browse files Browse the repository at this point in the history
* chore(eslint): upgrade to v9

* chore(ci): remove node version 16
  • Loading branch information
hougesen authored Sep 3, 2024
1 parent 9dffffd commit 00ec8b1
Show file tree
Hide file tree
Showing 12 changed files with 332 additions and 616 deletions.
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16, 18, 20]
node: [18, 20, 22]

steps:
- name: Checkout 🛎
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.17.0
47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// @ts-check

import pluginJs from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'object-shorthand': 'error',
'@typescript-eslint/array-type': [
'error',
{
default: 'array-simple',
},
],
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'no-duplicate-imports': 'error',
'@typescript-eslint/no-empty-object-type': [
'error',
{
allowInterfaces: 'with-single-extends',
},
],
'no-useless-escape': 'off',
},
},
{
ignores: ['dist', './dist/*'],
},
];
Loading

0 comments on commit 00ec8b1

Please sign in to comment.