-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
76 lines (73 loc) · 2.06 KB
/
eslint.config.js
File metadata and controls
76 lines (73 loc) · 2.06 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const typescriptParser = require("@typescript-eslint/parser");
module.exports = [
{
ignores: ["dist/**", "node_modules/**", "coverage/**", "*.js", "*.d.ts"],
},
{
files: ["src/**/*.ts"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: 2022,
sourceType: "module",
},
globals: {
console: true,
process: true,
Buffer: true,
__dirname: true,
__filename: true,
exports: true,
module: true,
require: true,
global: true,
jest: true,
describe: true,
it: true,
expect: true,
beforeEach: true,
afterEach: true,
beforeAll: true,
afterAll: true,
},
},
plugins: {
"@typescript-eslint": typescriptEslint,
},
rules: {
...typescriptEslint.configs["recommended"].rules,
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
"no-console": "off",
semi: ["error", "always"],
quotes: ["error", "single", { avoidEscape: true }],
// Trailing comma rule - helps avoid git conflicts
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never", // Function params don't need trailing commas
},
],
// Trailing spaces rule - removes unnecessary whitespace
"no-trailing-spaces": [
"error",
{
skipBlankLines: false, // Also check blank lines
ignoreComments: false, // Also check comments
},
],
},
},
];