Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin-generator] don't generate .eslintrc.js files for internal plugins #96921

Merged
merged 3 commits into from
Apr 13, 2021

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Apr 13, 2021

Turns out a bug in the plugin generator lead to .eslintrc.js files being created in all generated plugin directories, including internal plugins, leading to license headers being disabled in these files 🙃

We should be fine with the license text in the license dir, these headers are just to make things more clear, but we should be using them either way!

@spalger spalger added Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.11.0 v7.12.0 v7.13.0 labels Apr 13, 2021
@spalger spalger requested a review from a team as a code owner April 13, 2021 06:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~/dev/kibana(pr/96921*) » node scripts/generate_plugin.js test_plugin                                                                                                                                      jon@xps 
? Plugin name (use camelCase) test                                                                                                                                                                                 
? Will this plugin be part of the Kibana repository? Yes                                                                                                                                                           
? What type of internal plugin would you like to create X-Pack                                                                                                                                                     
? Should an UI plugin be generated? Yes                                                                                                                                                                            
? Should a server plugin be generated? Yes                                                                                                                                                                         
 succ 🎉                                                                                                                                                                                                           
                                                                                                                                                                                                                   
      Your plugin has been created in x-pack/plugins/test                                                                                                                                                          
                                                                                                                                                                                                                   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/dev/kibana(pr/96921*) » cd x-pack/plugins/test
~/dev/kibana/x-pack/plugins/test(pr/96921*) » ls -Rlah                                                                                                                                                     jon@xps
.:
total 36K
drwxrwxr-x  5 jon jon 4.0K Apr 13 09:01 .
drwxr-xr-x 68 jon jon 4.0K Apr 13 09:01 ..
drwxrwxr-x  2 jon jon 4.0K Apr 13 09:01 common
-rw-rw-r--  1 jon jon  182 Dec 21 15:15 .eslintrc.js
-rw-rw-r--  1 jon jon  104 Dec 21 15:15 .i18nrc.json
-rw-rw-r--  1 jon jon  164 Dec 21 15:15 kibana.json
drwxrwxr-x  3 jon jon 4.0K Apr 13 09:01 public
-rwxrwxr-x  1 jon jon  203 Dec 21 15:15 README.md
drwxrwxr-x  3 jon jon 4.0K Apr 13 09:01 server

./common:
total 12K
drwxrwxr-x 2 jon jon 4.0K Apr 13 09:01 .
drwxrwxr-x 5 jon jon 4.0K Apr 13 09:01 ..
-rw-rw-r-- 1 jon jon   68 Dec 21 15:15 index.ts

./public:
total 28K
drwxrwxr-x 3 jon jon 4.0K Apr 13 09:01 .
drwxrwxr-x 5 jon jon 4.0K Apr 13 09:01 ..
-rw-rw-r-- 1 jon jon  633 Dec 21 15:15 application.tsx
drwxrwxr-x 2 jon jon 4.0K Apr 13 09:01 components
-rw-rw-r-- 1 jon jon    0 Dec 21 15:15 index.scss
-rw-rw-r-- 1 jon jon  285 Dec 21 15:15 index.ts
-rw-rw-r-- 1 jon jon 1.3K Dec 21 15:15 plugin.ts
-rw-rw-r-- 1 jon jon  350 Dec 21 15:15 types.ts

./public/components:
total 12K
drwxrwxr-x 2 jon jon 4.0K Apr 13 09:01 .
drwxrwxr-x 3 jon jon 4.0K Apr 13 09:01 ..
-rw-rw-r-- 1 jon jon 3.7K Dec 21 15:15 app.tsx

./server:
total 24K
drwxrwxr-x 3 jon jon 4.0K Apr 13 09:01 .
drwxrwxr-x 5 jon jon 4.0K Apr 13 09:01 ..
-rw-rw-r-- 1 jon jon  399 Dec 21 15:15 index.ts
-rw-rw-r-- 1 jon jon  769 Dec 21 15:15 plugin.ts
drwxrwxr-x 2 jon jon 4.0K Apr 13 09:01 routes
-rw-rw-r-- 1 jon jon  204 Dec 21 15:15 types.ts

./server/routes:
total 12K
drwxrwxr-x 2 jon jon 4.0K Apr 13 09:01 .
drwxrwxr-x 3 jon jon 4.0K Apr 13 09:01 ..
-rw-rw-r-- 1 jon jon  353 Dec 21 15:15 index.ts

@spalger
Copy link
Contributor Author

spalger commented Apr 13, 2021

@jbudz thanks for running the generator but it still created a .eslintrc.js file for your internal plugin. Did you bootstrap?

Copy link
Contributor

@kqualters-elastic kqualters-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 sorry for not noticing this, lgtm

@jbudz
Copy link
Member

jbudz commented Apr 13, 2021

Apologies, I misread the top comment and thought we were getting nested .eslintrc's. Re-ran bootstrap, LGTM (again).

@spalger spalger merged commit 27c191d into elastic:master Apr 13, 2021
@spalger spalger deleted the fix/plugin-generator/eslintrc branch April 13, 2021 14:43
@spalger spalger added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 13, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 13, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.11 Commit could not be cherrypicked due to conflicts
7.12 Commit could not be cherrypicked due to conflicts
7.x

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 96921

spalger pushed a commit to spalger/kibana that referenced this pull request Apr 13, 2021
…gins (elastic#96921)

Co-authored-by: spalger <[email protected]>
# Conflicts:
#	x-pack/plugins/timelines/common/index.ts
#	x-pack/plugins/timelines/public/components/index.tsx
#	x-pack/plugins/timelines/public/index.ts
#	x-pack/plugins/timelines/public/plugin.ts
#	x-pack/plugins/timelines/public/types.ts
#	x-pack/plugins/timelines/server/config.ts
#	x-pack/plugins/timelines/server/index.ts
#	x-pack/plugins/timelines/server/plugin.ts
#	x-pack/plugins/timelines/server/routes/index.ts
#	x-pack/plugins/timelines/server/types.ts
kibanamachine added a commit that referenced this pull request Apr 13, 2021
…gins (#96921) (#96981)

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

Co-authored-by: Spencer <[email protected]>
Co-authored-by: spalger <[email protected]>
spalger pushed a commit that referenced this pull request Apr 13, 2021
…gins (#96921) (#96983)

Co-authored-by: spalger <[email protected]>
# Conflicts:
#	x-pack/plugins/timelines/common/index.ts
#	x-pack/plugins/timelines/public/components/index.tsx
#	x-pack/plugins/timelines/public/index.ts
#	x-pack/plugins/timelines/public/plugin.ts
#	x-pack/plugins/timelines/public/types.ts
#	x-pack/plugins/timelines/server/config.ts
#	x-pack/plugins/timelines/server/index.ts
#	x-pack/plugins/timelines/server/plugin.ts
#	x-pack/plugins/timelines/server/routes/index.ts
#	x-pack/plugins/timelines/server/types.ts
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 14, 2021
@spalger spalger removed the v7.11.0 label Apr 14, 2021
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants