forked from web-platform-dx/web-features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
31 lines (29 loc) · 823 Bytes
/
eslint.config.js
File metadata and controls
31 lines (29 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import newWithError from "eslint-plugin-new-with-error";
import tseslint from "typescript-eslint";
export default tseslint.config(tseslint.configs.base, {
plugins: { newWithError },
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
caughtErrors: "none",
},
],
"newWithError/new-with-error": "error",
"no-duplicate-imports": "error",
"no-throw-literal": "error",
},
files: ["**/*.ts"],
});
// TODO: do linting more comprehensively, something like:
// import eslint from "@eslint/js";
// export default tseslint.config(
// eslint.configs.recommendedTypeChecked,
// ...tseslint.configs.recommended,
// {
// plugins: { newWithError },
// rules: {
// "no-throw-literal": "error",
// "newWithError/new-with-error": "error",
// },
// );