Skip to content

Commit

Permalink
[plugin-generator] don't generate .eslintrc.js files for internal plu…
Browse files Browse the repository at this point in the history
…gins (#96921) (#96981)

Co-authored-by: spalger <[email protected]>

Co-authored-by: Spencer <[email protected]>
Co-authored-by: spalger <[email protected]>
  • Loading branch information
3 people authored Apr 13, 2021
1 parent f143c7d commit 82357bf
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-plugin-generator/src/render_template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export async function renderTemplates({
answers.ui ? [] : 'public/**/*',
answers.ui && !answers.internal ? [] : ['translations/**/*', 'i18nrc.json'],
answers.server ? [] : 'server/**/*',
!answers.internal ? [] : ['eslintrc.js', 'tsconfig.json', 'package.json', '.gitignore']
!answers.internal ? [] : ['.eslintrc.js', 'tsconfig.json', 'package.json', '.gitignore']
)
),

Expand Down
7 changes: 0 additions & 7 deletions x-pack/examples/reporting_example/.eslintrc.js

This file was deleted.

7 changes: 7 additions & 0 deletions x-pack/examples/reporting_example/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export const PLUGIN_ID = 'reportingExample';
export const PLUGIN_NAME = 'reportingExample';
7 changes: 7 additions & 0 deletions x-pack/examples/reporting_example/public/application.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import React from 'react';
import ReactDOM from 'react-dom';
import { AppMountParameters, CoreStart } from '../../../../src/core/public';
Expand Down
7 changes: 7 additions & 0 deletions x-pack/examples/reporting_example/public/components/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import {
EuiCard,
EuiCode,
Expand Down
7 changes: 7 additions & 0 deletions x-pack/examples/reporting_example/public/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { ReportingExamplePlugin } from './plugin';

export function plugin() {
Expand Down
7 changes: 7 additions & 0 deletions x-pack/examples/reporting_example/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import {
AppMountParameters,
AppNavLinkStatus,
Expand Down
7 changes: 7 additions & 0 deletions x-pack/examples/reporting_example/public/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { DeveloperExamplesSetup } from '../../../../examples/developer_examples/public';
import { NavigationPublicPluginStart } from '../../../../src/plugins/navigation/public';
import { ReportingStart } from '../../../plugins/reporting/public';
Expand Down
7 changes: 0 additions & 7 deletions x-pack/plugins/timelines/.eslintrc.js

This file was deleted.

7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export const PLUGIN_ID = 'timelines';
export const PLUGIN_NAME = 'timelines';
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/public/components/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import React from 'react';
import { FormattedMessage, I18nProvider } from '@kbn/i18n/react';

Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/public/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import './index.scss';

import { PluginInitializerContext } from 'src/core/public';
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { CoreSetup, Plugin, PluginInitializerContext } from '../../../../src/core/public';
import { TimelinesPluginSetup, TimelineProps } from './types';
import { getTimelineLazy } from './methods';
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/public/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { ReactElement } from 'react';

export interface TimelinesPluginSetup {
Expand Down
5 changes: 3 additions & 2 deletions x-pack/plugins/timelines/server/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { TypeOf, schema } from '@kbn/config-schema';
Expand Down
5 changes: 3 additions & 2 deletions x-pack/plugins/timelines/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { PluginInitializerContext } from '../../../../src/core/server';
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/server/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import {
PluginInitializerContext,
CoreSetup,
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/server/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { IRouter } from '../../../../../src/core/server';

export function defineRoutes(router: IRouter) {
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/server/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface TimelinesPluginSetup {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
Expand Down

0 comments on commit 82357bf

Please sign in to comment.