Skip to content

Commit

Permalink
add examples/ to no-restricted-path config (#54252) (#54277)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
Dosant and elasticmachine committed Jan 9, 2020
1 parent 34dbe71 commit 16d375f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ module.exports = {
'!x-pack/test/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'src/core/(public|server)/**/*',
'examples/**/*',
],
from: [
'src/core/public/**/*',
Expand Down Expand Up @@ -289,11 +290,15 @@ module.exports = {
'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/*/server/**/*',
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',

'examples/**/*',
'!examples/**/server/**/*',
],
from: [
'src/core/server',
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
'examples/**/server/**/*',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_search/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { Plugin, CoreSetup, PluginInitializerContext } from 'kibana/server';
import { DataPluginSetup } from 'src/plugins/data/server/plugin';
import { PluginSetup as DataPluginSetup } from 'src/plugins/data/server';
import { demoSearchStrategyProvider } from './demo_search_strategy';
import { DEMO_SEARCH_STRATEGY, IDemoRequest, IDemoResponse } from '../common';

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/data/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { PluginInitializerContext } from '../../../core/server';
import { DataServerPlugin } from './plugin';
import { DataServerPlugin, DataPluginSetup } from './plugin';

export function plugin(initializerContext: PluginInitializerContext) {
return new DataServerPlugin(initializerContext);
Expand Down Expand Up @@ -93,4 +93,4 @@ export {
getKbnTypeNames,
} from '../common';

export { DataServerPlugin as Plugin };
export { DataServerPlugin as Plugin, DataPluginSetup as PluginSetup };

0 comments on commit 16d375f

Please sign in to comment.