17
17
* under the License.
18
18
*/
19
19
20
- const { readdirSync } = require ( 'fs' ) ;
21
- const { resolve } = require ( 'path' ) ;
22
-
23
20
const APACHE_2_0_LICENSE_HEADER = `
24
21
/*
25
22
* Licensed to Elasticsearch B.V. under one or more contributor
@@ -288,7 +285,7 @@ module.exports = {
288
285
} ,
289
286
{
290
287
target : [
291
- '( src|x-pack) /legacy/**/*' ,
288
+ 'src/legacy/**/*' ,
292
289
'(src|x-pack)/plugins/**/(public|server)/**/*' ,
293
290
'examples/**/*' ,
294
291
] ,
@@ -319,14 +316,11 @@ module.exports = {
319
316
} ,
320
317
{
321
318
target : [
322
- '( src|x-pack) /legacy/**/*' ,
319
+ 'src/legacy/**/*' ,
323
320
'(src|x-pack)/plugins/**/(public|server)/**/*' ,
324
321
'examples/**/*' ,
325
322
'!(src|x-pack)/**/*.test.*' ,
326
323
'!(x-pack/)?test/**/*' ,
327
- // next folder contains legacy browser tests which can't be migrated to jest
328
- // which import np files
329
- '!src/legacy/core_plugins/kibana/public/__tests__/**/*' ,
330
324
] ,
331
325
from : [
332
326
'(src|x-pack)/plugins/**/(public|server)/**/*' ,
@@ -341,14 +335,6 @@ module.exports = {
341
335
'(src|x-pack)/plugins/**/*' ,
342
336
'!(src|x-pack)/plugins/**/server/**/*' ,
343
337
344
- 'src/legacy/core_plugins/**/*' ,
345
- '!src/legacy/core_plugins/**/server/**/*' ,
346
- '!src/legacy/core_plugins/**/index.{js,mjs,ts,tsx}' ,
347
-
348
- 'x-pack/legacy/plugins/**/*' ,
349
- '!x-pack/legacy/plugins/**/server/**/*' ,
350
- '!x-pack/legacy/plugins/**/index.{js,mjs,ts,tsx}' ,
351
-
352
338
'examples/**/*' ,
353
339
'!examples/**/server/**/*' ,
354
340
] ,
@@ -370,12 +356,7 @@ module.exports = {
370
356
} ,
371
357
{
372
358
target : [ 'src/core/**/*' ] ,
373
- from : [
374
- 'plugins/**/*' ,
375
- 'src/plugins/**/*' ,
376
- 'src/legacy/core_plugins/**/*' ,
377
- 'src/legacy/ui/**/*' ,
378
- ] ,
359
+ from : [ 'plugins/**/*' , 'src/plugins/**/*' , 'src/legacy/ui/**/*' ] ,
379
360
errorMessage : 'The core cannot depend on any plugins.' ,
380
361
} ,
381
362
{
@@ -388,12 +369,6 @@ module.exports = {
388
369
target : [
389
370
'test/plugin_functional/plugins/**/public/np_ready/**/*' ,
390
371
'test/plugin_functional/plugins/**/server/np_ready/**/*' ,
391
- 'src/legacy/core_plugins/**/public/np_ready/**/*' ,
392
- 'src/legacy/core_plugins/vis_type_*/public/**/*' ,
393
- '!src/legacy/core_plugins/vis_type_*/public/legacy*' ,
394
- 'src/legacy/core_plugins/**/server/np_ready/**/*' ,
395
- 'x-pack/legacy/plugins/**/public/np_ready/**/*' ,
396
- 'x-pack/legacy/plugins/**/server/np_ready/**/*' ,
397
372
] ,
398
373
allowSameFolder : true ,
399
374
errorMessage :
@@ -443,22 +418,14 @@ module.exports = {
443
418
settings : {
444
419
// instructs import/no-extraneous-dependencies to treat certain modules
445
420
// as core modules, even if they aren't listed in package.json
446
- 'import/core-modules' : [ 'plugins' , 'legacy/ui' ] ,
421
+ 'import/core-modules' : [ 'plugins' ] ,
447
422
448
423
'import/resolver' : {
449
424
'@kbn/eslint-import-resolver-kibana' : {
450
425
forceNode : false ,
451
426
rootPackageName : 'kibana' ,
452
427
kibanaPath : '.' ,
453
- pluginMap : readdirSync ( resolve ( __dirname , 'x-pack/legacy/plugins' ) ) . reduce (
454
- ( acc , name ) => {
455
- if ( ! name . startsWith ( '_' ) ) {
456
- acc [ name ] = `x-pack/legacy/plugins/${ name } ` ;
457
- }
458
- return acc ;
459
- } ,
460
- { }
461
- ) ,
428
+ pluginMap : { } ,
462
429
} ,
463
430
} ,
464
431
} ,
@@ -764,16 +731,6 @@ module.exports = {
764
731
} ,
765
732
} ,
766
733
767
- /**
768
- * GIS overrides
769
- */
770
- {
771
- files : [ 'x-pack/legacy/plugins/maps/**/*.js' ] ,
772
- rules : {
773
- 'react/prefer-stateless-function' : [ 0 , { ignorePureComponents : false } ] ,
774
- } ,
775
- } ,
776
-
777
734
/**
778
735
* ML overrides
779
736
*/
@@ -812,7 +769,7 @@ module.exports = {
812
769
} ,
813
770
{
814
771
// typescript only for front and back end
815
- files : [ 'x-pack/{,legacy/} plugins/security_solution/**/*.{ts,tsx}' ] ,
772
+ files : [ 'x-pack/plugins/security_solution/**/*.{ts,tsx}' ] ,
816
773
rules : {
817
774
// This will be turned on after bug fixes are complete
818
775
// '@typescript-eslint/explicit-member-accessibility': 'warn',
@@ -858,7 +815,7 @@ module.exports = {
858
815
// },
859
816
{
860
817
// typescript and javascript for front and back end
861
- files : [ 'x-pack/{,legacy/} plugins/security_solution/**/*.{js,mjs,ts,tsx}' ] ,
818
+ files : [ 'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}' ] ,
862
819
plugins : [ 'eslint-plugin-node' , 'react' ] ,
863
820
env : {
864
821
mocha : true ,
@@ -1089,7 +1046,7 @@ module.exports = {
1089
1046
{
1090
1047
// typescript only for front and back end
1091
1048
files : [
1092
- 'x-pack/{,legacy/} plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}' ,
1049
+ 'x-pack/plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}' ,
1093
1050
] ,
1094
1051
rules : {
1095
1052
'@typescript-eslint/no-explicit-any' : 'error' ,
@@ -1238,10 +1195,7 @@ module.exports = {
1238
1195
* TSVB overrides
1239
1196
*/
1240
1197
{
1241
- files : [
1242
- 'src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}' ,
1243
- 'src/legacy/core_plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}' ,
1244
- ] ,
1198
+ files : [ 'src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}' ] ,
1245
1199
rules : {
1246
1200
'import/no-default-export' : 'error' ,
1247
1201
} ,
0 commit comments