/ .github / scripts / eslint.config.js
eslint.config.js
 1  module.exports = [
 2      {
 3          languageOptions: {
 4              ecmaVersion: 2022,
 5              sourceType: 'commonjs',
 6              globals: {
 7                  console: 'readonly',
 8                  process: 'readonly',
 9                  Buffer: 'readonly',
10                  __dirname: 'readonly',
11                  __filename: 'readonly',
12                  module: 'readonly',
13                  require: 'readonly',
14                  exports: 'readonly',
15                  global: 'readonly',
16                  setTimeout: 'readonly',
17                  clearTimeout: 'readonly',
18                  setInterval: 'readonly',
19                  clearInterval: 'readonly'
20              }
21          },
22          rules: {
23              // Disable rules that are too strict for scripts
24              'no-console': 'off',
25              'no-process-exit': 'off',
26              'no-unused-vars': ['warn', {
27                  argsIgnorePattern: '^_',
28                  varsIgnorePattern: '^_',
29                  caughtErrors: 'none'
30              }],
31              'no-undef': 'warn',
32              
33              // Less strict formatting for existing code  
34              'quotes': 'off',
35              'semi': 'off',
36              'comma-dangle': 'off',
37              'indent': 'off',
38              'no-trailing-spaces': 'off',
39              'eol-last': 'off',
40              
41              // Keep important error checks
42              'no-var': 'error',
43              'no-unreachable': 'error',
44              'no-redeclare': 'error'
45          }
46      }
47  ];