Skip to content

Commit ab0876f

Browse files
Update Eslint config, add new rule and handle issue (#3068)
1 parent d276a7d commit ab0876f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"plugins": ["prettier", "jsdoc", "jest"],
44
"env": {
55
"browser": true,
6-
"es6": true,
6+
"es2022": true,
77
"jest/globals": true,
88
"node": true
99
},
@@ -16,14 +16,15 @@
1616
},
1717
"parserOptions": {
1818
"sourceType": "module",
19-
"ecmaVersion": 2020,
19+
"ecmaVersion": 2022,
2020
"ecmaFeatures": {
2121
"globalReturn": true
2222
}
2323
},
2424
"rules": {
2525
"eqeqeq": "error",
2626
"no-prototype-builtins": "off",
27+
"no-throw-literal": "error",
2728
"no-unused-vars": "off",
2829
"no-useless-return": "error",
2930
"prefer-template": "error"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ _This release is scheduled to be released on 2023-04-01._
3737
- Update dates in Calendar widgets every minute
3838
- Cleanup jest coverage for patches
3939
- Update `stylelint` dependencies, switch to `stylelint-config-standard` and handle `stylelint` issues
40+
- Update Eslint config, add new rule and handle issue
4041
- Convert lots of callbacks to async/await
4142
- Fixed Open-Meteo wind speed units
4243

tests/unit/classes/translator_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe("Translator", () => {
188188
const file = "translation_test.json";
189189

190190
XMLHttpRequest.prototype.send = () => {
191-
throw "Shouldn't load files";
191+
throw new Error("Shouldn't load files");
192192
};
193193

194194
Translator.translationsFallback[mmm.name] = {

0 commit comments

Comments
 (0)