fix argument/parameter checking
This commit is contained in:
parent
dba3277200
commit
30d53de356
2 changed files with 69 additions and 11 deletions
|
|
@ -12,7 +12,7 @@ ruleTester.run(
|
|||
valid: [
|
||||
{code: 'i18n.ts.foo.bar', options: [locale] },
|
||||
{code: 'i18n.ts.top', options: [locale] },
|
||||
{code: 'i18n.tsx.foo.baz(1)', options: [locale] },
|
||||
{code: 'i18n.tsx.foo.baz({x:1})', options: [locale] },
|
||||
{code: 'whatever.i18n.ts.blah.blah', options: [locale] },
|
||||
{code: 'whatever.i18n.tsx.does.not.matter', options: [locale] },
|
||||
{code: 'whatever(i18n.ts.foo.bar)', options: [locale] },
|
||||
|
|
@ -20,10 +20,11 @@ ruleTester.run(
|
|||
invalid: [
|
||||
{code: 'i18n.ts.not', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.deep.not', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.deep.not(12)', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.top(1)', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.deep.not({x:12})', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.top({x:1})', options: [locale], errors: 1 },
|
||||
{code: 'i18n.ts.foo.baz', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.foo.baz', options: [locale], errors: 1 },
|
||||
{code: 'i18n.tsx.foo.baz({y:2})', options: [locale], errors: 2 },
|
||||
],
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue