Closed mesqueeb closed 4 years ago
Likely an upstream issue with the fix code of the different ESlint rules inside of standard. This plugin is just plumbing around standard's fix flag. What version of standard are you running?
@bcomnes
standard --version
10.0.3
@bcomnes Can I check the ESlint rules inside standard to see if anything is set wrong? I'm not sure how to solve this issue. : S
Seems to format fine now. Further refactoring could improve the format.
Results:
class Foo {
duplicate ({ state, getters, commit, dispatch },
{ id = state.selection.selectedId } = { id: state.selection.selectedId }) {
return new Promise((resolve, reject) => {
function doRecursively (item, newParentId) {
// Set up a dupe of the main item & add a node without inserting into the DOM yet.
const dupeItem = JSON.parse(JSON.stringify(item))
return dupeItem.id
}
dispatch('addItem', { item: mainDupeItem, index, addNextItemAs: 'stop' })
.then(_ => {
// One after each other:
// causes bugs with syncing children_order of mainDupeItem afterwards. I DONT KNOW WHY
// dispatch('postNewItem', {items: [mainDupeItem]})
// .then(_ => dispatch('postNewItem', {items: dupeChildren}))
// In one go:
dispatch('postNewItem', { items: mainAndAllChildren })
.then(_ => {
console.log('finished Duplication of :', id)
resolve('finished Duplicate', _)
})
.catch(error => reject(error))
})
})
}
}
I have a formatting problem where the there are countless of indentation mistakes after a few lines of comments.
I have deleted many lines for the sake of focussing on just the wrong formatting.
before:
after:
Please see this final part where all indentation gets really messy.