Skip to content

Commit

Permalink
Update ESLint config for version 8 (#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg committed Nov 25, 2021
1 parent 3ee0f91 commit 77793b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
js/lib/*
js/mode/*

# js class static blocks is currently ignored as it fails test
live-examples/js-examples/classes/classes-static-initialization.js
live-examples/js-examples/classes/classes-static.js
7 changes: 0 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,6 @@
"no-control-regex": "off"
}
},
{
// Only until the "d" flag is supported by eslint.
"files": ["**/regexp/regexp-prototype-hasindices.js"],
"rules": {
"no-invalid-regexp": "warn"
}
},
{
"files": ["**/set/set-prototype-foreach.js"],
"rules": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class ClassWithStaticInitializationBlock {
static staticProperty1 = "Property 1";
static staticProperty1 = 'Property 1';
static staticProperty2;
static {
this.staticProperty2 = "Property 2"
this.staticProperty2 = 'Property 2';
}
}

console.log(ClassWithStaticInitializationBlock.staticProperty1);
// output: "Property 1"
console.log(ClassWithStaticInitializationBlock.staticProperty2);
// output: "Property 2"
// output: "Property 2"
4 changes: 2 additions & 2 deletions live-examples/js-examples/classes/classes-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class ClassWithStaticMethod {
static staticMethod() {
return 'static method has been called.';
}
static {
console.log("Class static initialization block called");
static {
console.log('Class static initialization block called');
}
}

Expand Down

0 comments on commit 77793b8

Please sign in to comment.