Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use eslint instead of tslint #121

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/*.js
**/dist
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"no-useless-escape": "off", // Suppressing Error -- need to Review Later
"no-trailing-spaces": [ "warn", { "skipBlankLines": true }],// Enabled for auto fixing
"no-const-assign": "error",
"no-constant-condition": "off",
"comma-dangle": [ "error", "never" ], // Enabled for auto fixing
"security/detect-object-injection": "off", // Suppress Warning -- need to Review Later
"@typescript-eslint/ban-types": "off",
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
1. Fork this repo
2. Clone your fork locally (`git clone https://github.com/<youruser>/node-diagnostic-channel
3. Open a terminal and move into your local copy (`cd node-diagnostic-channel`)
* Make sure you have `tsc`, `tslint`, `gulp`, `mocha`, and `docker` installed globally.
* Make sure you have `tsc`, `gulp`, `mocha`, and `docker` installed globally.
4. Run `gulp init` to install dependencies in every subdirectory, and
`docker-compose up -d; gulp test; docker-compose down` to run the test suites. Docker
is useful to run the databases and other external services that are required by the
Expand Down
3 changes: 1 addition & 2 deletions src/diagnostic-channel-publishers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"types": "dist/src/index.d.ts",
"scripts": {
"build": "tsc && node copyTestAssets.js",
"lint": "tslint -c tslint.json -p tsconfig.json",
"lint": "eslint ./ --fix",
"clean": "rimraf ./dist",
"test": "mocha ./dist/tests/{*.js,**/*.js}",
"debug": "mocha --inspect-brk ./dist/tests/{*.js,**/*.js}"
Expand Down Expand Up @@ -38,7 +38,6 @@
"rimraf": "^2.6.1",
"sinon": "1.17.6",
"tedious": "^8.0.1",
"tslint": "^5.0.0",
"typescript": "4.1.2",
"winston": "^3.2.1",
"zone.js": "^0.8.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const azureCoreTracingPatchFunction: PatchFunction = (coreTracing: typeof coreTr
const azureSdkInstr = require("@azure/opentelemetry-instrumentation-azure-sdk") as typeof azureSdkInstrTypes;
openTelemetryInstr.registerInstrumentations({
instrumentations: [
azureSdkInstr.createAzureSdkInstrumentation()
azureSdkInstr.createAzureSdkInstrumentation() as any
]
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ export const makeMongodbcoreConnectionReplayPatchFunction: (mongoCommunication:
const next = mongoCommunication.shift();
if (next.send) {
const expected = new Buffer(next.send);
if (true || expected.compare(buffer) === 0) {
if (mongoCommunication[0].recv) {
const data = new Buffer(mongoCommunication.shift().recv);
setTimeout(() => {
this.connection.emit("data", data);
}, 0);
}
}/*
if (mongoCommunication[0].recv) {
const data = new Buffer(mongoCommunication.shift().recv);
setTimeout(() => {
this.connection.emit("data", data);
}, 0);
}
/*
// TODO: add additional validation that the test doesn't get broken by changes in mongo's communication approach?
else {
console.log(expected.toString());
Expand Down
3 changes: 0 additions & 3 deletions src/diagnostic-channel-publishers/tslint.json

This file was deleted.

5 changes: 2 additions & 3 deletions src/diagnostic-channel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"types": "./dist/src/channel.d.ts",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json",
"lint": "eslint ./ --fix",
"clean": "rimraf ./dist",
"test": "mocha ./dist/tests/**/*.js",
"debug": "mocha --inspect-brk ./dist/tests/**/*.js"
Expand All @@ -28,7 +28,6 @@
"mocha": "^3.2.0",
"rimraf": "^2.6.1",
"sinon": "1.17.6",
"tslint": "^5.0.0",
"typescript": "4.1.2"
},
"files": [
Expand All @@ -39,4 +38,4 @@
"package.json"
],
"license": "MIT"
}
}
3 changes: 0 additions & 3 deletions src/diagnostic-channel/tslint.json

This file was deleted.

5 changes: 2 additions & 3 deletions src/publisher-legacy-tests/mongo3.2.7/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json",
"lint": "eslint ./ --fix",
"clean": "rimraf ./dist",
"test": "mocha --recursive ./dist/{*.js,**/*.js}",
"debug": "mocha --inspect-brk ./dist/tests/{*.js,**/*.js}"
Expand All @@ -23,7 +23,6 @@
"mongodb": "3.2.7",
"q": "1.5.0",
"rimraf": "^2.6.1",
"tslint": "^5.0.0",
"typescript": "4.1.2",
"zone.js": "^0.8.5"
},
Expand All @@ -38,4 +37,4 @@
"package.json"
],
"license": "MIT"
}
}
3 changes: 0 additions & 3 deletions src/publisher-legacy-tests/mongo3.2.7/tslint.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/publisher-legacy-tests/pg6/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json",
"lint": "eslint ./ --fix",
"clean": "rimraf ./dist",
"test": "mocha --recursive ./dist/{*.js,**/*.js}",
"debug": "mocha --inspect-brk ./dist/tests/{*.js,**/*.js}"
Expand All @@ -24,7 +24,6 @@
"pg": "^6.4.1",
"q": "1.5.0",
"rimraf": "^2.6.1",
"tslint": "^5.0.0",
"typescript": "4.1.2",
"zone.js": "^0.8.5"
},
Expand Down
3 changes: 0 additions & 3 deletions src/publisher-legacy-tests/pg6/tslint.json

This file was deleted.

5 changes: 2 additions & 3 deletions src/publisher-legacy-tests/winston2/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json",
"lint": "eslint ./ --fix",
"clean": "rimraf ./dist",
"test": "mocha --recursive ./dist/{*.js,**/*.js}",
"debug": "mocha --inspect-brk ./dist/tests/{*.js,**/*.js}"
Expand All @@ -22,7 +22,6 @@
"mocha": "^3.2.0",
"q": "1.5.0",
"rimraf": "^2.6.1",
"tslint": "^5.0.0",
"typescript": "4.1.2",
"winston": "^2.3.1",
"zone.js": "^0.8.5"
Expand All @@ -38,4 +37,4 @@
"package.json"
],
"license": "MIT"
}
}
3 changes: 0 additions & 3 deletions src/publisher-legacy-tests/winston2/tslint.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/subs/bunyan-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"main": "bunyan.sub.js",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json"
"lint": "eslint ./ --fix"
},
"devDependencies": {
"applicationinsights": ">= 0.19.0",
"diagnostic-channel": "../../diagnostic-channel",
"diagnostic-channel-publishers": "../../diagnostic-channel-publishers",
"mocha": "^3.2.0",
"tslint": "^5.0.0",
"typescript": "4.1.2"
},
"peerDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions src/subs/bunyan-sub/tslint.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/subs/console-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"main": "console.sub.js",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json"
"lint": "eslint ./ --fix"
},
"devDependencies": {
"applicationinsights": ">= 0.19.0",
"diagnostic-channel": "../../diagnostic-channel",
"diagnostic-channel-publishers": "../../diagnostic-channel-publishers",
"mocha": "^3.2.0",
"tslint": "^5.0.0",
"typescript": "4.1.2"
},
"peerDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions src/subs/console-sub/tslint.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/subs/mongodb-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"main": "mongodb.sub.js",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json"
"lint": "eslint ./ --fix"
},
"devDependencies": {
"applicationinsights": ">= 0.19.0",
"diagnostic-channel": "../../diagnostic-channel",
"diagnostic-channel-publishers": "../../diagnostic-channel-publishers",
"mocha": "^3.2.0",
"tslint": "^5.0.0",
"typescript": "4.1.2"
},
"peerDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions src/subs/mongodb-sub/tslint.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/subs/mysql-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"main": "mysql.sub.js",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json"
"lint": "eslint ./ --fix"
},
"devDependencies": {
"applicationinsights": ">= 0.19.0",
"diagnostic-channel": "../../diagnostic-channel",
"diagnostic-channel-publishers": "../../diagnostic-channel-publishers",
"mocha": "^3.2.0",
"tslint": "^5.0.0",
"typescript": "4.1.2"
},
"peerDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions src/subs/mysql-sub/tslint.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/subs/redis-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"main": "redis.sub.js",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json"
"lint": "eslint ./ --fix"
},
"devDependencies": {
"applicationinsights": ">= 0.19.0",
"diagnostic-channel": "../../diagnostic-channel",
"diagnostic-channel-publishers": "../../diagnostic-channel-publishers",
"mocha": "^3.2.0",
"tslint": "^5.0.0",
"typescript": "4.1.2"
},
"peerDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions src/subs/redis-sub/tslint.json

This file was deleted.

23 changes: 0 additions & 23 deletions tslint.json

This file was deleted.