Skip to content

Commit c442d59

Browse files
committed
deps : update eslint config
Change to the current flat config format (a little later than we should have). Added rule to ignore "preserve-caught-error" until it is deemed useful. Akso ignoring dir `tests-config`. It was intended to match `tests` but with an internal config. May be obsolete with future tests of similar nature. Signed-off-by: Chris. Webster <chris@webstech.net>
1 parent 4223bb3 commit c442d59

3 files changed

Lines changed: 63 additions & 4 deletions

File tree

eslint.config.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
1-
import eslint from "@eslint/js"
1+
import js from "@eslint/js"
22
import stylistic from "@stylistic/eslint-plugin"
33
import jsdoc from "eslint-plugin-jsdoc"
4+
import { defineConfig } from "eslint/config"
45
import eslintConfigPrettier from "eslint-config-prettier"
56
import eslintPluginPrettier from "eslint-plugin-prettier"
67
import eslintPluginSecurity from "eslint-plugin-security"
78
import globals from "globals"
89
import tseslint from "typescript-eslint"
910

10-
export default tseslint.config(
11+
export default defineConfig([
1112
{
1213
// ignore these directories and files (not included on command line)
1314
ignores: ["**/build/**"],
15+
ignores: ["**/tests-config/**"],
1416
},
15-
eslint.configs.recommended,
17+
tseslint.configs.recommended,
1618
eslintPluginSecurity.configs.recommended,
1719
{
1820
plugins: {
21+
js,
1922
jsdoc,
2023
"@stylistic": stylistic,
2124
...eslintConfigPrettier.plugins,
2225
prettier: eslintPluginPrettier,
2326
},
2427

28+
extends: ["js/recommended"],
2529
languageOptions: {
2630
globals: {
2731
...globals.node,
@@ -121,6 +125,7 @@ export default tseslint.config(
121125
"object-shorthand": "error",
122126
"one-var": ["error", "never"],
123127
"prefer-arrow-callback": "off",
128+
"preserve-caught-error": "off",
124129
"prettier/prettier": "warn",
125130
radix: "error",
126131
"use-isnan": "error",
@@ -193,4 +198,4 @@ export default tseslint.config(
193198
},
194199
},
195200
// eslintPluginPrettierRecommended,
196-
)
201+
])

package-lock.json

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
]
6060
},
6161
"devDependencies": {
62+
"@eslint/js": "^10.0.1",
6263
"@stylistic/eslint-plugin": "^5.10.0",
6364
"@types/html-to-text": "^9.0.4",
6465
"@types/imap-simple": "^4.2.10",
@@ -75,6 +76,7 @@
7576
"eslint-plugin-jsdoc": "^62.7.1",
7677
"eslint-plugin-prettier": "^5.5.5",
7778
"eslint-plugin-security": "^4.0.0",
79+
"globals": "^17.4.0",
7880
"jest": "^30.2.0",
7981
"jest-junit": "^16.0.0",
8082
"test-smtp-server": "0.9.11",

0 commit comments

Comments
 (0)