1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-10 16:05:32 +02:00

update linter packages

This commit is contained in:
Nikita Melnikov 2022-03-06 02:20:56 +04:00
parent 54e197ee83
commit 21ae41118b
4 changed files with 963 additions and 743 deletions

View file

@ -1,13 +1,9 @@
{ {
"extends": [ "extends": [
"codex/ts", "codex/ts"
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
], ],
"plugins": [ "plugins": [
"chai-friendly", "chai-friendly"
"@typescript-eslint"
], ],
"env": { "env": {
"mocha": true "mocha": true

View file

@ -13,7 +13,7 @@
"start:dev": "cross-env NODE_ENV=development nodemon --config nodemon.json ./src/bin/server.ts", "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": "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", "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": "webpack --mode=production",
"build:dev": "webpack --mode=development --watch", "build:dev": "webpack --mode=development --watch",
"precommit": "yarn lint && yarn test:ts", "precommit": "yarn lint && yarn test:ts",
@ -46,7 +46,6 @@
"open-graph-scraper": "^4.9.0", "open-graph-scraper": "^4.9.0",
"ts-node": "^10.1.0", "ts-node": "^10.1.0",
"twig": "^1.15.4", "twig": "^1.15.4",
"typescript-eslint": "^0.0.1-alpha.0",
"uuid4": "^2.0.2" "uuid4": "^2.0.2"
}, },
"devDependencies": { "devDependencies": {
@ -75,7 +74,6 @@
"@types/cookie-parser": "^1.4.2", "@types/cookie-parser": "^1.4.2",
"@types/csurf": "^1.11.2", "@types/csurf": "^1.11.2",
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@types/eslint": "^7.28.0",
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
"@types/file-type": "^10.9.1", "@types/file-type": "^10.9.1",
"@types/jsonwebtoken": "^8.5.4", "@types/jsonwebtoken": "^8.5.4",
@ -91,8 +89,6 @@
"@types/rimraf": "^3.0.1", "@types/rimraf": "^3.0.1",
"@types/sinon": "^10.0.2", "@types/sinon": "^10.0.2",
"@types/twig": "^1.12.6", "@types/twig": "^1.12.6",
"@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.28.5",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"babel": "^6.23.0", "babel": "^6.23.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
@ -102,10 +98,10 @@
"css-loader": "^6.7.0", "css-loader": "^6.7.0",
"cssnano": "^5.1.0", "cssnano": "^5.1.0",
"eslint": "^7.31.0", "eslint": "^7.31.0",
"eslint-config-codex": "^1.6.2", "eslint-config-codex": "^1.6.4",
"eslint-plugin-chai-friendly": "^0.4.1", "eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^8.0.1", "eslint-plugin-node": "^11.1.0",
"highlight.js": "^11.1.0", "highlight.js": "^11.1.0",
"husky": "^1.1.2", "husky": "^1.1.2",
"mini-css-extract-plugin": "^2.6.0", "mini-css-extract-plugin": "^2.6.0",

View file

@ -5,17 +5,17 @@
* @property {string} message - detail about the exception * @property {string} message - detail about the exception
*/ */
class HttpException extends Error { class HttpException extends Error {
public status: number; public status: number;
public message: string; public message: string;
/** /**
* @param status - status of the exception * @param status - status of the exception
* @param message - message about the exception * @param message - message about the exception
*/ */
constructor(status: number, message: string) { constructor(status: number, message: string) {
super(message); super(message);
this.status = status; this.status = status;
this.message = message; this.message = message;
} }
} }
export default HttpException; export default HttpException;

1662
yarn.lock

File diff suppressed because it is too large Load diff