Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
53 lines (45 loc) · 1.61 KB
/
Copy patheslint.config.js
File metadata and controls
53 lines (45 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
import herokuEslintConfig from '@heroku-cli/test-utils/eslint-config';
export default [
// Spread the Heroku CLI ESLint config
...herokuEslintConfig,
// Project-specific overrides
{
files: ['src/**/*.ts', 'examples/**/*.ts'],
rules: {
// Allow explicit any for now (already at warn level from heroku config)
'@typescript-eslint/no-explicit-any': 'warn',
// Allow snake_case for API field names
'camelcase': ['error', {
properties: 'never',
ignoreDestructuring: true,
}],
// Prefer no semicolons unless necessary
'@stylistic/semi': ['warn', 'never'],
// Never pass a raw object to a `debug*` logger with %O/%o/%j — those
// interpolations dump unredacted secrets into DEBUG output. Route
// object logging through `logScrubbed` from src/redact.ts instead,
// which runs values through the js-blanket scrubber first.
'no-restricted-syntax': ['error', {
selector: 'CallExpression[callee.name=/^debug/] Literal[value=/%[Ooj]/]',
message: 'Do not pass %O/%o/%j to a debug* logger directly — use logScrubbed() from src/redact.ts so secrets are scrubbed first.',
}],
},
},
// Test file specific rules
{
files: ['src/**/*.test.ts', 'test/**/*.ts'],
rules: {
// Tests may use new for side effects
'no-new': 'off',
// Vitest doesn't restrict top-level suites the way mocha does
'mocha/max-top-level-suites': 'off',
},
},
// Additional ignore patterns specific to this project
{
ignores: [
'examples/ember-app/**/*',
'node_modules/**/*',
],
},
];