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": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {
"quotes": [
"warn",
"double"
],
"semi": [
"warn",
"always"
],
"@typescript-eslint/no-this-alias": [
"warn"
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier",
"jest"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 1,
"prettier/prettier": 2,
"@typescript-eslint/no-this-alias": [
"warn",
{
// "allowDestructuring": false, // Disallow `const { props, state } = this`; true by default
"allowedNames": [
"_this"
]
// ,
// "@typescript-eslint/member-ordering": [
// "warn",
// {
// "default": [
// // Index signature
// "signature",
// // 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"
// }
// ]
}
}
]
},
"env": {
"browser": true,
"node": true,
"jest/globals": true
}
}

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",
"dev": "NODE_OPTIONS='--inspect' next dev",
"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": {
"reporter": "spec",
@ -94,6 +104,7 @@
"react-icons": "^4.2.0",
"react-toastify": "^8.0.2",
"reflect-metadata": "^0.1.13",
"run-script-os": "^1.1.6",
"rxjs": "^7.3.0",
"simple-git": "^2.45.0",
"simple-undo": "^1.0.2",
@ -109,25 +120,27 @@
},
"devDependencies": {
"@types/amqplib": "^0.8.2",
"@types/chai": "^4.2.22",
"@types/express": "^4.17.13",
"@types/lodash": "^4.14.172",
"@types/node": "^16.7.10",
"@types/react": "^17.0.19",
"@types/socket.io": "^3.0.1",
"@types/socket.io-client": "^1.4.36",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"@types/chai": "^4.2.22",
"mocha": "^9.1.3",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"chai": "^4.3.4",
"dts-bundle": "^0.7.3",
"dts-bundle-webpack": "^1.0.2",
"eslint": "^7.32.0",
"eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^9.1.3",
"npm-check-updates": "^11.8.4",
"prettier": "^2.3.2",
"typescript": "^4.4.2",
"onchange": "^7.1.0",
"prettier": "2.4.1",
"typescript": "^4.5.2",
"webpack": "^4.46.0",
"webpack-cli": "^4.8.0"
}