Skip to content

Commit 115ea6a

Browse files
Merge pull request #19786 from nicolo-ribaudo/linting-export
Lint against `export [some declaration]`
2 parents 72feb4c + f654fb1 commit 115ea6a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

eslint.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,16 @@ export default [
306306
selector: "NewExpression[callee.name='Ref']",
307307
message: "Use `Ref.get()` rather than `new Ref()`.",
308308
},
309+
{
310+
selector: "ExportNamedDeclaration[declaration]",
311+
message:
312+
"Separate the declaration and the export statement, using `export { ... }`.",
313+
},
314+
{
315+
selector: "ExportDefaultDeclaration:has(> :declaration)",
316+
message:
317+
"Separate the declaration and the export statement, using `export default <variable name>`.",
318+
},
309319
],
310320
"no-unneeded-ternary": "error",
311321
"operator-assignment": "error",

src/pdf.sandbox.external.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// In mozilla-central, this file is loaded as non-module script,
1717
// so it mustn't have any dependencies.
1818

19+
// eslint-disable-next-line no-restricted-syntax
1920
export class SandboxSupportBase {
2021
/**
2122
* @param {DOMWindow} - win

0 commit comments

Comments
 (0)