Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False triggering of the 'effector/enforce-store-naming-convention' rule in relation to factories. #158

Open
Marsony opened this issue Mar 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Marsony
Copy link

Marsony commented Mar 11, 2024

Easy example:

const createTicketDetailsVerifyQuery = ({
  headers = createStore({}),
}: {
  headers: Store<Record<string, unknown>>;
}) => {
  return createJsonQuery({
    params: declareParams<{ id: number; email: string }>(),
    request: {
      url: ({ id }) => createUrl('support/tickets/' + id + '/token'),
      method: 'GET',
      headers: combine([$headers, headers], ([sharedHeaders, headers]) => ({
        ...sharedHeaders,
        ...headers,
      })),
      query: ({ email }) => ({ email }),
    },
    response: {
      contract: valibotContract(
        v.object({
          masked_email: v.string(),
        }),
      ),
    },
  });
};

Error:
ESLint: Store "createTicketDetailsVerifyQuery" should be named with prefix, rename it to "$createTicketDetailsVerifyQuery"(effector/enforce-store-naming-convention)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants