diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..77794a2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +root = true + +[*] +indent_style = tab +indent_size = 2 \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 94651b5..70d16ea 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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" - ] - } -} \ No newline at end of file + "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" + } + ] + } +} diff --git a/.prettierignore b/.prettierignore index f59ec20..672a30c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,9 @@ -* \ No newline at end of file +lib +coverage +*.lock +.eslintrc.json +src/WABinary/index.ts +WAProto +WASignalGroup +Example/Example.ts +docs diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..7ef12a7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "useTabs": true, + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "jsxSingleQuote": true, + "bracketSpacing": true, + "arrowParens": "avoid", + "printWidth": 120, + "trailingComma": "none" +} diff --git a/package.json b/package.json index b4389f7..b30d1bf 100644 --- a/package.json +++ b/package.json @@ -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",