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

markuplint / markuplint / #3384

pending completion
#3384

push

yusukehirao
Add a contributor.

3863 of 5679 branches covered (68.02%)

Branch coverage included in aggregate %.

6915 of 9509 relevant lines covered (72.72%)

362.96 hits per line

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

0.0
/packages/@markuplint/create-rule-helper/src/create-rule-package.ts
1
import type { CreateRuleCreatorParams, CreateRuleHelperResult } from './types';
2

3
import path from 'node:path';
×
4

5
import { CreateRuleHelperError } from './create-rule-helper-error';
×
6
import glob from './glob';
×
7
import { installScaffold } from './install-scaffold';
×
8

9
export async function createRulePackage({
×
10
        pluginName,
11
        ruleName,
12
        lang,
13
        needTest,
14
}: CreateRuleCreatorParams): Promise<CreateRuleHelperResult> {
15
        const newRuleDir = path.resolve(process.cwd(), '*');
×
16

17
        const files = await glob(newRuleDir);
×
18

19
        if (files.length) {
×
20
                throw new CreateRuleHelperError('The directory is not empty');
×
21
        }
22

23
        return await installScaffold('package', process.cwd(), {
×
24
                pluginName,
25
                ruleName,
26
                lang,
27
                needTest,
28
                packageJson: true,
29
        });
30
}
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