chore: add prettier and editorconfig

chore: update deps
This commit is contained in:
canove
2025-05-06 11:19:59 -03:00
parent a85251250d
commit 8aee55bc83
5 changed files with 58 additions and 31 deletions

5
.editorconfig Normal file
View File

@@ -0,0 +1,5 @@
root = true
[*]
indent_style = tab
indent_size = 2

View File

@@ -1,29 +1,31 @@
{
"extends": "@whiskeysockets",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"ignorePatterns": ["src/Tests/*"],
"rules": {
"@typescript-eslint/no-explicit-any": [
"warn",
{
"ignoreRestArgs": true
}
],
"@typescript-eslint/no-inferrable-types": [
"warn"
],
"@typescript-eslint/no-redundant-type-constituents": [
"warn"
],
"@typescript-eslint/no-unnecessary-type-assertion": [
"warn"
],
"no-restricted-syntax": "off",
"keyword-spacing": [
"warn"
]
}
}
"extends": "@whiskeysockets",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"ignorePatterns": ["src/Tests/*"],
"rules": {
"indent": ["error", "tab", { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": [
"warn",
{
"ignoreRestArgs": true
}
],
"@typescript-eslint/no-inferrable-types": ["warn"],
"@typescript-eslint/no-redundant-type-constituents": ["warn"],
"@typescript-eslint/no-unnecessary-type-assertion": ["warn"],
"no-restricted-syntax": "off",
"keyword-spacing": "off",
"implicit-arrow-linebreak": ["off"],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
]
}
}

View File

@@ -1 +1,9 @@
*
lib
coverage
*.lock
.eslintrc.json
src/WABinary/index.ts
WAProto
WASignalGroup
Example/Example.ts
docs

11
.prettierrc Normal file
View File

@@ -0,0 +1,11 @@
{
"useTabs": true,
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"bracketSpacing": true,
"arrowParens": "avoid",
"printWidth": 120,
"trailingComma": "none"
}

View File

@@ -55,16 +55,17 @@
"@types/jest": "^27.5.1",
"@types/node": "^16.0.0",
"@types/ws": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.32.0",
"conventional-changelog-cli": "^2.2.2",
"eslint": "^8.0.0",
"jest": "^27.0.6",
"jest": "^29.7.0",
"jimp": "^0.16.1",
"json": "^11.0.0",
"link-preview-js": "^3.0.0",
"open": "^8.4.2",
"release-it": "^15.10.3",
"sharp": "^0.32.6",
"ts-jest": "^27.0.3",
"ts-jest": "^29.3.2",
"ts-node": "^10.8.1",
"typedoc": "^0.27.9",
"typedoc-plugin-markdown": "4.4.2",