Skip to content

Commit

Permalink
Update dependencies, remove unused dependencies
Browse files Browse the repository at this point in the history
Create configuration files for updated eslint and prettier packages.
Remove eslint configuration section from package.json.

Remove unneeded eslint-ignore directives from source files.

The @types/node package has a newer major version available, but 20 is
the newest LTS version, so the package is kept there for now.
  • Loading branch information
mint-thompson committed Sep 10, 2024
1 parent 004bdf6 commit 6c7c021
Show file tree
Hide file tree
Showing 6 changed files with 1,243 additions and 5,719 deletions.
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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
});

export default [
{
ignores: [
'node_modules/',
'lib/'
]
},
...compat.extends('plugin:@typescript-eslint/recommended', 'prettier'),
{
languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module'
},

rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-declaration-merging': 'off'
}
}
];
Loading

0 comments on commit 6c7c021

Please sign in to comment.