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

Replace deprecated TSLint with ESLint #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .bithoundrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"critics": {
"lint": {
"engine": "tslint",
"engine": "eslint",
"wc": { "limit": 5000 }
}
}
Expand Down
3 changes: 1 addition & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: "2"
plugins:
tslint:
eslint:
enabled: true
config: tslint.json
checks:
file-lines:
config:
Expand Down
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true
}
5 changes: 3 additions & 2 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
tslint:
config_file: tslint.json
eslint:
enabled: true
config_file: .eslintrc
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ node_modules
src
test
.*
tslint.json
.eslintrc.cjs
*.log
examples
experiment
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prepare": "npm run build",
"dev": "cd src && tsc --declaration -w",
"build": "cd src && tsc --declaration",
"lint": "tslint --project tslint.json src/**/v2/**/*.ts",
"lint": "eslint src/**/v2/**/*.ts",
"test": "npm run build-test && npm run start-test",
"start-test": "node test/v2/root.js && node test/v1/root.js",
"build-test": "cd test/v2/tests.ts && tsc"
Expand All @@ -46,11 +46,13 @@
"@types/mime-types": "^2.1.0",
"@types/node": "^7.0.64",
"@types/request": "0.0.44",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.55.0",
"express": "^4.16.4",
"form-data": "^3.0.0",
"request": "^2.85.0",
"safe-regex": "^1.1.0",
"tslint": "^5.20.1",
"typescript": "^3.7.2",
"webdav-fs": "^1.10.1",
"xml-js": "^1.4.1"
Expand Down
1 change: 0 additions & 1 deletion src/manager/v2/fileSystem/FileSystem.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// tslint:disable:max-file-line-count max-line-length
import {
PrivilegeManagerInfo,
AvailableLocksInfo,
Expand Down
1 change: 0 additions & 1 deletion src/manager/v2/fileSystem/StorageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export class PerUserStorageManager implements IStorageManager
const xml = value as XMLElement;
const attributesLength = Object.keys(xml.attributes).map((at) => at.length + (xml.attributes[at].length as number)).reduce((p, n) => p + n, 0);

// tslint:disable-next-line:restrict-plus-operands
return xml.name.length + attributesLength + (xml.elements && xml.elements.length > 0 ? this.evalPropValue(xml.elements) : 0);
}
evaluateProperty(ctx : RequestContext, fs : FileSystem, name : string, value : ResourcePropertyValue, attributes : PropertyAttributes, callback : IStorageManagerEvaluateCallback) : void
Expand Down
1 change: 0 additions & 1 deletion src/manager/v2/instances/PhysicalFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class PhysicalSerializer implements FileSystemSerializer

unserialize(serializedData : any, callback : ReturnCallback<FileSystem>) : void
{
// tslint:disable-next-line:no-use-before-declare
const fs = new PhysicalFileSystem(serializedData.rootPath);
fs.resources = serializedData.resources;
callback(null, fs);
Expand Down
1 change: 0 additions & 1 deletion src/manager/v2/instances/VirtualFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export class VirtualSerializer implements FileSystemSerializer

unserialize(serializedData : any, callback : ReturnCallback<FileSystem>) : void
{
// tslint:disable-next-line:no-use-before-declare
const fs = new VirtualFileSystem();

if(serializedData.resources)
Expand Down
66 changes: 0 additions & 66 deletions tslint.json

This file was deleted.