-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (46 loc) · 1.75 KB
/
eslint.config.js
File metadata and controls
55 lines (46 loc) · 1.75 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
import auto from 'eslint-config-canonical/auto';
import tseslint from 'typescript-eslint';
export default tseslint.config(
auto,
{
rules: {
// non-null assertions are used deliberately after regex matches and array lookups
// that are guarded by the surrounding logic
'@typescript-eslint/no-non-null-assertion': 'off',
'canonical/filename-match-exported': 'off',
// canonical enforces camelCase filenames; the project already uses kebab-case consistently
'canonical/filename-match-regex': 'off',
// canonical wants every identifier to match a specific pattern
'canonical/id-match': 'off',
eqeqeq: ['error', 'always', { null: 'ignore' }],
// canonical prefers arrow-function expressions; this project uses function declarations consistently
'func-style': 'off',
// short names in lambdas (e.g., `(a, b) => a.name.localeCompare(b.name)`) are fine
'id-length': 'off',
// this is a CLI plugin; console output is expected
'no-console': 'off',
// we use `!= null` checks which are idiomatic for coalescing null/undefined
'no-eq-null': 'off',
// prefers `.toSorted()` over `.sort()` — unnecessary churn for this project
'unicorn/no-array-sort': 'off',
// too aggressive — renames `rel` → `relationship`, `doc` → `document`, `tmpDir` → `temporaryDirectory`
'unicorn/prevent-abbreviations': 'off',
},
},
{
files: ['package.json'],
rules: {
// types must precede default in exports conditions for TypeScript resolution
'jsonc/sort-keys': 'off',
},
},
{
ignores: [
'dist/',
'preview-output/',
'zenstack/',
'release-please-config.json',
'.release-please-manifest.json',
],
},
);