chore: add edlint and prettier
This commit is contained in:
parent
0e8f5b34d0
commit
67f2dcb7fc
39
.eslintrc.json
Normal file
39
.eslintrc.json
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"root": true,
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier"
|
||||||
|
],
|
||||||
|
"overrides": [],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": "latest",
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"plugins": ["@typescript-eslint"],
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/ban-ts-comment": ["warn", "allow-with-description"],
|
||||||
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": ["off", { "ignoreRestArgs": true }],
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off"
|
||||||
|
},
|
||||||
|
"ignorePatterns": [
|
||||||
|
"**/dist/**",
|
||||||
|
"**/node_modules/**",
|
||||||
|
"**/abbrevIso*",
|
||||||
|
"**/example*",
|
||||||
|
"**/*.bak",
|
||||||
|
"coverage/**",
|
||||||
|
"docs-shared/lib/**",
|
||||||
|
"packages/*/assets/**",
|
||||||
|
"packages/*/lib/**",
|
||||||
|
"!.vuepress/**",
|
||||||
|
"**/.vuepress/.cache/**",
|
||||||
|
"**/.vuepress/.temp/**"
|
||||||
|
]
|
||||||
|
}
|
3
.vscode/extensions.json
vendored
Normal file
3
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
|
||||||
|
}
|
7
.vscode/setting.json
vendored
Normal file
7
.vscode/setting.json
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"editor.formatOnType": true,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": true
|
||||||
|
}
|
||||||
|
}
|
@ -24,6 +24,7 @@
|
|||||||
"restart-prod": "npm run build-prod && npm run stop && npm run start",
|
"restart-prod": "npm run build-prod && npm run stop && npm run start",
|
||||||
"restart": "npm run restart-dev",
|
"restart": "npm run restart-dev",
|
||||||
"release": "release-it",
|
"release": "release-it",
|
||||||
|
"lint": "prettier --write . && eslint . --ext .ts --fix",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -41,14 +42,22 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.11.17",
|
"@types/node": "^18.11.17",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.59.1",
|
||||||
|
"@typescript-eslint/parser": "^5.59.1",
|
||||||
"compressing": "^1.6.3",
|
"compressing": "^1.6.3",
|
||||||
"concurrently": "^7.6.0",
|
"concurrently": "^7.6.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"esbuild": "^0.17.4",
|
"esbuild": "^0.17.4",
|
||||||
|
"eslint": "^8.39.0",
|
||||||
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"minimist": "^1.2.7",
|
"minimist": "^1.2.7",
|
||||||
|
"prettier": "2.8.8",
|
||||||
"release-it": "^15.6.0",
|
"release-it": "^15.6.0",
|
||||||
"replace-in-file": "^6.3.5",
|
"replace-in-file": "^6.3.5",
|
||||||
"typescript": "^4.9.4",
|
"typescript": "^4.9.4",
|
||||||
"zotero-types": "^1.0.12"
|
"zotero-types": "^1.0.12"
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"tabWidth": 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user