forked from agentsea/flashbacker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
53 lines (50 loc) · 1.32 KB
/
.eslintrc.js
File metadata and controls
53 lines (50 loc) · 1.32 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
],
env: {
node: true,
es2022: true,
},
rules: {
// TypeScript specific rules
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }],
'no-unused-vars': 'off', // Let TypeScript handle this
// General code quality rules
'no-console': 'off', // CLI tool needs console output
'prefer-const': 'error',
'no-var': 'error',
'no-undef': 'off', // TypeScript handles this
// Code style - enforce consistent formatting
'semi': ['error', 'always'],
'quotes': ['error', 'single', { 'avoidEscape': true }],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
// Code quality
'no-useless-escape': 'warn',
'no-unreachable': 'error',
'no-constant-condition': 'warn',
'eqeqeq': 'error',
'no-trailing-spaces': 'error',
'eol-last': 'error',
},
ignorePatterns: [
'lib/',
'node_modules/',
'*.js',
'.eslintrc.js',
'templates/',
'tests/',
],
};