eslint-plugin
eslint-plugin copied to clipboard
Fix `enforce-store-naming-convention` rule
Current enforce-store-naming-convention rule passes this case, but it is not correct:
export const sum = createStore(0)
.on(add, (sum) => sum + 1)
.on(sub, (sum) => sum - 1)
.reset(reset);
Same for the domain use case:
const d = createDomain();
const some = d.createStore(0)
.on(add, (sum) => sum + 1)
.on(sub, (sum) => sum - 1)
.reset(reset);
This PR fixes this incorrect behavior
Thanks for tests 🙏
I've found out that in this rule, previously written tests are stored in subdirectories prefix and suffix for different conventions.
Should we move this cases to the same files and extend case on suffix notation as well?