Skip to content

Commit cc57b3d

Browse files
committed
Bump version, update deps and eslint and fix warnings
1 parent 93cfd43 commit cc57b3d

5 files changed

+402
-522
lines changed

eslint.config.cjs

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const globals = require("globals");
2+
const js = require("@eslint/js");
3+
4+
const { FlatCompat } = require("@eslint/eslintrc");
5+
6+
const compat = new FlatCompat({
7+
baseDirectory: __dirname,
8+
recommendedConfig: js.configs.recommended,
9+
allConfig: js.configs.all
10+
});
11+
12+
module.exports = [...compat.extends("eslint:recommended"), {
13+
languageOptions: {
14+
globals: {
15+
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
16+
...globals.commonjs,
17+
...globals.node,
18+
},
19+
20+
ecmaVersion: 2020,
21+
sourceType: "commonjs",
22+
23+
parserOptions: {
24+
ecmaFeatures: {
25+
jsx: false,
26+
},
27+
},
28+
},
29+
30+
rules: {
31+
"no-const-assign": "warn",
32+
"no-this-before-super": "warn",
33+
"no-undef": "warn",
34+
"no-unreachable": "warn",
35+
"no-unused-vars": "warn",
36+
"constructor-super": "warn",
37+
"valid-typeof": "warn",
38+
semi: "error",
39+
"no-console": "off",
40+
"no-var": "error",
41+
"prefer-const": "error",
42+
},
43+
}, {
44+
files: ["tests/**/*"],
45+
46+
languageOptions: {
47+
globals: {
48+
...globals.jest,
49+
},
50+
},
51+
}];

install.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class Installer {
200200
deferred.resolve(false);
201201
});
202202
}
203-
catch (error) {
203+
catch {
204204
deferred.resolve(false);
205205
}
206206
return deferred.promise;

0 commit comments

Comments
 (0)