mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-07 14:35:26 +02:00
update linter packages
This commit is contained in:
parent
54e197ee83
commit
21ae41118b
4 changed files with 963 additions and 743 deletions
|
@ -1,13 +1,9 @@
|
|||
{
|
||||
"extends": [
|
||||
"codex/ts",
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
"codex/ts"
|
||||
],
|
||||
"plugins": [
|
||||
"chai-friendly",
|
||||
"@typescript-eslint"
|
||||
"chai-friendly"
|
||||
],
|
||||
"env": {
|
||||
"mocha": true
|
||||
|
|
14
package.json
14
package.json
|
@ -13,7 +13,7 @@
|
|||
"start:dev": "cross-env NODE_ENV=development nodemon --config nodemon.json ./src/bin/server.ts",
|
||||
"test": "cross-env NODE_ENV=testing mocha --recursive ./dist/test --exit",
|
||||
"test:ts": "cross-env NODE_ENV=testing ts-mocha ./src/test/*.ts ./src/test/**/*.ts --exit",
|
||||
"lint": "eslint --fix --cache --ext .ts ./src/backend",
|
||||
"lint": "eslint --fix --ext .ts ./src/backend",
|
||||
"build": "webpack --mode=production",
|
||||
"build:dev": "webpack --mode=development --watch",
|
||||
"precommit": "yarn lint && yarn test:ts",
|
||||
|
@ -46,7 +46,6 @@
|
|||
"open-graph-scraper": "^4.9.0",
|
||||
"ts-node": "^10.1.0",
|
||||
"twig": "^1.15.4",
|
||||
"typescript-eslint": "^0.0.1-alpha.0",
|
||||
"uuid4": "^2.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -75,7 +74,6 @@
|
|||
"@types/cookie-parser": "^1.4.2",
|
||||
"@types/csurf": "^1.11.2",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/eslint": "^7.28.0",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/file-type": "^10.9.1",
|
||||
"@types/jsonwebtoken": "^8.5.4",
|
||||
|
@ -91,8 +89,6 @@
|
|||
"@types/rimraf": "^3.0.1",
|
||||
"@types/sinon": "^10.0.2",
|
||||
"@types/twig": "^1.12.6",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.5",
|
||||
"@typescript-eslint/parser": "^4.28.5",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"babel": "^6.23.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
|
@ -102,10 +98,10 @@
|
|||
"css-loader": "^6.7.0",
|
||||
"cssnano": "^5.1.0",
|
||||
"eslint": "^7.31.0",
|
||||
"eslint-config-codex": "^1.6.2",
|
||||
"eslint-plugin-chai-friendly": "^0.4.1",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-node": "^8.0.1",
|
||||
"eslint-config-codex": "^1.6.4",
|
||||
"eslint-plugin-chai-friendly": "^0.7.2",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"highlight.js": "^11.1.0",
|
||||
"husky": "^1.1.2",
|
||||
"mini-css-extract-plugin": "^2.6.0",
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
* @property {string} message - detail about the exception
|
||||
*/
|
||||
class HttpException extends Error {
|
||||
public status: number;
|
||||
public message: string;
|
||||
/**
|
||||
* @param status - status of the exception
|
||||
* @param message - message about the exception
|
||||
*/
|
||||
constructor(status: number, message: string) {
|
||||
super(message);
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
}
|
||||
public status: number;
|
||||
public message: string;
|
||||
/**
|
||||
* @param status - status of the exception
|
||||
* @param message - message about the exception
|
||||
*/
|
||||
constructor(status: number, message: string) {
|
||||
super(message);
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
export default HttpException;
|
Loading…
Add table
Add a link
Reference in a new issue