Merge pull request #3798 from Stromwerk/no-throw-literal

This commit is contained in:
Cody Robibero
2022-08-13 08:00:45 -06:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -42,6 +42,7 @@ module.exports = {
'indent': ['error', 4, { 'SwitchCase': 1 }],
'jsx-quotes': ['error', 'prefer-single'],
'keyword-spacing': ['error'],
'no-throw-literal': ['error'],
'max-statements-per-line': ['error'],
'no-duplicate-imports': ['error'],
'no-empty-function': ['error'],
+1 -1
View File
@@ -19,7 +19,7 @@ import globalize from './globalize';
// "00", "00", ".000", "Z", undefined, undefined, undefined]
if (!d) {
throw "Couldn't parse ISO 8601 date string '" + s + "'";
throw new Error("Couldn't parse ISO 8601 date string '" + s + "'");
}
// parse strings, leading zeros into proper ints