mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-22 00:11:02 -05:00
Setup ESLint
This commit is contained in:
parent
56eac44d3d
commit
e2628b7f68
3 changed files with 1304 additions and 0 deletions
40
.eslintrc
Normal file
40
.eslintrc
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-body-style": ["error", "as-needed"],
|
||||
"complexity": ["warn", { "max": 20 }],
|
||||
"curly": ["error", "multi-line", "consistent"],
|
||||
"eqeqeq": ["error", "smart"],
|
||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
||||
"no-empty": ["error", { "allowEmptyCatch": true }],
|
||||
"no-lonely-if": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"one-var": ["error", { "var": "never", "let": "never" }],
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": ["error", { "destructuring": "all" }],
|
||||
"prefer-object-spread": "error",
|
||||
"prefer-rest-params": "warn",
|
||||
"prefer-spread": "warn",
|
||||
"quote-props": ["error", "consistent-as-needed"],
|
||||
"quotes": "error",
|
||||
"spaced-comment": ["error", "always", { "markers": ["/"] }],
|
||||
"yoda": ["error", "never", { "exceptRange": true }],
|
||||
"@typescript-eslint/no-empty-function": ["error", { "allow": ["arrowFunctions"] }],
|
||||
"@typescript-eslint/no-namespace": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["error", {
|
||||
"varsIgnorePattern": "^_",
|
||||
"argsIgnorePattern": "^_"
|
||||
}]
|
||||
}
|
||||
}
|
1260
package-lock.json
generated
1260
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -5,6 +5,7 @@
|
|||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"build": "ncc build --source-map --license license.txt",
|
||||
"test:lint": "eslint src/** && eslint test/**",
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -25,7 +26,10 @@
|
|||
"homepage": "https://github.com/Kir-Antipov/mc-publish#readme",
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.10.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.31.2",
|
||||
"@typescript-eslint/parser": "^4.31.2",
|
||||
"@vercel/ncc": "^0.31.1",
|
||||
"eslint": "^7.32.0",
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"dependencies": {}
|
||||
|
|
Loading…
Reference in a new issue