forked from Intevation/tiptap-extension-office-paste
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
59 lines (57 loc) · 1.5 KB
/
eslint.config.js
File metadata and controls
59 lines (57 loc) · 1.5 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// @ts-check
import eslint from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import json from "eslint-plugin-json";
import prettier from "eslint-plugin-prettier/recommended";
export default tseslint.config(
{
ignores: ["**/dist/", "**/package-lock.json"],
},
eslint.configs.recommended,
{
files: ["**/*.[jt]s"],
languageOptions: { ecmaVersion: 2023 },
rules: {
"no-lonely-if": "error",
"no-extend-native": "error",
"no-use-before-define": ["error", { functions: false }],
"no-var": "error",
},
},
...tseslint.configs.recommendedTypeChecked,
{
files: ["**/*.{js,[mc]js,json}"],
...tseslint.configs.disableTypeChecked,
},
{
files: ["**/*.ts"],
languageOptions: {
parserOptions: { projectService: true },
},
rules: {
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
"@typescript-eslint/no-unnecessary-condition": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", { ignoreRestSiblings: true }],
},
},
{
...json.configs.recommended,
ignores: ["**/tsconfig.json"],
},
{
...json.configs["recommended-with-comments"],
files: ["**/tsconfig.json"],
},
{
files: ["esling.config.js"],
languageOptions: {
globals: { ...globals.node },
},
rules: {
"no-implicit-globals": "off",
},
},
prettier
);