Add eslint and prettier configuration and dependencies

This commit is contained in:
Telokis
2023-10-28 15:45:51 +02:00
parent 94688d1935
commit f62ec0ab4e
4 changed files with 2916 additions and 8 deletions
+25
View File
@@ -0,0 +1,25 @@
{
"extends": ["eslint:recommended", "eslint-config-prettier"],
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 10
},
"plugins": ["prettier"],
"rules": {
"no-constant-condition": "off",
"no-dupe-else-if": "off",
"no-empty": "warn",
"no-inner-declarations": "warn",
"no-unreachable": "warn",
"no-undef": "warn",
"no-unused-vars": "warn",
"no-redeclare": "warn",
"curly": "error",
"indent": ["error", 2],
"prettier/prettier": "error",
"one-var": ["error", "never"],
"no-sequences": "error"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"tabWidth": 2,
"singleQuote": false,
"printWidth": 120,
"trailingComma": "all",
"semi": true,
"bracketSpacing": true,
"arrowParens": "always"
}
+2863 -1
View File
File diff suppressed because it is too large Load Diff
+18 -6
View File
@@ -5,15 +5,27 @@
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js EU I 8120"
"start": "node server.js EU I 8120",
"lint": "eslint --ext .js .",
"lint:fix": "eslint --fix --ext .js ."
},
"author": "",
"license": "AdventureLandOnlyUse",
"dependencies": {
"socket.io": "^4.0.0",
"request": "^2.88.2",
"range_check": "^1.4.0",
"bytebuffer": "^5.0.1",
"protobufjs": "^6.9.0",
"bytebuffer": "^5.0.1"
}
"range_check": "^1.4.0",
"request": "^2.88.2",
"socket.io": "^4.0.0"
},
"devDependencies": {
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"prettier": "^3.0.3"
},
"eslintIgnore": [
"node_modules/*",
"data.js"
]
}