• 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

92.31
/src/parser/source/rules/noExportNamedDeclarationWithDefault.ts
1
import type { ExportNamedDeclaration } 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
import { mapAndFilter } from '../../../utils/misc'
77✔
7

8
export class NoExportNamedDeclarationWithDefaultError extends RuleError<ExportNamedDeclaration> {
77✔
9
  public explain() {
10
    return 'Export default declarations are not allowed.'
2✔
11
  }
12

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

18
const noExportNamedDeclarationWithDefault: Rule<ExportNamedDeclaration> = {
77✔
19
  name: 'no-declare-mutable',
20
  disableFromChapter: syntaxBlacklist['ExportDefaultDeclaration'],
21

22
  checkers: {
23
    ExportNamedDeclaration(node) {
24
      return mapAndFilter(node.specifiers, specifier =>
30✔
25
        specifier.exported.name === defaultExportLookupName
10✔
26
          ? new NoExportNamedDeclarationWithDefaultError(node)
27
          : undefined
28
      )
29
    }
30
  }
31
}
32

33
export default noExportNamedDeclarationWithDefault
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

© 2026 Coveralls, Inc