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

source-academy / js-slang / 15237418122

25 May 2025 11:31AM UTC coverage: 77.048% (-3.5%) from 80.538%
15237418122

push

github

web-flow
Rewrite: Stepper (#1742)

3433 of 4826 branches covered (71.14%)

Branch coverage included in aggregate %.

1032 of 1260 new or added lines in 27 files covered. (81.9%)

440 existing lines in 29 files now uncovered.

10099 of 12737 relevant lines covered (79.29%)

142411.96 hits per line

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

91.67
/src/parser/source/rules/noImportSpecifierWithDefault.ts
1
import type { ImportSpecifier } from 'estree'
2
import { defaultExportLookupName } from '../../../stdlib/localImport.prelude'
77✔
3
import type { Rule } from '../../types'
4
import syntaxBlacklist from '../syntax'
77✔
5
import { RuleError } from '../../errors'
77✔
6

7
export class NoImportSpecifierWithDefaultError extends RuleError<ImportSpecifier> {
77✔
8
  public explain() {
9
    return 'Import default specifiers are not allowed.'
1✔
10
  }
11

12
  public elaborate() {
UNCOV
13
    return 'You are trying to use an import default specifier, which is not allowed (yet).'
×
14
  }
15
}
16

17
const noImportSpecifierWithDefault: Rule<ImportSpecifier> = {
77✔
18
  name: 'no-declare-mutable',
19
  disableFromChapter: syntaxBlacklist['ImportDefaultSpecifier'],
20

21
  checkers: {
22
    ImportSpecifier(node) {
23
      if (node.imported.name === defaultExportLookupName) {
94✔
24
        return [new NoImportSpecifierWithDefaultError(node)]
1✔
25
      }
26
      return []
93✔
27
    }
28
  }
29
}
30

31
export default noImportSpecifierWithDefault
77✔
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