-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
61 lines (60 loc) · 1.61 KB
/
Copy patheslint.config.mjs
File metadata and controls
61 lines (60 loc) · 1.61 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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
export default tseslint.config(
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'**/coverage/**',
'**/.turbo/**',
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
},
},
{
// Store/algorithm tests commonly do `let state; ...process(state)...; state = result.state;`
// to thread reducer state through a stateful sequence of calls - a deliberate pattern the
// mutation-tracking rules below misread as dead/reassignable code.
files: [
'**/__tests__/**/*.ts',
'**/tests/**/*.ts',
'**/*.test.ts',
'**/*.spec.ts',
],
rules: {
'prefer-const': 'off',
'no-useless-assignment': 'off',
'no-unassigned-vars': 'off',
},
},
{
// Build/test tooling and Claude Code hooks are plain Node CommonJS scripts,
// unlike the ESM library source under packages/*/src.
files: ['**/jest.config.js', '**/build.js', '.claude/hooks/**/*.js'],
languageOptions: {
sourceType: 'commonjs',
globals: {
module: 'writable',
require: 'readonly',
process: 'readonly',
console: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
},
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
eslintConfigPrettier,
);