diff options
| author | Shinigami <[email protected]> | 2022-01-29 18:53:43 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-29 18:53:43 +0100 |
| commit | 86beb8317d213f3a47edb46e36678adeff01c1b1 (patch) | |
| tree | d0ac39226a2d29aee2e77968b1edfc5c69c5ab3f | |
| parent | 8dfd6ece95b890cdcd14dcde29074ab74475c70e (diff) | |
| download | faker-86beb8317d213f3a47edb46e36678adeff01c1b1.tar.xz faker-86beb8317d213f3a47edb46e36678adeff01c1b1.zip | |
chore: setup improved linting (#151)
| -rw-r--r-- | .eslintignore | 7 | ||||
| -rw-r--r-- | .eslintrc | 50 | ||||
| -rw-r--r-- | .eslintrc.js | 70 | ||||
| -rw-r--r-- | package.json | 15 | ||||
| -rw-r--r-- | pnpm-lock.yaml | 497 | ||||
| -rw-r--r-- | scripts/apidoc.ts | 4 | ||||
| -rw-r--r-- | scripts/verifyCommit.ts | 3 | ||||
| -rw-r--r-- | src/helpers.ts | 2 | ||||
| -rw-r--r-- | src/internet.ts | 9 | ||||
| -rw-r--r-- | src/locales/ar/name/last_name.ts | 1 | ||||
| -rw-r--r-- | src/name.ts | 6 | ||||
| -rw-r--r-- | src/unique.ts | 4 | ||||
| -rw-r--r-- | src/vendor/unique.ts | 2 | ||||
| -rw-r--r-- | src/vendor/user-agent.ts | 4 | ||||
| -rw-r--r-- | src/word.ts | 11 | ||||
| -rw-r--r-- | test/animal.spec.ts | 2 | ||||
| -rw-r--r-- | test/commerce.spec.ts | 2 | ||||
| -rw-r--r-- | test/random.spec.ts | 8 | ||||
| -rw-r--r-- | tsconfig.lint.json | 7 |
19 files changed, 535 insertions, 169 deletions
diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 18395137..00000000 --- a/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -/coverage -/dist -/docs/.vitepress/dist -/lib -.yarn/ -package-lock.json -yarn.lock diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 3473432c..00000000 --- a/.eslintrc +++ /dev/null @@ -1,50 +0,0 @@ -{ - "env": { - "browser": true, - "jquery": true, - "node": true - }, - "globals": {}, - "rules": { - "no-multi-str": 2, - "no-debugger": 0, - "strict": 0, - "semi": 0, - "linebreak-style": 0, - "no-bitwise": 2, - "no-cond-assign": 0, - "curly": 2, - "eqeqeq": 0, - "no-eq-null": 0, - "no-eval": 0, - "no-unused-expressions": 0, - "guard-for-in": 0, - "wrap-iife": [2, "any"], - "no-use-before-define": [ - 2, - { - "functions": false - } - ], - "no-loop-func": 2, - "no-caller": 2, - "no-script-url": 2, - "no-shadow": 2, - "no-new-func": 0, - "no-new-wrappers": 0, - "no-undef": 2, - "new-cap": 0, - "no-empty": 2, - "no-new": 0, - "no-ternary": 2, - "no-plusplus": 0, - "dot-notation": 0, - "indent": [ - 2, - 2, - { - "SwitchCase": 1 - } - ] - } -} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..344efdde --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,70 @@ +// @ts-check +const { defineConfig } = require('eslint-define-config'); +const { readGitignoreFiles } = require('eslint-gitignore'); + +module.exports = defineConfig({ + ignorePatterns: [ + ...readGitignoreFiles(), + '.eslintrc.js', // Skip self linting + ], + root: true, + env: { + browser: true, + node: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'plugin:prettier/recommended', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + project: ['./tsconfig.lint.json'], + sourceType: 'module', + warnOnUnsupportedTypeScriptVersion: false, + }, + plugins: ['@typescript-eslint', 'prettier'], + rules: { + // We may want to use this in the future + 'no-useless-escape': 'off', + + '@typescript-eslint/ban-ts-comment': 'warn', + '@typescript-eslint/ban-types': 'warn', + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/no-inferrable-types': [ + 'error', + { ignoreParameters: true }, + ], + '@typescript-eslint/no-unsafe-argument': 'warn', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'warn', + '@typescript-eslint/no-var-requires': 'warn', + '@typescript-eslint/restrict-plus-operands': 'warn', + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowNumber: true, + allowBoolean: true, + }, + ], + '@typescript-eslint/unbound-method': 'warn', + }, + overrides: [ + { + files: ['test/*.spec.ts'], + rules: { + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowNumber: true, + allowBoolean: true, + allowAny: true, + }, + ], + }, + }, + ], +}); diff --git a/package.json b/package.json index 843312aa..6f103173 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "docs:dev:run": "vitepress dev docs", "docs:serve": "vitepress serve docs", "format": "prettier --write .", - "lint": "echo 'TODO eslint'", + "lint": "eslint .", "test": "vitest", "coverage": "vitest run --coverage", "cypress": "cypress", @@ -81,17 +81,24 @@ "*": [ "prettier --write --ignore-unknown" ], - "/dist/**/*.{js,ts}": [ - "eslint --ext .js,.ts" + "**/*.ts": [ + "eslint --ext .ts" ] }, "devDependencies": { + "@types/node": "~16.11.21", + "@typescript-eslint/eslint-plugin": "~5.10.1", + "@typescript-eslint/parser": "~5.10.1", "@vitest/ui": "~0.2.5", "c8": "~7.11.0", "conventional-changelog-cli": "~2.2.2", "cypress": "~9.3.1", "esbuild": "~0.14.14", - "eslint": "~8.7.0", + "eslint-config-prettier": "~8.3.0", + "eslint-define-config": "~1.2.3", + "eslint-gitignore": "~0.1.0", + "eslint-plugin-prettier": "~4.0.0", + "eslint": "~8.8.0", "esno": "~0.14.0", "lint-staged": "~12.3.2", "npm-run-all": "~4.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e2b209f8..da3644f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,12 +1,19 @@ lockfileVersion: 5.3 specifiers: + '@types/node': ~16.11.21 + '@typescript-eslint/eslint-plugin': ~5.10.1 + '@typescript-eslint/parser': ~5.10.1 '@vitest/ui': ~0.2.5 c8: ~7.11.0 conventional-changelog-cli: ~2.2.2 cypress: ~9.3.1 esbuild: ~0.14.14 - eslint: ~8.7.0 + eslint: ~8.8.0 + eslint-config-prettier: ~8.3.0 + eslint-define-config: ~1.2.3 + eslint-gitignore: ~0.1.0 + eslint-plugin-prettier: ~4.0.0 esno: ~0.14.0 lint-staged: ~12.3.2 npm-run-all: ~4.1.5 @@ -22,12 +29,19 @@ specifiers: vitest: ~0.2.5 devDependencies: + '@types/node': 16.11.21 + '@typescript-eslint/eslint-plugin': 5.10.1_5bb2413551d07429e4087fb9ca3ae3ea + '@typescript-eslint/parser': [email protected][email protected] '@vitest/ui': 0.2.5 c8: 7.11.0 conventional-changelog-cli: 2.2.2 cypress: 9.3.1 esbuild: 0.14.14 - eslint: 8.7.0 + eslint: 8.8.0 + eslint-config-prettier: [email protected] + eslint-define-config: 1.2.3 + eslint-gitignore: [email protected] + eslint-plugin-prettier: 4.0.0_43197c8d12d1d439034cfcf65e1c48c2 esno: [email protected] lint-staged: 12.3.2 npm-run-all: 4.1.5 @@ -50,108 +64,108 @@ packages: '@algolia/autocomplete-shared': 1.5.0 dev: true - /@algolia/autocomplete-preset-algolia/[email protected]: + /@algolia/autocomplete-preset-algolia/[email protected]: resolution: {integrity: sha512-iiFxKERGHkvkiupmrFJbvESpP/zv5jSgH714XRiP5LDvUHaYOo4GLAwZCFf2ef/L5tdtPBARvekn6k1Xf33gjA==} peerDependencies: '@algolia/client-search': ^4.9.1 algoliasearch: ^4.9.1 dependencies: '@algolia/autocomplete-shared': 1.5.0 - algoliasearch: 4.12.0 + algoliasearch: 4.12.1 dev: true /@algolia/autocomplete-shared/1.5.0: resolution: {integrity: sha512-bRSkqHHHSwZYbFY3w9hgMyQRm86Wz27bRaGCbNldLfbk0zUjApmE4ajx+ZCVSLqxvcUEjMqZFJzDsder12eKsg==} dev: true - /@algolia/cache-browser-local-storage/4.12.0: - resolution: {integrity: sha512-l+G560B6N1k0rIcOjTO1yCzFUbg2Zy2HCii9s03e13jGgqduVQmk79UUCYszjsJ5GPJpUEKcVEtAIpP7tjsXVA==} + /@algolia/cache-browser-local-storage/4.12.1: + resolution: {integrity: sha512-ERFFOnC9740xAkuO0iZTQqm2AzU7Dpz/s+g7o48GlZgx5p9GgNcsuK5eS0GoW/tAK+fnKlizCtlFHNuIWuvfsg==} dependencies: - '@algolia/cache-common': 4.12.0 + '@algolia/cache-common': 4.12.1 dev: true - /@algolia/cache-common/4.12.0: - resolution: {integrity: sha512-2Z8BV+NX7oN7RmmQbLqmW8lfN9aAjOexX1FJjzB0YfKC9ifpi9Jl4nSxlnbU+iLR6QhHo0IfuyQ7wcnucCGCGQ==} + /@algolia/cache-common/4.12.1: + resolution: {integrity: sha512-UugTER3V40jT+e19Dmph5PKMeliYKxycNPwrPNADin0RcWNfT2QksK9Ff2N2W7UKraqMOzoeDb4LAJtxcK1a8Q==} dev: true - /@algolia/cache-in-memory/4.12.0: - resolution: {integrity: sha512-b6ANkZF6vGAo+sYv6g25W5a0u3o6F549gEAgtTDTVA1aHcdWwe/HG/dTJ7NsnHbuR+A831tIwnNYQjRp3/V/Jw==} + /@algolia/cache-in-memory/4.12.1: + resolution: {integrity: sha512-U6iaunaxK1lHsAf02UWF58foKFEcrVLsHwN56UkCtwn32nlP9rz52WOcHsgk6TJrL8NDcO5swMjtOQ5XHESFLw==} dependencies: - '@algolia/cache-common': 4.12.0 + '@algolia/cache-common': 4.12.1 dev: true - /@algolia/client-account/4.12.0: - resolution: {integrity: sha512-gzXN75ZydNheNXUN3epS+aLsKnB/PHFVlGUUjXL8WHs4lJP3B5FtHvaA/NCN5DsM3aamhuY5p0ff1XIA+Lbcrw==} + /@algolia/client-account/4.12.1: + resolution: {integrity: sha512-jGo4ConJNoMdTCR2zouO0jO/JcJmzOK6crFxMMLvdnB1JhmMbuIKluOTJVlBWeivnmcsqb7r0v7qTCPW5PAyxQ==} dependencies: - '@algolia/client-common': 4.12.0 - '@algolia/client-search': 4.12.0 - '@algolia/transporter': 4.12.0 + '@algolia/client-common': 4.12.1 + '@algolia/client-search': 4.12.1 + '@algolia/transporter': 4.12.1 dev: true - /@algolia/client-analytics/4.12.0: - resolution: {integrity: sha512-rO2cZCt00Opk66QBZb7IBGfCq4ZE3EiuGkXssf2Monb5urujy0r8CknK2i7bzaKtPbd2vlvhmLP4CEHQqF6SLQ==} + /@algolia/client-analytics/4.12.1: + resolution: {integrity: sha512-h1It7KXzIthlhuhfBk7LteYq72tym9maQDUsyRW0Gft8b6ZQahnRak9gcCvKwhcJ1vJoP7T7JrNYGiYSicTD9g==} dependencies: - '@algolia/client-common': 4.12.0 - '@algolia/client-search': 4.12.0 - '@algolia/requester-common': 4.12.0 - '@algolia/transporter': 4.12.0 + '@algolia/client-common': 4.12.1 + '@algolia/client-search': 4.12.1 + '@algolia/requester-common': 4.12.1 + '@algolia/transporter': 4.12.1 dev: true - /@algolia/client-common/4.12.0: - resolution: {integrity: sha512-fcrFN7FBmxiSyjeu3sF4OnPkC1l7/8oyQ8RMM8CHpVY8cad6/ay35MrfRfgfqdzdFA8LzcBYO7fykuJv0eOqxw==} + /@algolia/client-common/4.12.1: + resolution: {integrity: sha512-obnJ8eSbv+h94Grk83DTGQ3bqhViSWureV6oK1s21/KMGWbb3DkduHm+lcwFrMFkjSUSzosLBHV9EQUIBvueTw==} dependencies: - '@algolia/requester-common': 4.12.0 - '@algolia/transporter': 4.12.0 + '@algolia/requester-common': 4.12.1 + '@algolia/transporter': 4.12.1 dev: true - /@algolia/client-personalization/4.12.0: - resolution: {integrity: sha512-wCJfSQEmX6ZOuJBJGjy+sbXiW0iy7tMNAhsVMV9RRaJE4727e5WAqwFWZssD877WQ74+/nF/VyTaB1+wejo33Q==} + /@algolia/client-personalization/4.12.1: + resolution: {integrity: sha512-sMSnjjPjRgByGHYygV+5L/E8a6RgU7l2GbpJukSzJ9GRY37tHmBHuvahv8JjdCGJ2p7QDYLnQy5bN5Z02qjc7Q==} dependencies: - '@algolia/client-common': 4.12.0 - '@algolia/requester-common': 4.12.0 - '@algolia/transporter': 4.12.0 + '@algolia/client-common': 4.12.1 + '@algolia/requester-common': 4.12.1 + '@algolia/transporter': 4.12.1 dev: true - /@algolia/client-search/4.12.0: - resolution: {integrity: sha512-ik6dswcTQtOdZN+8aKntI9X2E6Qpqjtyda/+VANiHThY9GD2PBXuNuuC2HvlF26AbBYp5xaSE/EKxn1DIiIJ4Q==} + /@algolia/client-search/4.12.1: + resolution: {integrity: sha512-MwwKKprfY6X2nJ5Ki/ccXM2GDEePvVjZnnoOB2io3dLKW4fTqeSRlC5DRXeFD7UM0vOPPHr4ItV2aj19APKNVQ==} dependencies: - '@algolia/client-common': 4.12.0 - '@algolia/requester-common': 4.12.0 - '@algolia/transporter': 4.12.0 + '@algolia/client-common': 4.12.1 + '@algolia/requester-common': 4.12.1 + '@algolia/transporter': 4.12.1 dev: true - /@algolia/logger-common/4.12.0: - resolution: {integrity: sha512-V//9rzLdJujA3iZ/tPhmKR/m2kjSZrymxOfUiF3024u2/7UyOpH92OOCrHUf023uMGYHRzyhBz5ESfL1oCdh7g==} + /@algolia/logger-common/4.12.1: + resolution: {integrity: sha512-fCgrzlXGATNqdFTxwx0GsyPXK+Uqrx1SZ3iuY2VGPPqdt1a20clAG2n2OcLHJpvaa6vMFPlJyWvbqAgzxdxBlQ==} dev: true - /@algolia/logger-console/4.12.0: - resolution: {integrity: sha512-pHvoGv53KXRIJHLk9uxBwKirwEo12G9+uo0sJLWESThAN3v5M+ycliU1AkUXQN8+9rds2KxfULAb+vfyfBKf8A==} + /@algolia/logger-console/4.12.1: + resolution: {integrity: sha512-0owaEnq/davngQMYqxLA4KrhWHiXujQ1CU3FFnyUcMyBR7rGHI48zSOUpqnsAXrMBdSH6rH5BDkSUUFwsh8RkQ==} dependencies: - '@algolia/logger-common': 4.12.0 + '@algolia/logger-common': 4.12.1 dev: true - /@algolia/requester-browser-xhr/4.12.0: - resolution: {integrity: sha512-rGlHNMM3jIZBwSpz33CVkeXHilzuzHuFXEEW1icP/k3KW7kwBrKFJwBy42RzAJa5BYlLsTCFTS3xkPhYwTQKLg==} + /@algolia/requester-browser-xhr/4.12.1: + resolution: {integrity: sha512-OaMxDyG0TZG0oqz1lQh9e3woantAG1bLnuwq3fmypsrQxra4IQZiyn1x+kEb69D2TcXApI5gOgrD4oWhtEVMtw==} dependencies: - '@algolia/requester-common': 4.12.0 + '@algolia/requester-common': 4.12.1 dev: true - /@algolia/requester-common/4.12.0: - resolution: {integrity: sha512-qgfdc73nXqpVyOMr6CMTx3nXvud9dP6GcMGDqPct+fnxogGcJsp24cY2nMqUrAfgmTJe9Nmy7Lddv0FyHjONMg==} + /@algolia/requester-common/4.12.1: + resolution: {integrity: sha512-XWIrWQNJ1vIrSuL/bUk3ZwNMNxl+aWz6dNboRW6+lGTcMIwc3NBFE90ogbZKhNrFRff8zI4qCF15tjW+Fyhpow==} dev: true - /@algolia/requester-node-http/4.12.0: - resolution: {integrity: sha512-mOTRGf/v/dXshBoZKNhMG00ZGxoUH9QdSpuMKYnuWwIgstN24uj3DQx+Ho3c+uq0TYfq7n2v71uoJWuiW32NMQ==} + /@algolia/requester-node-http/4.12.1: + resolution: {integrity: sha512-awBtwaD+s0hxkA1aehYn8F0t9wqGoBVWgY4JPHBmp1ChO3pK7RKnnvnv7QQa9vTlllX29oPt/BBVgMo1Z3n1Qg==} dependencies: - '@algolia/requester-common': 4.12.0 + '@algolia/requester-common': 4.12.1 dev: true - /@algolia/transporter/4.12.0: - resolution: {integrity: sha512-MOQVHZ4BcBpf3LtOY/3fqXHAcvI8MahrXDHk9QrBE/iGensQhDiZby5Dn3o2JN/zd9FMnVbdPQ8gnkiMwZiakQ==} + /@algolia/transporter/4.12.1: + resolution: {integrity: sha512-BGeNgdEHc6dXIk2g8kdlOoQ6fQ6OIaKQcplEj7HPoi+XZUeAvRi3Pff3QWd7YmybWkjzd9AnTzieTASDWhL+sQ==} dependencies: - '@algolia/cache-common': 4.12.0 - '@algolia/logger-common': 4.12.0 - '@algolia/requester-common': 4.12.0 + '@algolia/cache-common': 4.12.1 + '@algolia/logger-common': 4.12.1 + '@algolia/requester-common': 4.12.1 dev: true /@babel/code-frame/7.16.7: @@ -240,9 +254,9 @@ packages: react-dom: '>= 16.8.0 < 18.0.0' dependencies: '@algolia/autocomplete-core': 1.5.0 - '@algolia/autocomplete-preset-algolia': [email protected] + '@algolia/autocomplete-preset-algolia': [email protected] '@docsearch/css': 3.0.0-alpha.42 - algoliasearch: 4.12.0 + algoliasearch: 4.12.1 transitivePeerDependencies: - '@algolia/client-search' dev: true @@ -289,6 +303,27 @@ packages: engines: {node: '>=8'} dev: true + /@nodelib/fs.scandir/2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.13.0 + dev: true + /@polka/url/1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true @@ -307,6 +342,10 @@ packages: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} dev: true + /@types/json-schema/7.0.9: + resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} + dev: true + /@types/minimist/1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true @@ -315,6 +354,10 @@ packages: resolution: {integrity: sha512-j11XSuRuAlft6vLDEX4RvhqC0KxNxx6QIyMXNb0vHHSNPXTPeiy3algESWmOOIzEtiEL0qiowPU3ewW9hHVa7Q==} dev: true + /@types/node/16.11.21: + resolution: {integrity: sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==} + dev: true + /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -331,10 +374,136 @@ packages: resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} requiresBuild: true dependencies: - '@types/node': 14.18.9 + '@types/node': 16.11.21 dev: true optional: true + /@typescript-eslint/eslint-plugin/5.10.1_5bb2413551d07429e4087fb9ca3ae3ea: + resolution: {integrity: sha512-xN3CYqFlyE/qOcy978/L0xLR2HlcAGIyIK5sMOasxaaAPfQRj/MmMV6OC3I7NZO84oEUdWCOju34Z9W8E0pFDQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/parser': [email protected][email protected] + '@typescript-eslint/scope-manager': 5.10.1 + '@typescript-eslint/type-utils': [email protected][email protected] + '@typescript-eslint/utils': [email protected][email protected] + debug: 4.3.3 + eslint: 8.8.0 + functional-red-black-tree: 1.0.1 + ignore: 5.2.0 + regexpp: 3.2.0 + semver: 7.3.5 + tsutils: [email protected] + typescript: 4.5.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser/[email protected][email protected]: + resolution: {integrity: sha512-GReo3tjNBwR5RnRO0K2wDIDN31cM3MmDtgyQ85oAxAmC5K3j/g85IjP+cDfcqDsDDBf1HNKQAD0WqOYL8jXqUA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.10.1 + '@typescript-eslint/types': 5.10.1 + '@typescript-eslint/typescript-estree': [email protected] + debug: 4.3.3 + eslint: 8.8.0 + typescript: 4.5.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager/5.10.1: + resolution: {integrity: sha512-Lyvi559Gvpn94k7+ElXNMEnXu/iundV5uFmCUNnftbFrUbAJ1WBoaGgkbOBm07jVZa682oaBU37ao/NGGX4ZDg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.10.1 + '@typescript-eslint/visitor-keys': 5.10.1 + dev: true + + /@typescript-eslint/type-utils/[email protected][email protected]: + resolution: {integrity: sha512-AfVJkV8uck/UIoDqhu+ptEdBoQATON9GXnhOpPLzkQRJcSChkvD//qsz9JVffl2goxX+ybs5klvacE9vmrQyCw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/utils': [email protected][email protected] + debug: 4.3.3 + eslint: 8.8.0 + tsutils: [email protected] + typescript: 4.5.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types/5.10.1: + resolution: {integrity: sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/typescript-estree/[email protected]: + resolution: {integrity: sha512-PwIGnH7jIueXv4opcwEbVGDATjGPO1dx9RkUl5LlHDSe+FXxPwFL5W/qYd5/NHr7f6lo/vvTrAzd0KlQtRusJQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.10.1 + '@typescript-eslint/visitor-keys': 5.10.1 + debug: 4.3.3 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.5 + tsutils: [email protected] + typescript: 4.5.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/[email protected][email protected]: + resolution: {integrity: sha512-RRmlITiUbLuTRtn/gcPRi4202niF+q7ylFLCKu4c+O/PcpRvZ/nAUwQ2G00bZgpWkhrNLNnvhZLbDn8Ml0qsQw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.9 + '@typescript-eslint/scope-manager': 5.10.1 + '@typescript-eslint/types': 5.10.1 + '@typescript-eslint/typescript-estree': [email protected] + eslint: 8.8.0 + eslint-scope: 5.1.1 + eslint-utils: [email protected] + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys/5.10.1: + resolution: {integrity: sha512-NjQ0Xinhy9IL979tpoTRuLKxMc0zJC7QVSdeerXs2/QvOy2yRkzX5dRb10X5woNUdJgU8G3nYRDlI33sq1K4YQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.10.1 + eslint-visitor-keys: 3.2.0 + dev: true + /@vitejs/plugin-vue/[email protected][email protected]: resolution: {integrity: sha512-AZ78WxvFMYd8JmM/GBV6a6SGGTU0GgN/0/4T+FnMMsLzFEzTeAUwuraapy50ifHZsC+G5SvWs86bvaCPTneFlA==} engines: {node: '>=12.0.0'} @@ -478,23 +647,23 @@ packages: uri-js: 4.4.1 dev: true - /algoliasearch/4.12.0: - resolution: {integrity: sha512-fZOMMm+F3Bi5M/MoFIz7hiuyCitJza0Hu+r8Wzz4LIQClC6YGMRq7kT6NNU1fSSoFDSeJIwMfedbbi5G9dJoVQ==} + /algoliasearch/4.12.1: + resolution: {integrity: sha512-c0dM1g3zZBJrkzE5GA/Nu1y3fFxx3LCzxKzcmp2dgGS8P4CjszB/l3lsSh2MSrrK1Hn/KV4BlbBMXtYgG1Bfrw==} dependencies: - '@algolia/cache-browser-local-storage': 4.12.0 - '@algolia/cache-common': 4.12.0 - '@algolia/cache-in-memory': 4.12.0 - '@algolia/client-account': 4.12.0 - '@algolia/client-analytics': 4.12.0 - '@algolia/client-common': 4.12.0 - '@algolia/client-personalization': 4.12.0 - '@algolia/client-search': 4.12.0 - '@algolia/logger-common': 4.12.0 - '@algolia/logger-console': 4.12.0 - '@algolia/requester-browser-xhr': 4.12.0 - '@algolia/requester-common': 4.12.0 - '@algolia/requester-node-http': 4.12.0 - '@algolia/transporter': 4.12.0 + '@algolia/cache-browser-local-storage': 4.12.1 + '@algolia/cache-common': 4.12.1 + '@algolia/cache-in-memory': 4.12.1 + '@algolia/client-account': 4.12.1 + '@algolia/client-analytics': 4.12.1 + '@algolia/client-common': 4.12.1 + '@algolia/client-personalization': 4.12.1 + '@algolia/client-search': 4.12.1 + '@algolia/logger-common': 4.12.1 + '@algolia/logger-console': 4.12.1 + '@algolia/requester-browser-xhr': 4.12.1 + '@algolia/requester-common': 4.12.1 + '@algolia/requester-node-http': 4.12.1 + '@algolia/transporter': 4.12.1 dev: true /ansi-colors/4.1.1: @@ -550,6 +719,20 @@ packages: resolution: {integrity: sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=} dev: true + /array-union/2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /array.prototype.flatmap/1.2.5: + resolution: {integrity: sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.3 + es-abstract: 1.19.1 + dev: true + /arrify/1.0.1: resolution: {integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=} engines: {node: '>=0.10.0'} @@ -1202,6 +1385,13 @@ packages: engines: {node: '>=0.4.0'} dev: true + /dir-glob/3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + /doctrine/3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -1650,6 +1840,59 @@ packages: engines: {node: '>=10'} dev: true + /eslint-config-prettier/[email protected]: + resolution: {integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.8.0 + dev: true + + /eslint-define-config/1.2.3: + resolution: {integrity: sha512-etSYUjXbFzj6SnHV2Abmc2z4yVTMlGiK0WwLvqS5QxFsuRZrgpZPIk6wTAc+R8dDuISWcw07MK6x2OcqDgUFpA==} + engines: {node: '>= 16.9.0', npm: '>= 7.0.0', pnpm: '>= 6.27.1'} + dev: true + + /eslint-gitignore/[email protected]: + resolution: {integrity: sha512-VFvY5Wyjuz5xXDC/NeONHzsh4YQNok2Gzg4SftAAuhkbrdHv5CChjfiFyLKhRlgOdCJr5kBquaLXHtuDBTW2/Q==} + engines: {node: ^10.12.0 || >=12.0.0} + peerDependencies: + eslint: '>=6.7.0' + dependencies: + array.prototype.flatmap: 1.2.5 + debug: 4.3.3 + eslint: 8.8.0 + fast-glob: 3.2.11 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-prettier/4.0.0_43197c8d12d1d439034cfcf65e1c48c2: + resolution: {integrity: sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==} + engines: {node: '>=6.0.0'} + peerDependencies: + eslint: '>=7.28.0' + eslint-config-prettier: '*' + prettier: '>=2.0.0' + peerDependenciesMeta: + eslint-config-prettier: + optional: true + dependencies: + eslint: 8.8.0 + eslint-config-prettier: [email protected] + prettier: 2.5.1 + prettier-linter-helpers: 1.0.0 + dev: true + + /eslint-scope/5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + /eslint-scope/7.1.0: resolution: {integrity: sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1658,13 +1901,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/[email protected]: + /eslint-utils/[email protected]: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.7.0 + eslint: 8.8.0 eslint-visitor-keys: 2.1.0 dev: true @@ -1678,8 +1921,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.7.0: - resolution: {integrity: sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==} + /eslint/8.8.0: + resolution: {integrity: sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -1692,7 +1935,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.0 - eslint-utils: [email protected] + eslint-utils: [email protected] eslint-visitor-keys: 3.2.0 espree: 9.3.0 esquery: 1.4.0 @@ -1758,6 +2001,11 @@ packages: estraverse: 5.3.0 dev: true + /estraverse/4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + /estraverse/5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -1840,6 +2088,21 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true + /fast-diff/1.2.0: + resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} + dev: true + + /fast-glob/3.2.11: + resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.4 + dev: true + /fast-json-stable-stringify/2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true @@ -1848,6 +2111,12 @@ packages: resolution: {integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=} dev: true + /fastq/1.13.0: + resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} + dependencies: + reusify: 1.0.4 + dev: true + /fd-slicer/1.1.0: resolution: {integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=} dependencies: @@ -2056,6 +2325,13 @@ packages: ini: 1.3.8 dev: true + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + /glob-parent/6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} @@ -2088,6 +2364,18 @@ packages: type-fest: 0.20.2 dev: true + /globby/11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.11 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + /graceful-fs/4.2.9: resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==} dev: true @@ -2733,6 +3021,11 @@ packages: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true + /merge2/1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + /micromatch/4.0.4: resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} engines: {node: '>=8.6'} @@ -3033,6 +3326,11 @@ packages: pify: 3.0.0 dev: true + /path-type/4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + /pathval/1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true @@ -3088,6 +3386,13 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /prettier-linter-helpers/1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + dependencies: + fast-diff: 1.2.0 + dev: true + /prettier/2.5.1: resolution: {integrity: sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==} engines: {node: '>=10.13.0'} @@ -3148,6 +3453,10 @@ packages: deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. dev: true + /queue-microtask/1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + /quick-lru/4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} @@ -3256,6 +3565,11 @@ packages: signal-exit: 3.0.6 dev: true + /reusify/1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + /rfdc/1.3.0: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true @@ -3275,6 +3589,12 @@ packages: fsevents: 2.3.2 dev: true + /run-parallel/1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + /rxjs/7.5.2: resolution: {integrity: sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==} dependencies: @@ -3374,6 +3694,11 @@ packages: totalist: 3.0.0 dev: true + /slash/3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + /slice-ansi/3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} @@ -3688,10 +4013,24 @@ packages: engines: {node: '>=8'} dev: true + /tslib/1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + /tslib/2.3.1: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} dev: true + /tsutils/[email protected]: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 4.5.5 + dev: true + /tunnel-agent/0.6.0: resolution: {integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=} dependencies: diff --git a/scripts/apidoc.ts b/scripts/apidoc.ts index e2b0d36a..2d180095 100644 --- a/scripts/apidoc.ts +++ b/scripts/apidoc.ts @@ -115,7 +115,7 @@ async function build(): Promise<void> { const methods = module.getChildrenByKind(TypeDoc.ReflectionKind.Method); // Generate method section - for (let method of methods) { + for (const method of methods) { const methodName = method.name; const prettyMethodName = methodName.substring(0, 1).toUpperCase() + @@ -228,7 +228,7 @@ async function build(): Promise<void> { ); } } - let examples = + const examples = signature?.comment?.tags .filter((tag) => tag.tagName === 'example') .map((tag) => tag.text.trimEnd()) || []; diff --git a/scripts/verifyCommit.ts b/scripts/verifyCommit.ts index 65dd0b3d..1b25235c 100644 --- a/scripts/verifyCommit.ts +++ b/scripts/verifyCommit.ts @@ -1,3 +1,6 @@ +/* eslint-disable @typescript-eslint/restrict-plus-operands */ +/* eslint-disable @typescript-eslint/restrict-template-expressions */ + // Invoked on the commit-msg git hook by simple-git-hooks. import colors from 'picocolors'; diff --git a/src/helpers.ts b/src/helpers.ts index 5b95e25f..3082ace1 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -280,6 +280,8 @@ export class Helpers { } } } finally { + // TODO @Shinigami92 2022-01-21: Check what to do here + // eslint-disable-next-line no-unsafe-finally return Array.from(set); } } diff --git a/src/internet.ts b/src/internet.ts index 30331234..1fd25046 100644 --- a/src/internet.ts +++ b/src/internet.ts @@ -490,10 +490,8 @@ export class Internet { * Copyright(c) 2011-2013 Bermi Ferrer <[email protected]> * MIT Licensed */ - // TODO @Shinigami92 2022-01-11: letter is not used - let letter = /[a-zA-Z]$/; - let vowel = /[aeiouAEIOU]$/; - let consonant = /[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]$/; + const vowel = /[aeiouAEIOU]$/; + const consonant = /[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]$/; const _password = ( length = 10, memorable = true, @@ -501,7 +499,6 @@ export class Internet { prefix = '' ): string => { let char: string; - let n: number; if (prefix.length >= length) { return prefix; } @@ -512,7 +509,7 @@ export class Internet { pattern = consonant; } } - n = this.faker.datatype.number(94) + 33; + const n = this.faker.datatype.number(94) + 33; char = String.fromCharCode(n); if (memorable) { char = char.toLowerCase(); diff --git a/src/locales/ar/name/last_name.ts b/src/locales/ar/name/last_name.ts index fb37403a..77bb8719 100644 --- a/src/locales/ar/name/last_name.ts +++ b/src/locales/ar/name/last_name.ts @@ -28,7 +28,6 @@ export default [ 'السقاط', 'ادريس', 'بن حسين', - , 'القلشاني', 'الحجيج', 'بن عبد الكريم', diff --git a/src/name.ts b/src/name.ts index e19dab2c..84f1623d 100644 --- a/src/name.ts +++ b/src/name.ts @@ -139,8 +139,8 @@ export class Name { gender?: string | number ): string { const r = this.faker.datatype.number(8); - let prefix: string = '', - suffix: string = ''; + let prefix = ''; + let suffix = ''; // in particular locales first and last names split by gender, // thus we keep consistency by passing 0 as male and 1 as female @@ -158,6 +158,8 @@ export class Name { if (prefix) { return prefix + ' ' + firstName + ' ' + lastName; } + // TODO @Shinigami92 2022-01-21: Not sure if this fallthrough is wanted + // eslint-disable-next-line no-fallthrough case 1: suffix = this.faker.name.suffix(); if (suffix) { diff --git a/src/unique.ts b/src/unique.ts index 382d2e2d..eef662b2 100644 --- a/src/unique.ts +++ b/src/unique.ts @@ -2,10 +2,10 @@ import * as uniqueExec from './vendor/unique'; export class Unique { // maximum time unique.exec will attempt to run before aborting - maxTime: number = 10; + maxTime = 10; // maximum retries unique.exec will recurse before aborting ( max loop depth ) - maxRetries: number = 10; + maxRetries = 10; // time the script started // startTime: number = 0; diff --git a/src/vendor/unique.ts b/src/vendor/unique.ts index 1fc80d5f..dbe82480 100644 --- a/src/vendor/unique.ts +++ b/src/vendor/unique.ts @@ -9,7 +9,7 @@ const found: Record<string, string> = {}; const exclude: string[] = []; // current iteration or retries of unique.exec ( current loop depth ) -let currentIterations = 0; +const currentIterations = 0; // uniqueness compare function // default behavior is to check value as key against object hash diff --git a/src/vendor/user-agent.ts b/src/vendor/user-agent.ts index 4aef3381..b2982b99 100644 --- a/src/vendor/user-agent.ts +++ b/src/vendor/user-agent.ts @@ -57,8 +57,8 @@ export function generate(faker: Faker) { let max = 0; let return_val: string; - for (let key in obj) { - if (obj.hasOwnProperty(key)) { + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { max = obj[key] + min; return_val = key; if (rand >= min && rand <= max) { diff --git a/src/word.ts b/src/word.ts index 5bd9cefa..a5ee8241 100644 --- a/src/word.ts +++ b/src/word.ts @@ -19,10 +19,9 @@ export class Word { */ adjective(length?: number): string { let wordList = this.faker.definitions.word.adjective; - if (length) { wordList = this.faker.definitions.word.adjective.filter( - (word: string) => word.length == length + (word) => word.length == length ); } @@ -41,8 +40,7 @@ export class Word { * @param optional length of word to return */ adverb(length?: number): string { - var wordList = this.faker.definitions.word.adverb; - + let wordList = this.faker.definitions.word.adverb; if (length) { wordList = this.faker.definitions.word.adverb.filter( (word: string) => word.length == length @@ -65,7 +63,6 @@ export class Word { */ conjunction(length?: number): string { let wordList = this.faker.definitions.word.conjunction; - if (length) { wordList = this.faker.definitions.word.conjunction.filter( (word: string) => word.length == length @@ -88,7 +85,6 @@ export class Word { */ interjection(length?: number): string { let wordList = this.faker.definitions.word.interjection; - if (length) { wordList = this.faker.definitions.word.interjection.filter( (word: string) => word.length == length @@ -111,7 +107,6 @@ export class Word { */ noun(length?: number): string { let wordList = this.faker.definitions.word.noun; - if (length) { wordList = this.faker.definitions.word.noun.filter( (word: string) => word.length == length @@ -134,7 +129,6 @@ export class Word { */ preposition(length?: number): string { let wordList = this.faker.definitions.word.preposition; - if (length) { wordList = this.faker.definitions.word.preposition.filter( (word: string) => word.length == length @@ -157,7 +151,6 @@ export class Word { */ verb(length?: number): string { let wordList = this.faker.definitions.word.verb; - if (length) { wordList = this.faker.definitions.word.verb.filter( (word: string) => word.length == length diff --git a/test/animal.spec.ts b/test/animal.spec.ts index c53963fd..c7af311e 100644 --- a/test/animal.spec.ts +++ b/test/animal.spec.ts @@ -85,7 +85,7 @@ describe('animal', () => { faker.locale = 'en'; }); - for (let { seed, expectations } of seededRuns) { + for (const { seed, expectations } of seededRuns) { describe(`seed: ${seed}`, () => { for (const functionName of functionNames) { it(`${functionName}()`, () => { diff --git a/test/commerce.spec.ts b/test/commerce.spec.ts index 8041982a..6a623182 100644 --- a/test/commerce.spec.ts +++ b/test/commerce.spec.ts @@ -64,7 +64,7 @@ describe('commerce', () => { faker.locale = 'en'; }); - for (let { seed, expectations } of seededRuns) { + for (const { seed, expectations } of seededRuns) { describe(`seed: ${seed}`, () => { for (const functionName of functionNames) { it(`${functionName}()`, () => { diff --git a/test/random.spec.ts b/test/random.spec.ts index 727dae14..1d4b92e0 100644 --- a/test/random.spec.ts +++ b/test/random.spec.ts @@ -89,7 +89,9 @@ describe('random.js', () => { // Check uniqueness subset.forEach((element) => { - expect(!Object.hasOwnProperty(element)).toBe(true); + expect(!Object.prototype.hasOwnProperty.call(subset, element)).toBe( + true + ); subset[element] = true; }, {}); }); @@ -108,7 +110,9 @@ describe('random.js', () => { // Check uniqueness subset.forEach((element) => { - expect(!Object.hasOwnProperty(element)).toBe(true); + expect(!Object.prototype.hasOwnProperty.call(subset, element)).toBe( + true + ); subset[element] = true; }, {}); }); diff --git a/tsconfig.lint.json b/tsconfig.lint.json new file mode 100644 index 00000000..d2bed87b --- /dev/null +++ b/tsconfig.lint.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "rootDir": ".", + "noEmit": true + }, + "exclude": ["node_modules"] +} |
