eslint-plugin icon indicating copy to clipboard operation
eslint-plugin copied to clipboard

Fix `enforce-store-naming-convention` rule

Open iposokhin opened this issue 3 years ago • 1 comments

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

iposokhin avatar Aug 29 '22 19:08 iposokhin

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?

igorkamyshev avatar Aug 31 '22 06:08 igorkamyshev