mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-18 14:18:23 +02:00
Merge pull request #19786 from nicolo-ribaudo/linting-export
Lint against `export [some declaration]`
This commit is contained in:
commit
115ea6afa3
2 changed files with 11 additions and 0 deletions
|
@ -306,6 +306,16 @@ export default [
|
|||
selector: "NewExpression[callee.name='Ref']",
|
||||
message: "Use `Ref.get()` rather than `new Ref()`.",
|
||||
},
|
||||
{
|
||||
selector: "ExportNamedDeclaration[declaration]",
|
||||
message:
|
||||
"Separate the declaration and the export statement, using `export { ... }`.",
|
||||
},
|
||||
{
|
||||
selector: "ExportDefaultDeclaration:has(> :declaration)",
|
||||
message:
|
||||
"Separate the declaration and the export statement, using `export default <variable name>`.",
|
||||
},
|
||||
],
|
||||
"no-unneeded-ternary": "error",
|
||||
"operator-assignment": "error",
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// In mozilla-central, this file is loaded as non-module script,
|
||||
// so it mustn't have any dependencies.
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
export class SandboxSupportBase {
|
||||
/**
|
||||
* @param {DOMWindow} - win
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue