Skip to content

Commit

Permalink
Switched version of eslint.
Browse files Browse the repository at this point in the history
  • Loading branch information
XHunter74 committed Apr 24, 2024
1 parent 244c436 commit 138a789
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 2,583 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion admin/tab_m.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global $, location, window, io, systemLang, translateAll*/
/*global $, io, systemLang, translateAll*/
const debugServer = 'http://172.23.215.95:8081/';
const path = location.pathname;

Expand Down
48 changes: 48 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import globals from "globals";
import pluginJs from "@eslint/js";
// import tseslint from "typescript-eslint";


export default [
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
// ...tseslint.configs.recommended,
{
rules: {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"no-console": "off",
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
]
}
},
{
ignores: ["**/.eslintrc.js", "admin/words.js", "/**/node_modules/*", "node_modules/", "socket.io/", "lib/js/", "js/", "eslint.config.mjs", "test/"],
}
];
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Connection extends EventEmitter {

try {
response = decrypt(message.pack, key);
} catch (e) {
} catch {
this.logger.error(`Can not decrypt message from ${message.cid} (${rinfo.address}:${rinfo.port}) with key ${key}`);
this.logger.debug(message.pack);
return;
Expand Down
Loading

0 comments on commit 138a789

Please sign in to comment.