Skip to content
Permalink
Browse files
Docs: add no-dupe-class-members examples with class fields (refs #14857
…) (#15005)
  • Loading branch information
mdjermanovic committed Sep 2, 2021
1 parent b4232d4 commit 4338b74767fa71e4e8d171f8503aa33d970e509f
Showing 1 changed file with 20 additions and 2 deletions.
@@ -25,7 +25,6 @@ Examples of **incorrect** code for this rule:

```js
/*eslint no-dupe-class-members: "error"*/
/*eslint-env es6*/
class Foo {
bar() { }
@@ -37,6 +36,16 @@ class Foo {
get bar() { }
}
class Foo {
bar;
bar;
}
class Foo {
bar;
bar() { }
}
class Foo {
static bar() { }
static bar() { }
@@ -47,7 +56,6 @@ Examples of **correct** code for this rule:

```js
/*eslint no-dupe-class-members: "error"*/
/*eslint-env es6*/
class Foo {
bar() { }
@@ -59,6 +67,16 @@ class Foo {
set bar(value) { }
}
class Foo {
bar;
qux;
}
class Foo {
bar;
qux() { }
}
class Foo {
static bar() { }
bar() { }

0 comments on commit 4338b74

Please sign in to comment.