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

Fix prettier throw rule error #26071

Merged
merged 1 commit into from
Nov 23, 2018

Conversation

mistic
Copy link
Member

@mistic mistic commented Nov 22, 2018

This is a small PR in order to fix an error I'm watching a lot of times when merging with last master and running the pre-commit hook. The output of the error is the following:

The 'prettier' rule threw an error in '/Users/tiagocosta/elastic/kibana/x-pack/plugins/spaces/public/views/management/edit_space/space_identifier.tsx':
Error: Comment location overlaps with node location
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9525:11)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at decorateComment (/Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9499:7)
    at /Users/tiagocosta/elastic/kibana/node_modules/prettier/index.js:9566:5

This is happening due to a known bug on prettier and this PR solved the line that is causing the problem without changing the behaviour and the logic of it.

PS: I have also ran node scripts/tslint --fix over this file to fix a lot of errors that appear on it, after I solved the prettier problem.

@mistic mistic added review Team:Operations Team label for Operations Team v7.0.0 v6.6.0 Feature:Security/Spaces Platform Security - Spaces feature labels Nov 22, 2018
@mistic mistic requested review from kobelb and spalger November 22, 2018 07:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

I'm not sure which part of this fixes something, but I think this looks good to me.

@mistic
Copy link
Member Author

mistic commented Nov 22, 2018

@spalger this solution for the issue is being discussed here 😃

prettier/prettier#2347 (comment)

@mistic
Copy link
Member Author

mistic commented Nov 23, 2018

6.x: 696a4de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Spaces Platform Security - Spaces feature review Team:Operations Team label for Operations Team v6.6.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants