• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hexojs / hexo-util / 16651986209

31 Jul 2025 02:35PM UTC coverage: 73.036% (-23.8%) from 96.875%
16651986209

Pull #426

github

web-flow
Merge e24598988 into d497bc760
Pull Request #426: build: restructure for dual ESM/CJS output, update tooling, and enhance utilities

811 of 1128 branches covered (71.9%)

1594 of 2028 new or added lines in 40 files covered. (78.6%)

6 existing lines in 1 file now uncovered.

5290 of 7243 relevant lines covered (73.04%)

69.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/eslint.config.mjs
NEW
1
import hexoTs from 'eslint-config-hexo/ts';
×
NEW
2
import hexoTsTest from 'eslint-config-hexo/ts-test';
×
NEW
3
import importPlugin from 'eslint-plugin-import';
×
NEW
4

×
NEW
5
export default [
×
NEW
6
  // Configurations applied globally
×
NEW
7
  ...hexoTs,
×
NEW
8
  // Ignore specific files
×
NEW
9
  {
×
NEW
10
    ignores: [
×
NEW
11
      // Exclude auto-generated file from all linting
×
NEW
12
      'lib/highlight_alias.ts',
×
NEW
13
      // Exclude dist directory from all linting
×
NEW
14
      'dist',
×
NEW
15
      // Exclude tmp directory from all linting
×
NEW
16
      'tmp',
×
NEW
17
      // Exclude eslint config file itself
×
NEW
18
      'eslint.config.mjs'
×
NEW
19
    ]
×
NEW
20
  },
×
NEW
21
  {
×
NEW
22
    languageOptions: {
×
NEW
23
      ecmaVersion: 2020,
×
NEW
24
      sourceType: 'module'
×
NEW
25
    }
×
NEW
26
  },
×
NEW
27
  // Import plugin for ESM import resolution and rules
×
NEW
28
  {
×
NEW
29
    plugins: {
×
NEW
30
      import: importPlugin
×
NEW
31
    },
×
NEW
32
    rules: {
×
NEW
33
      ...importPlugin.configs.recommended.rules,
×
NEW
34
      'n/no-missing-import': 'off',
×
NEW
35
      'node/no-extraneous-import': 'off',
×
NEW
36
      'import/extensions': [
×
NEW
37
        'error',
×
NEW
38
        'never',
×
NEW
39
        {
×
NEW
40
          js: 'always',
×
NEW
41
          ts: 'never',
×
NEW
42
          json: 'always'
×
NEW
43
        }
×
NEW
44
      ]
×
NEW
45
    },
×
NEW
46
    settings: {
×
NEW
47
      'import/resolver': {
×
NEW
48
        node: {
×
NEW
49
          extensions: ['.js', '.ts', '.mjs', '.cjs']
×
NEW
50
        },
×
NEW
51
        typescript: {
×
NEW
52
          alwaysTryTypes: true,
×
NEW
53
          project: './tsconfig.json'
×
NEW
54
        }
×
NEW
55
      }
×
NEW
56
    }
×
NEW
57
  },
×
NEW
58
  // Configurations applied only to test files
×
NEW
59
  {
×
NEW
60
    files: ['test/**/*.ts'],
×
NEW
61
    languageOptions: {
×
NEW
62
      ...hexoTsTest.languageOptions,
×
NEW
63
      globals: {
×
NEW
64
        // Allow global variables used in tests
×
NEW
65
        describe: 'readonly',
×
NEW
66
        it: 'readonly',
×
NEW
67
        beforeEach: 'readonly',
×
NEW
68
        afterEach: 'readonly',
×
NEW
69
        beforeAll: 'readonly',
×
NEW
70
        afterAll: 'readonly',
×
NEW
71
        expect: 'readonly'
×
NEW
72
      }
×
NEW
73
    },
×
NEW
74
    rules: {
×
NEW
75
      ...hexoTsTest.rules,
×
NEW
76
      '@typescript-eslint/no-explicit-any': 0,
×
NEW
77
      '@typescript-eslint/ban-ts-comment': 0,
×
NEW
78
      '@typescript-eslint/no-non-null-assertion': 0,
×
NEW
79
      'node/no-unsupported-features/es-syntax': 0,
×
NEW
80
      '@typescript-eslint/no-var-requires': 0,
×
NEW
81
      '@typescript-eslint/no-empty-function': 0,
×
NEW
82
      '@typescript-eslint/no-unused-vars': 0,
×
NEW
83
      'node/no-missing-require': 0,
×
NEW
84
      'node/no-missing-import': 0
×
NEW
85
    }
×
NEW
86
  },
×
NEW
87

×
NEW
88
  // Specific rules for JavaScript and CommonJS files
×
NEW
89
  {
×
NEW
90
    files: ['**/*.cjs'],
×
NEW
91

×
NEW
92
    rules: {
×
NEW
93
      '@typescript-eslint/no-var-requires': 'off', // Allow require() in CommonJS files
×
NEW
94
      '@typescript-eslint/no-require-imports': 'off' // Allow require imports
×
NEW
95
    }
×
NEW
96
  }
×
NEW
97
];
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc