Adding formater

This commit is contained in:
Martin Karkowski 2021-11-25 08:41:16 +01:00
parent 5abe77f92c
commit 63491a5bef
4 changed files with 1015 additions and 496 deletions

7
.eslintignore Normal file
View File

@ -0,0 +1,7 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
build
test
# don't lint nyc coverage output
coverage

View File

@ -1,92 +1,32 @@
{ {
"env": { "root": true,
"browser": true, "parser": "@typescript-eslint/parser",
"commonjs": true, "plugins": [
"es2021": true "@typescript-eslint",
}, "prettier",
"extends": [ "jest"
"eslint:recommended", ],
"plugin:@typescript-eslint/recommended", "extends": [
"plugin:@typescript-eslint/eslint-recommended", "eslint:recommended",
"prettier" "plugin:@typescript-eslint/recommended",
], "prettier"
"parser": "@typescript-eslint/parser", ],
"parserOptions": { "rules": {
"ecmaVersion": 12 "no-console": 1,
}, "prettier/prettier": 2,
"plugins": [ "@typescript-eslint/no-this-alias": [
"@typescript-eslint", "warn",
"prettier" {
], // "allowDestructuring": false, // Disallow `const { props, state } = this`; true by default
"rules": { "allowedNames": [
"quotes": [ "_this"
"warn",
"double"
],
"semi": [
"warn",
"always"
],
"@typescript-eslint/no-this-alias": [
"warn"
] ]
// , }
// "@typescript-eslint/member-ordering": [ ]
// "warn", },
// { "env": {
// "default": [ "browser": true,
// // Index signature "node": true,
// "signature", "jest/globals": true
// // Fields }
// "public-static-field",
// "protected-static-field",
// "private-static-field",
// "public-decorated-field",
// "protected-decorated-field",
// "private-decorated-field",
// "public-instance-field",
// "protected-instance-field",
// "private-instance-field",
// "public-abstract-field",
// "protected-abstract-field",
// "private-abstract-field",
// "public-field",
// "protected-field",
// "private-field",
// "static-field",
// "instance-field",
// "abstract-field",
// "decorated-field",
// "field",
// // Constructors
// "public-constructor",
// "protected-constructor",
// "private-constructor",
// "constructor",
// // Methods
// "public-static-method",
// "protected-static-method",
// "private-static-method",
// "public-decorated-method",
// "protected-decorated-method",
// "private-decorated-method",
// "public-instance-method",
// "protected-instance-method",
// "private-instance-method",
// "public-abstract-method",
// "protected-abstract-method",
// "private-abstract-method",
// "public-method",
// "protected-method",
// "private-method",
// "static-method",
// "instance-method",
// "abstract-method",
// "decorated-method",
// "method"
// ],
// "order": "alphabetically"
// }
// ]
}
} }

1357
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,17 @@
"doc": "npx jsdoc ./lib -r -c jsdoc.json", "doc": "npx jsdoc ./lib -r -c jsdoc.json",
"dev": "NODE_OPTIONS='--inspect' next dev", "dev": "NODE_OPTIONS='--inspect' next dev",
"build": "tsc && tsc -p tsconfigBackend.json", "build": "tsc && tsc -p tsconfigBackend.json",
"start": "next start" "start": "next start",
"prettier-format": "run-script-os",
"prettier-format:win32": "prettier \"./lib/**/*.ts\" --write",
"prettier-format:darwin:linux": "prettier 'lib/**/*.ts' --write",
"prettier-format:default": "prettier 'lib/**/*.ts' --write",
"prettier-watch": "run-script-os",
"prettier-watch:win32": "onchange \"lib/**/*.ts\" -- prettier --write {{changed}}",
"prettier-watch:darwin:linux": "onchange 'lib/**/*.ts' -- prettier --write {{changed}}",
"prettier-watch:default": "onchange 'lib/**/*.ts' -- prettier --write {{changed}}",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix"
}, },
"mocha": { "mocha": {
"reporter": "spec", "reporter": "spec",
@ -94,6 +104,7 @@
"react-icons": "^4.2.0", "react-icons": "^4.2.0",
"react-toastify": "^8.0.2", "react-toastify": "^8.0.2",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"run-script-os": "^1.1.6",
"rxjs": "^7.3.0", "rxjs": "^7.3.0",
"simple-git": "^2.45.0", "simple-git": "^2.45.0",
"simple-undo": "^1.0.2", "simple-undo": "^1.0.2",
@ -109,25 +120,27 @@
}, },
"devDependencies": { "devDependencies": {
"@types/amqplib": "^0.8.2", "@types/amqplib": "^0.8.2",
"@types/chai": "^4.2.22",
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
"@types/lodash": "^4.14.172", "@types/lodash": "^4.14.172",
"@types/node": "^16.7.10", "@types/node": "^16.7.10",
"@types/react": "^17.0.19", "@types/react": "^17.0.19",
"@types/socket.io": "^3.0.1", "@types/socket.io": "^3.0.1",
"@types/socket.io-client": "^1.4.36", "@types/socket.io-client": "^1.4.36",
"@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^4.30.0", "@typescript-eslint/parser": "^5.4.0",
"@types/chai": "^4.2.22",
"mocha": "^9.1.3",
"chai": "^4.3.4", "chai": "^4.3.4",
"dts-bundle": "^0.7.3", "dts-bundle": "^0.7.3",
"dts-bundle-webpack": "^1.0.2", "dts-bundle-webpack": "^1.0.2",
"eslint": "^7.32.0", "eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"mocha": "^9.1.3",
"npm-check-updates": "^11.8.4", "npm-check-updates": "^11.8.4",
"prettier": "^2.3.2", "onchange": "^7.1.0",
"typescript": "^4.4.2", "prettier": "2.4.1",
"typescript": "^4.5.2",
"webpack": "^4.46.0", "webpack": "^4.46.0",
"webpack-cli": "^4.8.0" "webpack-cli": "^4.8.0"
} }