Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
fix: sync preferred select usage (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Nov 24, 2020
1 parent 9e23052 commit 8693ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rules/select-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default ESLintUtils.RuleCreator(docsUrl)<Options, MessageIds>({
'Selectors should be used with the pipeable operator: this.store.pipe(select(selector))',
},
},
defaultOptions: [{ mode: OPERATOR }],
defaultOptions: [{ mode: METHOD }],
create: (context, [{ mode }]) => {
return {
[pipeableSelect](node: TSESTree.CallExpression) {
Expand Down
8 changes: 4 additions & 4 deletions tests/rules/store-select.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ruleTester } from '../utils'

ruleTester().run(ruleName, rule, {
valid: [
`this.store.pipe(select(selector));`,
`this.store.select(selector);`,
{
code: `this.store.pipe(select(selector));`,
options: [{ mode: OPERATOR }],
Expand All @@ -24,8 +24,8 @@ ruleTester().run(ruleName, rule, {
invalid: [
fromFixture(
stripIndent`
this.store.select(selector);
~~~~~~~~~~~~~~~~~~~~~~~~~~~ [${operatorSelectMessageId}]
this.store.pipe(select(selector));
~~~~~~~~~~~~~~~~ [${methodSelectMessageId}]
`,
),
fromFixture(
Expand All @@ -40,7 +40,7 @@ ruleTester().run(ruleName, rule, {
fromFixture(
stripIndent`
this.store.select(selector);
~~~~~~~~~~~~~~~~~~~~~~~~~~~ [${operatorSelectMessageId}]
~~~~~~~~~~~~~~~~~~~~~~~~~~~ [${operatorSelectMessageId}]
`,
{
options: [{ mode: OPERATOR }],
Expand Down

0 comments on commit 8693ec7

Please sign in to comment.