Skip to content

Commit 4e43fe9

Browse files
Upgrade to eslint9 for the project and make the configuring lint tool to support 9+ (#194)
* update eslint dependency to 9.29.0 * fix test for version check * finalize linting configuration tool * lint cleanup * prettify the code * addres pr review comments, clean up code for new work flow * test coverage for message shown for uncaught exception thrown
1 parent 6828911 commit 4e43fe9

File tree

10 files changed

+818
-503
lines changed

10 files changed

+818
-503
lines changed

.eslintrc.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

eslint.config.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
2+
const tsParser = require("@typescript-eslint/parser");
3+
4+
module.exports = [
5+
{
6+
files: ["**/*.ts"],
7+
plugins: {
8+
"@typescript-eslint": typescriptEslint,
9+
},
10+
languageOptions: {
11+
parser: tsParser,
12+
ecmaVersion: 6,
13+
sourceType: "module",
14+
},
15+
rules: {
16+
"@typescript-eslint/naming-convention": [
17+
"warn",
18+
{
19+
selector: "variable",
20+
format: ["camelCase", "UPPER_CASE"],
21+
},
22+
{
23+
selector: "property",
24+
modifiers: ["static", "readonly"],
25+
format: ["UPPER_CASE"],
26+
},
27+
{
28+
selector: "property",
29+
format: ["camelCase"],
30+
},
31+
],
32+
curly: "warn",
33+
eqeqeq: "warn",
34+
"no-throw-literal": "warn",
35+
semi: "off",
36+
},
37+
},
38+
{
39+
ignores: ["out/**", "dist/**", "**/*.d.ts"],
40+
},
41+
];

0 commit comments

Comments
 (0)