-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (42 loc) · 1.37 KB
/
eslint.config.js
File metadata and controls
47 lines (42 loc) · 1.37 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
import js from '@eslint/js';
import prettier from 'eslint-plugin-prettier/recommended';
import github from 'eslint-plugin-github';
import jest from 'eslint-plugin-jest';
import globals from 'globals';
export default [
// Recommended base configs
js.configs.recommended,
// Plugin configs
github.getFlatConfigs().recommended,
jest.configs['flat/recommended'],
prettier,
// Global ignores
{
ignores: ['node_modules/', 'dist/', 'coverage/', '.nyc_output/', '*.min.js']
},
// Main config
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
...globals.es2022
}
},
rules: {
'i18n-text/no-en': 'off',
camelcase: 'off', // GitHub API uses snake_case properties
'object-shorthand': 'off', // Allow explicit property syntax for clarity
'import/no-namespace': 'off', // Allow * namespace imports for ES modules
'import/no-unresolved': 'off', // False positives for packages in node_modules
'import/extensions': ['error', 'ignorePackages', { js: 'always' }], // Require .js extensions for ES modules
quotes: ['error', 'single', { allowTemplateLiterals: true }],
semi: ['error', 'always'],
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-console': 'warn',
'prefer-const': 'error',
'no-var': 'error'
}
}
];