Improve source linting
This commit is contained in:
parent
6287f221ff
commit
ac23689342
@ -11,9 +11,9 @@
|
||||
"build:icon": "cd node_modules/rcedit/bin && rcedit-x64.exe ../../../bin/Server.exe --set-icon ../../../assets/images/favicon.ico",
|
||||
"build": "npm run release:any && npm run build:icon",
|
||||
"debug": "node --trace-warnings obj/server.js",
|
||||
"lint:fix": "npx eslint --fix \"./src/**/*.ts\"",
|
||||
"lint:check": "npx eslint \"./src/**/*.ts\"",
|
||||
"release:any": "npm run build:ts && npm run build:babel && npm run build:bundle && npm run build:exe"
|
||||
"lint:fix": "npx eslint --fix \"src/**/*.ts\"",
|
||||
"lint:check": "npx eslint \"src/**/*.ts\"",
|
||||
"release:any": "npm run lint:check && npm run build:ts && npm run build:babel && npm run build:bundle && npm run build:exe"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map-support": "^0.5.0",
|
||||
@ -22,45 +22,58 @@
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.16.0",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/eslint-parser": "^7.16.0",
|
||||
"@babel/plugin-transform-runtime": "^7.16.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@types/node": "^14.0.0",
|
||||
"@types/ws": "^8.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.0",
|
||||
"@typescript-eslint/parser": "^5.8.0",
|
||||
"babel-plugin-source-map-support": "^2.1.0",
|
||||
"browserify": "^17.0.0",
|
||||
"bufferutil": "^4.0.5",
|
||||
"bufferutil": "^4.0.0",
|
||||
"core-js": "^3.20.0",
|
||||
"eslint": "^8.5.0",
|
||||
"nexe": "^4.0.0-beta.19",
|
||||
"rcedit": "^3.0.1",
|
||||
"rcedit": "^3.0.0",
|
||||
"typescript": "^4.5.0",
|
||||
"utf-8-validate": "^5.0.7"
|
||||
"utf-8-validate": "^5.0.0"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
[ "@babel/env", { "targets": { "node": "14.0.0" }, "useBuiltIns": "usage", "corejs": "3.20.0" } ],
|
||||
"@babel/preset-typescript"
|
||||
[ "@babel/env", { "targets": { "node": "14.0.0" }, "useBuiltIns": "usage", "corejs": "3.20.0" } ]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-runtime",
|
||||
"@babel/plugin-transform-typescript",
|
||||
"source-map-support"
|
||||
],
|
||||
"sourceMaps": "inline"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"parser": "@babel/eslint-parser",
|
||||
"extends": "eslint:recommended",
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"rules": {
|
||||
"brace-style": [ "error", "allman" ],
|
||||
"indent": [ "error", 4, { "VariableDeclarator": 0, "SwitchCase": 1 } ],
|
||||
"quotes": [ "error", "double" ],
|
||||
"semi": [ "error", "always" ],
|
||||
"no-var": "error",
|
||||
"no-unused-vars": "off",
|
||||
"no-undef": "off"
|
||||
"@typescript-eslint/no-var-requires": "error",
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-unsafe-return": "off"
|
||||
}
|
||||
}
|
||||
}
|
@ -10,9 +10,9 @@
|
||||
"outDir": "obj/ts"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user