commit
7ff71ffbd9
7 changed files with 1934 additions and 5 deletions
2
.eslintignore
Normal file
2
.eslintignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
node_modules/
|
||||
dist/
|
10
.eslintrc
Normal file
10
.eslintrc
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
]
|
||||
}
|
1913
package-lock.json
generated
1913
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -10,6 +10,7 @@
|
|||
"clean": "tsc --build --clean",
|
||||
"format": "prettier -w .",
|
||||
"format:report": "prettier -c .",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"test:all": "tsc && nyc mocha --recursive test",
|
||||
"test:single": "mocha",
|
||||
"start": "ts-node npx/bitburner-filesync.ts"
|
||||
|
@ -46,7 +47,10 @@
|
|||
"@types/sinon": "^10.0.13",
|
||||
"@types/sinon-chai": "^3.2.8",
|
||||
"@types/ws": "^8.5.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||
"@typescript-eslint/parser": "^5.40.0",
|
||||
"chai": "^4.3.6",
|
||||
"eslint": "^8.25.0",
|
||||
"mocha": "^10.0.0",
|
||||
"nyc": "^15.1.0",
|
||||
"prettier": "^2.7.1",
|
||||
|
|
|
@ -2,7 +2,7 @@ import convict from "convict";
|
|||
import { existsSync } from "fs";
|
||||
|
||||
// Define a schema
|
||||
export let config = convict({
|
||||
export const config = convict({
|
||||
allowedFiletypes: {
|
||||
doc: "Filetypes that are synchronized to the game.",
|
||||
format: "Array",
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("messageGenerators", () => {
|
|||
const msg = fileRemovalEventToMsg({ path: "sub/test.js" });
|
||||
const result = (msg?.params as FileData).filename;
|
||||
|
||||
if (result && result.hasOwnProperty("filename")) expect(result).to.eq("/sub/test.js");
|
||||
if (result && Object.prototype.hasOwnProperty.call(result, "filename")) expect(result).to.eq("/sub/test.js");
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -46,7 +46,7 @@ describe("messageGenerators", () => {
|
|||
const msg = fileRemovalEventToMsg({ path: "test.js" });
|
||||
const result = (msg?.params as FileData).filename;
|
||||
|
||||
if (result && result.hasOwnProperty("filename")) expect(result).to.eq("test.js");
|
||||
if (result && Object.prototype.hasOwnProperty.call(result, "filename")) expect(result).to.eq("test.js");
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -55,7 +55,7 @@ describe("messageGenerators", () => {
|
|||
const msg = fileRemovalEventToMsg({ path: "/sub/test.js" });
|
||||
const result = (msg?.params as FileData).filename;
|
||||
|
||||
if (result && result.hasOwnProperty("filename")) expect(result).to.eq("/sub/test.js");
|
||||
if (result && Object.prototype.hasOwnProperty.call(result, "filename")) expect(result).to.eq("/sub/test.js");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import chai from "chai";
|
||||
import { createSandbox, stub } from "sinon";
|
||||
import { createSandbox } from "sinon";
|
||||
import sinonChai from "sinon-chai";
|
||||
|
||||
export async function mochaGlobalSetup() {
|
||||
|
|
Loading…
Add table
Reference in a new issue