Skip to content

Commit

Permalink
test(eslint-plugin): property and method selectors should have higher…
Browse files Browse the repository at this point in the history
… precedence than other meta selctors
  • Loading branch information
susisu committed Dec 15, 2020
1 parent d35a539 commit f2e4ef7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/eslint-plugin/tests/rules/naming-convention.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,31 @@ ruleTester.run('naming-convention', rule, {
},
],
},
{
code: `
const obj = {
Foo: 42,
Bar() {
return 42;
},
};
`,
parserOptions,
options: [
{
selector: 'memberLike',
format: ['camelCase'],
},
{
selector: 'property',
format: ['PascalCase'],
},
{
selector: 'method',
format: ['PascalCase'],
},
],
},
],
invalid: [
{
Expand Down

0 comments on commit f2e4ef7

Please sign in to comment.