eslint-plugin-ember
eslint-plugin-ember copied to clipboard
use-brace-expansion and spaces
In the docs/rules it mentions that spaces are not allowed. A developer would also encounter an Ember error upon the code being used in the app (as well as failing tests). However I would argue that this should be caught at the eslint level so it could be fixed before the developer even leaves their editor.
I tried doing this in the existing rule, but ran into a few edge cases where it didn't catch it. When I had the great idea: should this be its own rule or added on to the existing one?
I'm happy to implement it either way, but didn't want to make a judgement call and have it not be inline with the repo. Let me know and I can finish working on it :)
Seems fine either way to me, might be easier as a separate focused rule (ala no-spaces-inside-brace-expansion
)...
I find this rule really visually unappealing. If I'm depending on a few large property names, it ends up creating a very long line and I need to scroll horizontally to see the whole thing.
It would be nice if we could split the brace expansion over multiple lines. This also resulted in another rule being triggered no-duplicate-dependent-leys as I ended up having the same key twice in there and it took me a good 30sec to figure out which was the duplicate as I needed to keep scrolling left and right to see the whole list of property names
permissions: computed('model.resourceType.{readPermissionGroups,writePermissionGroups,manageGroupsPermissionGroups,manageResourcesPermissionGroups,editAllPermissionGroups,editDescriptionPermissionGroups,editCustomFieldsPermissionGroups,editPermissionsPermissionGroups}', function() {
// ....
}),
I normally break my lines when they reach about 80 characters but now I'm unable to.. Is there a solution to this?