-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionautofixThis change is related to ESLint's autofixing capabilitiesThis change is related to ESLint's autofixing capabilitiesbugESLint is working incorrectlyESLint is working incorrectlyhelp wantedThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issueruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
👀 Look at the repo with minimal reproducible example (dependencies, config, source): https://github.com/a-x-/eslint-align-check
environment
- ESLint Version: latest (5.13.0)
- Node Version: latest (11.9.0)
- npm Version: latest (6.8.0)
parser: Babel-ESLint
minimal configuration: (full config has no sense never : )
{
"plugins": [
"react",
],
"rules": {
"key-spacing": ["warn", {
"multiLine": {"align": "value"},
}],
// some related a bit rules
"object-curly-newline": ["warn", { "multiline": true, "minProperties": 5 }],
"object-property-newline": ["warn", {"allowAllPropertiesOnSameLine": true }],
"object-curly-spacing": ["warn", "always", {
"arraysInObjects": false,
"objectsInObjects": false,
}],
// ...
},
}
source and command
source before eslint --fix ran
function Component () {
return <div>
<span style={{ display: 'inline-block', marginRight: '10px' }}>
<Fa
icon={ d.icon }
style={{ marginRight: '4px', color: '#0C090A', opacity: '0.6', fontSize: '18px', verticalAlign: 'middle' }}
/>
<span style={{ verticalAlign: 'bottom' }}>{ d.title }</span>
</span>
<span>
<Fa
icon="location-arrow"
style={{ marginRight: '4px', color: '#0C090A', opacity: '0.6', fontSize: '18px', verticalAlign: 'middle' }}
/>
<span style={{ verticalAlign: 'bottom' }}>{ this.state.info?.device.app_version }</span>
<br />
<span style={{ color: '#999999' }} title="Когда последний раз делал что-то в приложении">
{ this.state.info?.device.last_request_at }
</span>
</span>
</div>;
}
eslint --fix file.jsx
Expected: don't re-align objects in jsx curlies.
PR? I'm not sure, maybe I can.
haveyaseen
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionautofixThis change is related to ESLint's autofixing capabilitiesThis change is related to ESLint's autofixing capabilitiesbugESLint is working incorrectlyESLint is working incorrectlyhelp wantedThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issueruleRelates to ESLint's core rulesRelates to ESLint's core rules