Skip to content

Commit

Permalink
Fix prettier lint errors in watch_plugin_registry.js (#4871)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrottimark authored and cpojer committed Nov 10, 2017
1 parent 9c52d27 commit 7693d4a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/jest-cli/src/lib/watch_plugin_registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export default class WatchPluginRegistry {
// before assuming it's a valid watch plugin.
if (getType(maybePlugin) !== 'object') {
throw new Error(
`Jest watch plugin ${pluginModulePath} must be an ES Module or export an object`,
`Jest watch plugin ${
pluginModulePath
} must be an ES Module or export an object`,
);
}
if (getType(maybePlugin.key) !== 'number') {
Expand All @@ -45,20 +47,26 @@ export default class WatchPluginRegistry {
}
if (getType(maybePlugin.prompt) !== 'string') {
throw new Error(
`Jest watch plugin ${pluginModulePath} must export 'prompt' as a string`,
`Jest watch plugin ${
pluginModulePath
} must export 'prompt' as a string`,
);
}
if (getType(maybePlugin.enter) !== 'function') {
throw new Error(
`Jest watch plugin ${pluginModulePath} must export 'enter' as a function`,
`Jest watch plugin ${
pluginModulePath
} must export 'enter' as a function`,
);
}

const plugin: WatchPlugin = ((maybePlugin: any): WatchPlugin);

if (RESERVED_KEYS.includes(maybePlugin.key)) {
throw new Error(
`Jest watch plugin ${pluginModulePath} tried to register reserved key ${String.fromCodePoint(
`Jest watch plugin ${
pluginModulePath
} tried to register reserved key ${String.fromCodePoint(
maybePlugin.key,
)}`,
);
Expand Down

0 comments on commit 7693d4a

Please sign in to comment.