Skip to content

Commit a00bbb6

Browse files
authored
Upgrade linting libraries (#931)
1 parent 88086bc commit a00bbb6

25 files changed

+767
-391
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.js

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

.prettierrc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"printWidth": 120,
3-
"plugins": [
4-
"prettier-plugin-organize-imports"
5-
]
6-
}
2+
"printWidth": 120,
3+
"trailingComma": "es5",
4+
"plugins": ["prettier-plugin-organize-imports"]
5+
}

eslint.config.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import eslint from "@eslint/js";
2+
import json from "@eslint/json";
3+
import eslintConfigPrettier from "eslint-config-prettier/flat";
4+
import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
5+
import tseslint from "typescript-eslint";
6+
7+
/** @type {import("typescript-eslint").ConfigArray} */
8+
export default [
9+
{
10+
ignores: ["**/build/"],
11+
},
12+
{
13+
ignores: ["package-lock.json"],
14+
files: ["**/*.json"],
15+
language: "json/json",
16+
...json.configs.recommended,
17+
},
18+
eslint.configs.recommended,
19+
...tseslint.configs.recommended,
20+
eslintConfigPrettier,
21+
eslintPluginPrettier,
22+
{
23+
rules: {
24+
"prettier/prettier": [
25+
"error",
26+
{
27+
trailingComma: "es5",
28+
},
29+
],
30+
"@typescript-eslint/no-empty-function": "off",
31+
"@typescript-eslint/no-unused-vars": [
32+
"error",
33+
{
34+
caughtErrors: "none",
35+
},
36+
],
37+
"no-irregular-whitespace": "off",
38+
},
39+
},
40+
];

0 commit comments

Comments
 (0)