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

Add no-else-return and update no-unused-vars and keyword-spacing #5

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

Rautherdir
Copy link
Contributor

Sets no-else-return to error

An example of previously working code that will now have an error:

if(condition){
	return false;
}else{
	return true;
}

Example of working code with this rule:

if(condition){
	return false;
}
return true;

Sets the ignoreRestSiblings option to true for the no-unused-vars rule

An example of code that would previously have an error but would now work:

const {unused, ...options} = opts;

Example of code that would work before this change:

const {...options} = opts;
delete options.unused;

Adds this: {before: true, after: false} to the overrides option of keyword-spacing

An example of code that would previously have an error but would now work:

if(this.index > this.highestIndex){
	this.highestIndex = this.index;
}

An attempted solution that has an error due to space-infix-ops:

if(this.index >this.highestIndex{
	this.highestIndex = this.index;
}

Example of code that would work before this change:

let highestIndex = this.highestIndex;
if(this.index > highestIndex){
	this.highestIndex = this.index;
}

@Cherry Cherry merged commit 0dd9530 into nodecraft:master Mar 13, 2020
Cherry added a commit that referenced this pull request Mar 13, 2020
Includes changes from #5
@Cherry
Copy link
Member

Cherry commented Mar 13, 2020

Thanks, merged and released in 2.1.4. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants