-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
54 lines (47 loc) · 1.32 KB
/
Copy patheslint.config.js
File metadata and controls
54 lines (47 loc) · 1.32 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
import js from "@eslint/js";
import astro from "eslint-plugin-astro";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: ["**/node_modules/**", "**/dist/**", "**/.astro/**"],
},
js.configs.recommended,
tseslint.configs.recommended,
astro.configs.recommended,
{
rules: {
eqeqeq: ["error", "always"],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
},
},
{
files: [
"packages/jaamd/index.ts",
"packages/jaamd/src/paths.ts",
"packages/jaamd/src/plugins/**/*.ts",
"packages/jaamd/src/themes/index.ts",
"tests/**/*.mjs",
"scripts/**/*.mjs",
],
languageOptions: { globals: globals.node },
},
{
files: ["packages/jaamd/src/scripts/**/*.ts", "www/src/**/*.astro"],
languageOptions: { globals: globals.browser },
},
// Remark works on mdast nodes carrying `data.hName`/`data.hProperties`, which
// @types/mdast does not model.
{
files: ["packages/jaamd/src/plugins/**/*.ts"],
rules: { "@typescript-eslint/no-explicit-any": "off" },
},
{
files: ["tests/**/*.mjs", "scripts/**/*.mjs"],
rules: { "no-console": "off" },
},
);