Skip to content

Commit 16d375f

Browse files
add examples/ to no-restricted-path config (#54252) (#54277)
Co-authored-by: Elastic Machine <[email protected]>
1 parent 34dbe71 commit 16d375f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ module.exports = {
253253
'!x-pack/test/**/*',
254254
'(src|x-pack)/plugins/**/(public|server)/**/*',
255255
'src/core/(public|server)/**/*',
256+
'examples/**/*',
256257
],
257258
from: [
258259
'src/core/public/**/*',
@@ -289,11 +290,15 @@ module.exports = {
289290
'x-pack/legacy/plugins/**/*',
290291
'!x-pack/legacy/plugins/*/server/**/*',
291292
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
293+
294+
'examples/**/*',
295+
'!examples/**/server/**/*',
292296
],
293297
from: [
294298
'src/core/server',
295299
'src/core/server/**/*',
296300
'(src|x-pack)/plugins/*/server/**/*',
301+
'examples/**/server/**/*',
297302
],
298303
errorMessage:
299304
'Server modules cannot be imported into client modules or shared modules.',

examples/demo_search/server/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { Plugin, CoreSetup, PluginInitializerContext } from 'kibana/server';
21-
import { DataPluginSetup } from 'src/plugins/data/server/plugin';
21+
import { PluginSetup as DataPluginSetup } from 'src/plugins/data/server';
2222
import { demoSearchStrategyProvider } from './demo_search_strategy';
2323
import { DEMO_SEARCH_STRATEGY, IDemoRequest, IDemoResponse } from '../common';
2424

src/plugins/data/server/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { PluginInitializerContext } from '../../../core/server';
21-
import { DataServerPlugin } from './plugin';
21+
import { DataServerPlugin, DataPluginSetup } from './plugin';
2222

2323
export function plugin(initializerContext: PluginInitializerContext) {
2424
return new DataServerPlugin(initializerContext);
@@ -93,4 +93,4 @@ export {
9393
getKbnTypeNames,
9494
} from '../common';
9595

96-
export { DataServerPlugin as Plugin };
96+
export { DataServerPlugin as Plugin, DataPluginSetup as PluginSetup };

0 commit comments

Comments
 (0)