From dcd800c610b36619a921ee942b1e061f434660d3 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Fri, 26 Jan 2024 17:29:29 +0100 Subject: [PATCH] chore: migrate to reusable configs --- .eslintrc.js | 22 +- .prettierrc | 13 +- .releaserc | 85 +------- __tests__/helpers.tsx | 11 +- __tests__/with-environment.test.tsx | 2 +- commitlint.config.js | 2 +- package.json | 18 +- pnpm-lock.yaml | 318 ++++++++++++++++++++++------ tsconfig.json | 6 +- 9 files changed, 275 insertions(+), 202 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 11c19db..d158dcd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,39 +1,22 @@ module.exports = { - env: { - browser: true, - es6: true, - node: true, - }, extends: [ 'next/core-web-vitals', + '@fingerprintjs/eslint-config-dx-team', 'plugin:react/recommended', - 'plugin:@typescript-eslint/eslint-recommended', 'plugin:react-hooks/recommended', ], - globals: { - Atomics: 'readonly', - SharedArrayBuffer: 'readonly', - }, - parser: '@typescript-eslint/parser', parserOptions: { ecmaFeatures: { jsx: true, }, - ecmaVersion: 2020, - sourceType: 'module', }, settings: { react: { version: 'detect', }, }, - plugins: ['@typescript-eslint', 'prettier'], - ignorePatterns: ['build/*'], rules: { - semi: ['error', 'never'], - 'linebreak-style': ['error', 'unix'], 'react/display-name': 'off', - 'prefer-const': 'error', 'react/self-closing-comp': [ 'error', { @@ -42,9 +25,6 @@ module.exports = { }, ], 'react/react-in-jsx-scope': 'off', - 'prettier/prettier': 'error', - '@typescript-eslint/no-unused-vars': ['error'], '@next/next/no-html-link-for-pages': 'off', - curly: [2, 'all'], }, } diff --git a/.prettierrc b/.prettierrc index 4858503..882c56e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,12 +1 @@ -{ - "printWidth": 120, - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "jsxSingleQuote": true, - "trailingComma": "es5", - "bracketSpacing": true, - "bracketSameLine": false, - "arrowParens": "always" -} +"@fingerprintjs/prettier-config-dx-team" diff --git a/.releaserc b/.releaserc index 47e9ed6..2d37da5 100644 --- a/.releaserc +++ b/.releaserc @@ -10,93 +10,14 @@ [ "@semantic-release/commit-analyzer", { - "releaseRules": [ - { - "type": "build", - "scope": "deps", - "release": "patch" - }, - { - "type": "docs", - "scope": "README", - "release": "patch" - } - ] + "config": "@fingerprintjs/conventional-changelog-dx-team", + "releaseRules": "@fingerprintjs/conventional-changelog-dx-team/release-rules" } ], [ "@semantic-release/release-notes-generator", { - "preset": "conventionalCommits", - "presetConfig": { - "types": [ - { - "type": "feat", - "section": "Features" - }, - { - "type": "feature", - "section": "Features" - }, - { - "type": "fix", - "section": "Bug Fixes" - }, - { - "type": "perf", - "section": "Performance Improvements" - }, - { - "type": "revert", - "section": "Reverts" - }, - { - "type": "docs", - "scope": "README", - "section": "Documentation" - }, - { - "type": "build", - "scope": "deps", - "section": "Build System" - }, - { - "type": "docs", - "section": "Documentation", - "hidden": true - }, - { - "type": "style", - "section": "Styles", - "hidden": true - }, - { - "type": "chore", - "section": "Miscellaneous Chores", - "hidden": true - }, - { - "type": "refactor", - "section": "Code Refactoring", - "hidden": true - }, - { - "type": "test", - "section": "Tests", - "hidden": true - }, - { - "type": "build", - "section": "Build System", - "hidden": true - }, - { - "type": "ci", - "section": "Continuous Integration", - "hidden": true - } - ] - } + "config": "@fingerprintjs/conventional-changelog-dx-team" } ], "@semantic-release/changelog", diff --git a/__tests__/helpers.tsx b/__tests__/helpers.tsx index 083c7d7..29f8203 100644 --- a/__tests__/helpers.tsx +++ b/__tests__/helpers.tsx @@ -9,12 +9,11 @@ export const getDefaultLoadOptions = () => ({ export const createWrapper = ({ loadOptions = getDefaultLoadOptions(), ...options }: Partial = {}) => - ({ children }: PropsWithChildren<{}>): JSX.Element => - ( - - {children} - - ) + ({ children }: PropsWithChildren<{}>): JSX.Element => ( + + {children} + + ) export const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) diff --git a/__tests__/with-environment.test.tsx b/__tests__/with-environment.test.tsx index 16c7dab..427d025 100644 --- a/__tests__/with-environment.test.tsx +++ b/__tests__/with-environment.test.tsx @@ -1,4 +1,4 @@ -import React, { FunctionComponent } from 'react' +import { FunctionComponent } from 'react' import { act, render } from '@testing-library/react' import { WithEnvironment } from '../src/components/with-environment' import { Link, MemoryRouter, Route, Routes } from 'react-router-dom' diff --git a/commitlint.config.js b/commitlint.config.js index 4fedde6..4f140a3 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1 +1 @@ -module.exports = { extends: ['@commitlint/config-conventional'] } +module.exports = { extends: ['@fingerprintjs/commit-lint-dx-team'] } diff --git a/package.json b/package.json index 655bdea..50a7347 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,11 @@ }, "devDependencies": { "@commitlint/cli": "^17.0.3", - "@commitlint/config-conventional": "^17.0.3", + "@fingerprintjs/commit-lint-dx-team": "^0.0.2", + "@fingerprintjs/conventional-changelog-dx-team": "^0.1.0", + "@fingerprintjs/eslint-config-dx-team": "^0.1.0", + "@fingerprintjs/prettier-config-dx-team": "^0.1.0", + "@fingerprintjs/tsconfig-dx-team": "^0.0.2", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-typescript": "^11.1.6", "@testing-library/preact": "^3.2.3", @@ -71,21 +75,17 @@ "@typescript-eslint/eslint-plugin": "^5.50.0", "@typescript-eslint/parser": "^5.50.0", "commitizen": "^4.2.4", - "conventional-changelog-conventionalcommits": "5.0.0", "cz-conventional-changelog": "^3.3.0", - "eslint": "^8.33.0", - "eslint-config-next": "13.1.6", + "eslint": "^8.0.0", + "eslint-config-next": "14.1.0", "eslint-config-preact": "^1.3.0", - "eslint-config-prettier": "^8.6.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "7.32.2", + "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "husky": "^8.0.1", "jest": "^27.5.1", "jest-environment-jsdom": "^27.5.1", "lint-staged": "^13.0.3", "preact": "^10.11.0", - "prettier": "^2.8.3", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.4.2", @@ -96,7 +96,7 @@ "rollup-plugin-license": "^3.2.0", "rollup-plugin-peer-deps-external": "^2.2.4", "ts-jest": "^27.1.5", - "tslib": "^2.5.0", + "tslib": "^2.6.2", "typedoc": "^0.25.7", "typescript": "^5.3.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 035437a..166fddd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,9 +18,21 @@ importers: '@commitlint/cli': specifier: ^17.0.3 version: 17.8.1 - '@commitlint/config-conventional': - specifier: ^17.0.3 - version: 17.8.1 + '@fingerprintjs/commit-lint-dx-team': + specifier: ^0.0.2 + version: 0.0.2 + '@fingerprintjs/conventional-changelog-dx-team': + specifier: ^0.1.0 + version: 0.1.0 + '@fingerprintjs/eslint-config-dx-team': + specifier: ^0.1.0 + version: 0.1.0(prettier@3.2.4)(typescript@5.3.3) + '@fingerprintjs/prettier-config-dx-team': + specifier: ^0.1.0 + version: 0.1.0 + '@fingerprintjs/tsconfig-dx-team': + specifier: ^0.0.2 + version: 0.0.2 '@rollup/plugin-json': specifier: ^6.1.0 version: 6.1.0(rollup@4.9.6) @@ -57,30 +69,21 @@ importers: commitizen: specifier: ^4.2.4 version: 4.3.0(@types/node@20.11.6)(typescript@5.3.3) - conventional-changelog-conventionalcommits: - specifier: 5.0.0 - version: 5.0.0 cz-conventional-changelog: specifier: ^3.3.0 version: 3.3.0(@types/node@20.11.6)(typescript@5.3.3) eslint: - specifier: ^8.33.0 + specifier: ^8.0.0 version: 8.56.0 eslint-config-next: - specifier: 13.1.6 - version: 13.1.6(eslint@8.56.0)(typescript@5.3.3) + specifier: 14.1.0 + version: 14.1.0(eslint@8.56.0)(typescript@5.3.3) eslint-config-preact: specifier: ^1.3.0 version: 1.3.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint@8.56.0)(jest@27.5.1)(typescript@5.3.3) - eslint-config-prettier: - specifier: ^8.6.0 - version: 8.10.0(eslint@8.56.0) - eslint-plugin-prettier: - specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.56.0)(prettier@2.8.8) eslint-plugin-react: - specifier: 7.32.2 - version: 7.32.2(eslint@8.56.0) + specifier: 7.33.2 + version: 7.33.2(eslint@8.56.0) eslint-plugin-react-hooks: specifier: ^4.6.0 version: 4.6.0(eslint@8.56.0) @@ -99,9 +102,6 @@ importers: preact: specifier: ^10.11.0 version: 10.19.3 - prettier: - specifier: ^2.8.3 - version: 2.8.8 react: specifier: ^18.2.0 version: 18.2.0 @@ -133,7 +133,7 @@ importers: specifier: ^27.1.5 version: 27.1.5(@babel/core@7.23.7)(@types/jest@27.5.2)(jest@27.5.1)(typescript@5.3.3) tslib: - specifier: ^2.5.0 + specifier: ^2.6.2 version: 2.6.2 typedoc: specifier: ^0.25.7 @@ -2187,6 +2187,35 @@ packages: resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@fingerprintjs/commit-lint-dx-team@0.0.2: + resolution: {integrity: sha512-8FDlPI+KhnWsfbf4Lo/TERdiHl9daMhnZb4MsV5nhrta13XXGRSxOvLPUnFmZA0FsxR4HHzpszlr7ZSoPVaLSg==} + dependencies: + '@commitlint/config-conventional': 17.8.1 + dev: true + + /@fingerprintjs/conventional-changelog-dx-team@0.1.0: + resolution: {integrity: sha512-d30rCGvQ5VTMSY0JUgIYEtbSQF11/tbGxbgVRj96lM8YJasL2dSq/zS2s4IwosfX5/XsfeEvg5t1W8IAyknqWg==} + dependencies: + conventional-changelog-conventionalcommits: 7.0.2 + dev: true + + /@fingerprintjs/eslint-config-dx-team@0.1.0(prettier@3.2.4)(typescript@5.3.3): + resolution: {integrity: sha512-Yet9e0dDGmAhMsXnnRWbvTAWLlA2qWGvsOBnRscZtlJnv/Xm4xzurR4C4bqPBcX3rVZkedv9dBTLW3t/wRY0mA==} + peerDependencies: + prettier: '>=3' + dependencies: + '@typescript-eslint/eslint-plugin': 6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 + eslint-config-prettier: 9.1.0(eslint@8.56.0) + eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.4) + prettier: 3.2.4 + transitivePeerDependencies: + - '@types/eslint' + - supports-color + - typescript + dev: true + /@fingerprintjs/fingerprintjs-pro-spa@1.3.0: resolution: {integrity: sha512-XNZiA9kyuzfBZtCCr7B4x24pkp7WCpxzjAQbH87Iq89yWn48Auxc8Xh4a5q2Bpj9velFp1cdp76h3C0KaUsdwQ==} dependencies: @@ -2200,6 +2229,16 @@ packages: tslib: 2.6.2 dev: false + /@fingerprintjs/prettier-config-dx-team@0.1.0: + resolution: {integrity: sha512-ZXoyr5yEIMyBHujVa841dz+aHs9vqzRIU2+IpTG7JTZvbwztVeRdNxBGavWC51TtrlC+Q8Gi6Ba/ynZ6/7EYMg==} + dependencies: + prettier: 3.2.4 + dev: true + + /@fingerprintjs/tsconfig-dx-team@0.0.2: + resolution: {integrity: sha512-UZceav58WeTru7yYlATCqw5fMGfvDLg/Y3FCmNucfu0ASuJ8WrFIJez+rAwrJ5ibUNpnJS2VW/ZIxCh9Ww9aIw==} + dev: true + /@gar/promisify@1.1.3: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true @@ -2612,10 +2651,10 @@ packages: resolution: {integrity: sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg==} dev: false - /@next/eslint-plugin-next@13.1.6: - resolution: {integrity: sha512-o7cauUYsXjzSJkay8wKjpKJf2uLzlggCsGUkPu3lP09Pv97jYlekTC20KJrjQKmSv5DXV0R/uks2ZXhqjNkqAw==} + /@next/eslint-plugin-next@14.1.0: + resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==} dependencies: - glob: 7.1.7 + glob: 10.3.10 dev: true /@next/swc-android-arm-eabi@13.1.6: @@ -2780,6 +2819,11 @@ packages: requiresBuild: true optional: true + /@pkgr/core@0.1.1: + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + dev: true + /@pmmmwh/react-refresh-webpack-plugin@0.5.11(react-refresh@0.11.0)(webpack-dev-server@4.15.1)(webpack@5.90.0): resolution: {integrity: sha512-7j/6vdTym0+qZ6u4XbSAxrWBGYSdCfTzySkj7WAFgDLmSyWlOrWvpyzxlFh5jtw9dn0oL/jtW+06XfFiisN3JQ==} engines: {node: '>= 10.13'} @@ -3834,6 +3878,35 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin@6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.19.1 + '@typescript-eslint/type-utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.19.1 + debug: 4.3.4 + eslint: 8.56.0 + graphemer: 1.4.0 + ignore: 5.3.0 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/experimental-utils@2.34.0(eslint@6.8.0)(typescript@4.9.5): resolution: {integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} @@ -3948,6 +4021,27 @@ packages: transitivePeerDependencies: - supports-color + /@typescript-eslint/parser@6.19.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.19.1 + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.19.1 + debug: 4.3.4 + eslint: 8.56.0 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager@5.62.0: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3955,6 +4049,14 @@ packages: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 + /@typescript-eslint/scope-manager@6.19.1: + resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/visitor-keys': 6.19.1 + dev: true + /@typescript-eslint/type-utils@5.62.0(eslint@8.56.0)(typescript@4.9.5): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3995,10 +4097,35 @@ packages: - supports-color dev: true + /@typescript-eslint/type-utils@6.19.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + debug: 4.3.4 + eslint: 8.56.0 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/types@5.62.0: resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/types@6.19.1: + resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@2.34.0(typescript@4.9.5): resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} @@ -4060,6 +4187,28 @@ packages: transitivePeerDependencies: - supports-color + /@typescript-eslint/typescript-estree@6.19.1(typescript@5.3.3): + resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/visitor-keys': 6.19.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@5.62.0(eslint@6.8.0)(typescript@4.9.5): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4120,6 +4269,25 @@ packages: - typescript dev: true + /@typescript-eslint/utils@6.19.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.19.1 + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + eslint: 8.56.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4127,6 +4295,14 @@ packages: '@typescript-eslint/types': 5.62.0 eslint-visitor-keys: 3.4.3 + /@typescript-eslint/visitor-keys@6.19.1: + resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.19.1 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -6136,18 +6312,16 @@ packages: compare-func: 2.0.0 dev: true - /conventional-changelog-conventionalcommits@5.0.0: - resolution: {integrity: sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==} - engines: {node: '>=10'} + /conventional-changelog-conventionalcommits@6.1.0: + resolution: {integrity: sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==} + engines: {node: '>=14'} dependencies: compare-func: 2.0.0 - lodash: 4.17.21 - q: 1.5.1 dev: true - /conventional-changelog-conventionalcommits@6.1.0: - resolution: {integrity: sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==} - engines: {node: '>=14'} + /conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} dependencies: compare-func: 2.0.0 dev: true @@ -7612,8 +7786,8 @@ packages: optionalDependencies: source-map: 0.6.1 - /eslint-config-next@13.1.6(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-0cg7h5wztg/SoLAlxljZ0ZPUQ7i6QKqRiP4M2+MgTZtxWwNKb2JSwNc18nJ6/kXBI6xYvPraTbQSIhAuVw6czw==} + /eslint-config-next@14.1.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-SBX2ed7DoRFXC6CQSLc/SbLY9Ut6HxNB2wPTcoIWjUMd7aF7O/SIE7111L8FdZ9TXsNV4pulUDnfthpyPtbFUg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -7621,7 +7795,7 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.1.6 + '@next/eslint-plugin-next': 14.1.0 '@rushstack/eslint-patch': 1.7.1 '@typescript-eslint/parser': 5.62.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 @@ -7629,7 +7803,7 @@ packages: eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0) - eslint-plugin-react: 7.32.2(eslint@8.56.0) + eslint-plugin-react: 7.33.2(eslint@8.56.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) typescript: 5.3.3 transitivePeerDependencies: @@ -7650,7 +7824,7 @@ packages: eslint: 6.8.0 eslint-plugin-compat: 4.2.0(eslint@6.8.0) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@2.34.0)(eslint@6.8.0)(jest@27.5.1)(typescript@4.9.5) - eslint-plugin-react: 7.32.2(eslint@6.8.0) + eslint-plugin-react: 7.33.2(eslint@6.8.0) eslint-plugin-react-hooks: 4.6.0(eslint@6.8.0) transitivePeerDependencies: - '@typescript-eslint/eslint-plugin' @@ -7672,7 +7846,7 @@ packages: eslint: 8.56.0 eslint-plugin-compat: 4.2.0(eslint@8.56.0) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint@8.56.0)(jest@27.5.1)(typescript@5.3.3) - eslint-plugin-react: 7.32.2(eslint@8.56.0) + eslint-plugin-react: 7.33.2(eslint@8.56.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) transitivePeerDependencies: - '@typescript-eslint/eslint-plugin' @@ -7681,8 +7855,8 @@ packages: - typescript dev: true - /eslint-config-prettier@8.10.0(eslint@8.56.0): - resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} + /eslint-config-prettier@9.1.0(eslint@8.56.0): + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -7712,7 +7886,7 @@ packages: eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint@8.56.0)(jest@27.5.1)(typescript@4.9.5) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0) - eslint-plugin-react: 7.32.2(eslint@8.56.0) + eslint-plugin-react: 7.33.2(eslint@8.56.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) eslint-plugin-testing-library: 5.11.1(eslint@8.56.0)(typescript@4.9.5) typescript: 4.9.5 @@ -7956,21 +8130,25 @@ packages: object.entries: 1.1.7 object.fromentries: 2.0.7 - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.56.0)(prettier@2.8.8): - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} + /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.4): + resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: '>=7.28.0' + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' eslint-config-prettier: '*' - prettier: '>=2.0.0' + prettier: '>=3.0.0' peerDependenciesMeta: + '@types/eslint': + optional: true eslint-config-prettier: optional: true dependencies: eslint: 8.56.0 - eslint-config-prettier: 8.10.0(eslint@8.56.0) - prettier: 2.8.8 + eslint-config-prettier: 9.1.0(eslint@8.56.0) + prettier: 3.2.4 prettier-linter-helpers: 1.0.0 + synckit: 0.8.8 dev: true /eslint-plugin-react-hooks@4.6.0(eslint@6.8.0): @@ -7990,8 +8168,8 @@ packages: dependencies: eslint: 8.56.0 - /eslint-plugin-react@7.32.2(eslint@6.8.0): - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} + /eslint-plugin-react@7.33.2(eslint@6.8.0): + resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -8000,6 +8178,7 @@ packages: array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 + es-iterator-helpers: 1.0.15 eslint: 6.8.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 @@ -8014,8 +8193,8 @@ packages: string.prototype.matchall: 4.0.10 dev: true - /eslint-plugin-react@7.32.2(eslint@8.56.0): - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} + /eslint-plugin-react@7.33.2(eslint@8.56.0): + resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -8024,6 +8203,7 @@ packages: array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 + es-iterator-helpers: 1.0.15 eslint: 8.56.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 @@ -9052,17 +9232,6 @@ packages: minipass: 7.0.4 path-scurry: 1.10.1 - /glob@7.1.7: - resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -13972,9 +14141,9 @@ packages: fast-diff: 1.3.0 dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.2.4: + resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} + engines: {node: '>=14'} hasBin: true dev: true @@ -16101,6 +16270,14 @@ packages: /symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + /synckit@0.8.8: + resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} + engines: {node: ^14.18.0 || >=16.0.0} + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.6.2 + dev: true + /table@5.4.6: resolution: {integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==} engines: {node: '>=6.0.0'} @@ -16465,6 +16642,15 @@ packages: resolution: {integrity: sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==} dev: false + /ts-api-utils@1.0.3(typescript@5.3.3): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.3.3 + dev: true + /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: false diff --git a/tsconfig.json b/tsconfig.json index b1c7462..f31436f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "@fingerprintjs/tsconfig-dx-team/tsconfig.json", "compilerOptions": { "target": "es5", "lib": [ @@ -6,16 +7,13 @@ "dom.iterable", "esnext" ], - "allowJs": true, + "exactOptionalPropertyTypes": false, // better to turn it on, but we will need to fix the code. "skipLibCheck": true, "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", - "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx"