-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
50 lines (49 loc) · 1.16 KB
/
eslint.config.mjs
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
import globals from "globals";
import js from "@eslint/js";
import ts from "typescript-eslint";
import headers from "eslint-plugin-headers";
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: [
"packages/*/dist/**/*",
"playground/dist/**/*",
"playground/.dev/**/*",
],
},
{ files: ["**/*.{js,mjs,cjs,ts}"] },
{ languageOptions: { globals: globals.node } },
js.configs.recommended,
...ts.configs.recommended,
{
plugins: {
headers,
},
files: ["packages/*src/**/*", "playground/**/*"],
rules: {
"no-restricted-syntax": [
"error",
{
selector: "CallExpression[callee.name='log']",
message: "Use console.log() instead of log()",
},
],
"padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "function", next: "function" },
],
"headers/header-format": [
"error",
{
source: "file",
path: "header.txt",
trailingNewlines: 2,
variables: {
year: "2025",
author: "Cleboost",
},
},
],
},
},
];