Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit d0e0e31

Browse files
committed
linting
1 parent 109552b commit d0e0e31

6 files changed

+195
-225
lines changed

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"useTabs": false,
3+
"tabWidth": 4,
4+
"semi": true,
5+
"trailingComma": "all",
6+
"singleQuote": true,
7+
"printWidth": 100
8+
}

eslint.config.mjs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
5+
6+
/** @type {import('eslint').Linter.Config[]} */
7+
export default [
8+
{ignores: ["node_modules/*", "docs/*", "dist/*", "src/**/*.test.ts"]},
9+
{files: ["**/*.{js,mjs,cjs,ts}"]},
10+
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
11+
{languageOptions: { globals: globals.browser }},
12+
pluginJs.configs.recommended,
13+
...tseslint.configs.recommended,
14+
];

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,27 @@
4040
"redis": "^4.3.0"
4141
},
4242
"devDependencies": {
43+
"@eslint/js": "^9.18.0",
4344
"@types/chai": "4.3.3",
4445
"@types/debug": "4.1.7",
4546
"@types/generic-pool": "3.1.11",
4647
"@types/mocha": "9.1.1",
4748
"@types/node": "17.0.23",
4849
"@types/proxyquire": "1.3.28",
4950
"@types/sinon": "10.0.13",
51+
"@typescript-eslint/eslint-plugin": "^8.20.0",
52+
"@typescript-eslint/parser": "^8.20.0",
5053
"c8": "7.12.0",
5154
"chai": "4.3.6",
55+
"eslint": "^9.18.0",
5256
"globals": "^15.14.0",
5357
"mocha": "10.0.0",
5458
"prettier": "^3.4.2",
5559
"proxyquire": "2.1.3",
5660
"sinon": "14.0.0",
5761
"typedoc": "0.23.13",
58-
"typescript": "4.8.2"
62+
"typescript": "4.8.2",
63+
"typescript-eslint": "^8.20.0"
5964
},
6065
"repository": {
6166
"type": "git",

0 commit comments

Comments
 (0)