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: incorrect indentation in vue/script-indent rule #503

Merged
merged 4 commits into from
Sep 28, 2018

Conversation

ota-meshi
Copy link
Member

fixed #441,#443

@euclid1990
Copy link

👍

Copy link
Member

@michalsnik michalsnik left a comment

Choose a reason for hiding this comment

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

LGTM, left one comment

const trivial = isTrivialToken(tokens[0])
let expectedIndent = Number.MAX_SAFE_INTEGER
function getExpectedIndents (tokens) {
const expectedIndents = []

for (let i = 0; i < tokens.length; ++i) {
const token = tokens[i]
const offsetInfo = offsets.get(token)

// If the first token is not trivial then ignore trivial following tokens.
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this comment is not relevant anymore

Choose a reason for hiding this comment

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

@michalsnik I have a question, If this PR is merged, how can I install latest eslint-plugin-vue with fixed code ?

@ota-meshi
Copy link
Member Author

@michalsnik Thank you for pointing out.
I chenged it, so please check again.

@mghignet
Copy link

Hi!
Any news on this?
Thank you for your work! 😉

@michalsnik
Copy link
Member

Alright, let's give it a spin while we're still in beta and the rule is still uncategorized.

@michalsnik michalsnik merged commit 82d939c into vuejs:master Sep 28, 2018
@ota-meshi ota-meshi deleted the fix-script-indent branch November 13, 2018 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script-Indent rule inconsistences
5 participants