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

[breaking] `padded-blocks`: enable `allowSingleLineBlocks` option #1255

Merged
merged 1 commit into from Aug 10, 2019

Conversation

@91aman
Copy link
Contributor

commented Jan 12, 2017

This Pull request is to fix #1240. This will enable no padding for switch statements and class declarations along with blocks.

Reference : http://eslint.org/docs/rules/padded-blocks

@ljharb

This comment has been minimized.

Copy link
Collaborator

commented Jan 12, 2017

It'd be ideal to at least do this in two commits - one that's a noop; converting the string form to the object form - and then one that adds the semver-minor change.

@91aman

This comment has been minimized.

Copy link
Contributor Author

commented Jan 12, 2017

@ljharb Sorry, I did not understand what you mean by and then one that adds the semver-minor change.

@@ -314,7 +314,7 @@ module.exports = {
'operator-linebreak': 'off',

// enforce padding within blocks
'padded-blocks': ['error', 'never'],
'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }],

This comment has been minimized.

Copy link
@ljharb

ljharb Jan 12, 2017

Collaborator

i mean that "classes" and "switches" should be set to null, or omitted - and that in a second commit/PR, they should be set to "never".

@ljharb ljharb force-pushed the 91aman:master branch from bba36fd to 52369fd Aug 10, 2019

@ljharb ljharb changed the title [eslint config] [semver-minor] enable no padding for switch statements and class declarations [breaking] `padded-blocks`: enable `allowSingleLineBlocks` option Aug 10, 2019

@ljharb

ljharb approved these changes Aug 10, 2019

Copy link
Collaborator

left a comment

This ended up being mostly done; I updated it to uncomment the allowSingleLineBlocks option.

@ljharb ljharb force-pushed the 91aman:master branch 2 times, most recently from 630a3b6 to 19e9ce3 Aug 10, 2019

@ljharb ljharb merged commit 19e9ce3 into airbnb:master Aug 10, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.