Replace tslint by eslint

This commit is contained in:
Jonas Lochmann 2022-07-25 02:00:00 +02:00
parent 2f0ca96d7d
commit c70c0d131a
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36
6 changed files with 2134 additions and 357 deletions

17
.eslintrc.json Normal file
View file

@ -0,0 +1,17 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true,
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@typescript-eslint/no-inferrable-types": "off"
}
}
]
}

View file

@ -32,10 +32,6 @@ This requires Node.JS and NPM.
- executes the linter
- the linter is executed during ``npm run build`` too
### npm run lint:fix
- executes the linter and fixes some issues automatically
### npm run develop
- launchs a webserver which serves the application
@ -44,7 +40,7 @@ This requires Node.JS and NPM.
## License
> TimeLimit Server Admin UI
> Copyright (C) 2020 Jonas Lochmann
> Copyright (C) 2020 - 2022 Jonas Lochmann
>
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as

2442
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,15 @@
{
"scripts": {
"develop": "parcel src/index.html",
"lint": "tslint --project .",
"lint:fix": "tslint --project . --fix",
"build": "tslint --project . && rimraf dist && parcel build src/index.html --no-source-maps --no-optimize --no-cache --public-url . && node finish-build.mjs"
"lint": "eslint src",
"build": "eslint src && rimraf dist && parcel build src/index.html --no-source-maps --no-optimize --no-cache --public-url . && node finish-build.mjs"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"eslint": "^8.20.0",
"parcel": "^2.6.2",
"rimraf": "^3.0.1",
"tslint": "^6.0.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^3.7.5"
}
}

View file

@ -1,6 +1,6 @@
/*
* TimeLimit Server Admin UI
* Copyright (C) 2020 Jonas Lochmann
* Copyright (C) 2020 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@ -17,7 +17,7 @@
import { Api, ApiCreator, IllegalAccessDataError } from './api'
const delay = (time: number) => new Promise((resolve, _) => {
const delay = (time: number) => new Promise((resolve) => {
setTimeout(() => resolve(), time)
})

View file

@ -1,12 +0,0 @@
{
"defaultSeverity": "error",
"extends": [
"tslint-config-standard"
],
"jsRules": {},
"rules": {
"await-promise": [true, "Bluebird"],
"ordered-imports": true
},
"rulesDirectory": []
}