diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 5e15864b..00000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -__tests__ - -# Files with the same name will not be linted with typescript-eslint -# https://github.com/typescript-eslint/typescript-eslint/issues/5457#issuecomment-1210617414 -index.d.cts diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 6ee35d95..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,6 +0,0 @@ -/** @type {import('@typescript-eslint/utils').TSESLint.Linter.Config} */ -const config = { - extends: ['upleveled'], -}; - -module.exports = config; diff --git a/__tests__/.eslintignore b/__tests__/.eslintignore deleted file mode 100644 index 912f4172..00000000 --- a/__tests__/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -build - -# Next.js build folder -.next diff --git a/__tests__/.eslintrc.cjs b/__tests__/.eslintrc.cjs deleted file mode 100644 index 6ee35d95..00000000 --- a/__tests__/.eslintrc.cjs +++ /dev/null @@ -1,6 +0,0 @@ -/** @type {import('@typescript-eslint/utils').TSESLint.Linter.Config} */ -const config = { - extends: ['upleveled'], -}; - -module.exports = config; diff --git a/__tests__/eslint.config.js b/__tests__/eslint.config.js new file mode 100644 index 00000000..3697aa95 --- /dev/null +++ b/__tests__/eslint.config.js @@ -0,0 +1 @@ +export { default } from 'eslint-config-upleveled'; diff --git a/__tests__/package.json b/__tests__/package.json index c591eb73..7d010b82 100644 --- a/__tests__/package.json +++ b/__tests__/package.json @@ -8,6 +8,7 @@ "Karl Horky ", "Jose Höwer " ], + "type": "module", "main": "index.js", "scripts": { "update-config-version": "pnpm add --save-dev eslint-config-upleveled@latest && pnpm upleveled-eslint-install" @@ -18,7 +19,7 @@ "devDependencies": { "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", - "eslint-config-upleveled": "^6.1.2", + "eslint-config-upleveled": "^7.0.0-1", "postcss-styled-syntax": "^0.5.0", "stylelint": "^15.9.0", "stylelint-config-upleveled": "^1.0.2", diff --git a/__tests__/pnpm-lock.yaml b/__tests__/pnpm-lock.yaml index 667cec6c..75daf0a0 100644 --- a/__tests__/pnpm-lock.yaml +++ b/__tests__/pnpm-lock.yaml @@ -17,8 +17,8 @@ devDependencies: specifier: ^18.2.6 version: 18.2.6 eslint-config-upleveled: - specifier: ^6.1.2 - version: 6.1.2(@babel/eslint-parser@7.22.15)(@next/eslint-plugin-next@14.0.0)(@types/eslint@8.44.6)(@types/node@20.8.9)(@types/react-dom@18.2.6)(@types/react@18.2.14)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-typescript@3.6.1)(eslint-plugin-import@2.29.0)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-jsx-expressions@1.3.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.33.2)(eslint-plugin-security@1.7.1)(eslint-plugin-sonarjs@0.21.0)(eslint-plugin-testing-library@6.1.0)(eslint-plugin-unicorn@48.0.1)(eslint-plugin-upleveled@2.1.9)(eslint@8.52.0)(typescript@5.1.6) + specifier: ^7.0.0-1 + version: 7.0.0-1(@babel/eslint-parser@7.23.3)(@next/eslint-plugin-next@14.0.2)(@types/eslint@8.44.7)(@types/node@20.9.0)(@types/react-dom@18.2.6)(@types/react@18.2.14)(@typescript-eslint/eslint-plugin@6.10.0)(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint-plugin-import@2.29.0)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-jsx-expressions@1.3.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.33.2)(eslint-plugin-security@1.7.1)(eslint-plugin-sonarjs@0.23.0)(eslint-plugin-testing-library@6.1.2)(eslint-plugin-unicorn@49.0.0)(eslint-plugin-upleveled@2.1.9)(eslint@8.53.0)(globals@13.23.0)(typescript@5.1.6) postcss-styled-syntax: specifier: ^0.5.0 version: 0.5.0(postcss@8.4.31) @@ -79,8 +79,8 @@ packages: transitivePeerDependencies: - supports-color - /@babel/eslint-parser@7.22.15(@babel/core@7.23.2)(eslint@8.52.0): - resolution: {integrity: sha512-yc8OOBIQk1EcRrpizuARSQS0TWAcOMpEJ1aafhNznaeYkeL+OhqnDObGFylB8ka8VFF/sZc+S4RzHyO+3LjQxg==} + /@babel/eslint-parser@7.23.3(@babel/core@7.23.2)(eslint@8.53.0): + resolution: {integrity: sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} peerDependencies: '@babel/core': ^7.11.0 @@ -88,7 +88,7 @@ packages: dependencies: '@babel/core': 7.23.2 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.52.0 + eslint: 8.53.0 eslint-visitor-keys: 2.1.0 semver: 6.3.1 dev: true @@ -271,13 +271,13 @@ packages: postcss-selector-parser: 6.0.13 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.52.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.53.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.52.0 + eslint: 8.53.0 eslint-visitor-keys: 3.4.3 dev: true @@ -286,8 +286,8 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.2: - resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} + /@eslint/eslintrc@2.1.3: + resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -303,8 +303,8 @@ packages: - supports-color dev: true - /@eslint/js@8.52.0: - resolution: {integrity: sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==} + /@eslint/js@8.53.0: + resolution: {integrity: sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -357,8 +357,8 @@ packages: resolution: {integrity: sha512-cIKhxkfVELB6hFjYsbtEeTus2mwrTC+JissfZYM0n+8Fv+g8ucUfOlm3VEDtwtwydZ0Nuauv3bl0qF82nnCAqA==} dev: false - /@next/eslint-plugin-next@14.0.0: - resolution: {integrity: sha512-Ye37nNI09V3yt7pzuzSQtwlvuJ2CGzFszHXkcTHHZgNr7EhTMFLipn3VSJChy+e5+ahTdNApPphc3qCPUsn10A==} + /@next/eslint-plugin-next@14.0.2: + resolution: {integrity: sha512-APrYFsXfAhnysycqxHcpg6Y4i7Ukp30GzVSZQRKT3OczbzkqGjt33vNhScmgoOXYBU1CfkwgtXmNxdiwv1jKmg==} dependencies: glob: 7.1.7 dev: true @@ -477,8 +477,8 @@ packages: tslib: 2.5.0 dev: false - /@types/eslint@8.44.6: - resolution: {integrity: sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==} + /@types/eslint@8.44.7: + resolution: {integrity: sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==} dependencies: '@types/estree': 1.0.3 '@types/json-schema': 7.0.14 @@ -500,8 +500,8 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node@20.8.9: - resolution: {integrity: sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==} + /@types/node@20.9.0: + resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==} dependencies: undici-types: 5.26.5 dev: true @@ -536,8 +536,8 @@ packages: resolution: {integrity: sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==} dev: true - /@typescript-eslint/eslint-plugin@6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.1.6): - resolution: {integrity: sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==} + /@typescript-eslint/eslint-plugin@6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.1.6): + resolution: {integrity: sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -548,13 +548,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/type-utils': 6.9.0(eslint@8.52.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.10.0 + '@typescript-eslint/type-utils': 6.10.0(eslint@8.53.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.10.0(eslint@8.53.0)(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.10.0 debug: 4.3.4 - eslint: 8.52.0 + eslint: 8.53.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -565,21 +565,21 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils@5.62.0(eslint@8.52.0)(typescript@5.1.6): + /@typescript-eslint/experimental-utils@5.62.0(eslint@8.53.0)(typescript@5.1.6): resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.52.0)(typescript@5.1.6) - eslint: 8.52.0 + '@typescript-eslint/utils': 5.62.0(eslint@8.53.0)(typescript@5.1.6) + eslint: 8.53.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser@6.9.0(eslint@8.52.0)(typescript@5.1.6): - resolution: {integrity: sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==} + /@typescript-eslint/parser@6.10.0(eslint@8.53.0)(typescript@5.1.6): + resolution: {integrity: sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -588,12 +588,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/scope-manager': 6.10.0 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.10.0 debug: 4.3.4 - eslint: 8.52.0 + eslint: 8.53.0 typescript: 5.1.6 transitivePeerDependencies: - supports-color @@ -607,16 +607,16 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/scope-manager@6.9.0: - resolution: {integrity: sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==} + /@typescript-eslint/scope-manager@6.10.0: + resolution: {integrity: sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/visitor-keys': 6.10.0 dev: true - /@typescript-eslint/type-utils@6.9.0(eslint@8.52.0)(typescript@5.1.6): - resolution: {integrity: sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==} + /@typescript-eslint/type-utils@6.10.0(eslint@8.53.0)(typescript@5.1.6): + resolution: {integrity: sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -625,10 +625,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.1.6) - '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.10.0(eslint@8.53.0)(typescript@5.1.6) debug: 4.3.4 - eslint: 8.52.0 + eslint: 8.53.0 ts-api-utils: 1.0.3(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: @@ -645,8 +645,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.9.0: - resolution: {integrity: sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==} + /@typescript-eslint/types@6.10.0: + resolution: {integrity: sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==} engines: {node: ^16.0.0 || >=18.0.0} dev: true @@ -692,8 +692,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.9.0(typescript@5.1.6): - resolution: {integrity: sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==} + /@typescript-eslint/typescript-estree@6.10.0(typescript@5.1.6): + resolution: {integrity: sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -701,8 +701,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/visitor-keys': 6.10.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -713,19 +713,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.52.0)(typescript@5.1.6): + /@typescript-eslint/utils@5.62.0(eslint@8.53.0)(typescript@5.1.6): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) '@types/json-schema': 7.0.14 '@types/semver': 7.5.4 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6) - eslint: 8.52.0 + eslint: 8.53.0 eslint-scope: 5.1.1 semver: 7.5.4 transitivePeerDependencies: @@ -733,19 +733,19 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.9.0(eslint@8.52.0)(typescript@5.1.6): - resolution: {integrity: sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==} + /@typescript-eslint/utils@6.10.0(eslint@8.53.0)(typescript@5.1.6): + resolution: {integrity: sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==} 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.52.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) '@types/json-schema': 7.0.14 '@types/semver': 7.5.4 - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.1.6) - eslint: 8.52.0 + '@typescript-eslint/scope-manager': 6.10.0 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.1.6) + eslint: 8.53.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -768,11 +768,11 @@ packages: eslint-visitor-keys: 3.4.2 dev: true - /@typescript-eslint/visitor-keys@6.9.0: - resolution: {integrity: sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==} + /@typescript-eslint/visitor-keys@6.10.0: + resolution: {integrity: sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/types': 6.10.0 eslint-visitor-keys: 3.4.3 dev: true @@ -922,8 +922,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /ast-types-flow@0.0.7: - resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} + /ast-types-flow@0.0.8: + resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} dev: true /astral-regex@2.0.0: @@ -942,8 +942,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /axe-core@4.8.2: - resolution: {integrity: sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==} + /axe-core@4.7.0: + resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} engines: {node: '>=4'} dev: true @@ -1349,53 +1349,55 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-upleveled@6.1.2(@babel/eslint-parser@7.22.15)(@next/eslint-plugin-next@14.0.0)(@types/eslint@8.44.6)(@types/node@20.8.9)(@types/react-dom@18.2.6)(@types/react@18.2.14)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-typescript@3.6.1)(eslint-plugin-import@2.29.0)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-jsx-expressions@1.3.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.33.2)(eslint-plugin-security@1.7.1)(eslint-plugin-sonarjs@0.21.0)(eslint-plugin-testing-library@6.1.0)(eslint-plugin-unicorn@48.0.1)(eslint-plugin-upleveled@2.1.9)(eslint@8.52.0)(typescript@5.1.6): - resolution: {integrity: sha512-dfb6N0J1Iusak+d/3Og9xhKVEAeiXH18YGfenSKMkOmG29HBhGBMOi/Dery4aKYFH6foC6ICrGQRNA6RlbXB+Q==} + /eslint-config-upleveled@7.0.0-1(@babel/eslint-parser@7.23.3)(@next/eslint-plugin-next@14.0.2)(@types/eslint@8.44.7)(@types/node@20.9.0)(@types/react-dom@18.2.6)(@types/react@18.2.14)(@typescript-eslint/eslint-plugin@6.10.0)(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint-plugin-import@2.29.0)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-jsx-expressions@1.3.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.33.2)(eslint-plugin-security@1.7.1)(eslint-plugin-sonarjs@0.23.0)(eslint-plugin-testing-library@6.1.2)(eslint-plugin-unicorn@49.0.0)(eslint-plugin-upleveled@2.1.9)(eslint@8.53.0)(globals@13.23.0)(typescript@5.1.6): + resolution: {integrity: sha512-5EN1bNz+2WMmMX6++DQo9f83Nv7Nllan3ZzkrjI6V2PPueY3uKIUE0Ba0RUsbh9vSk5tpYtDbM1Lm7jgCUhN7A==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: - '@babel/eslint-parser': ^7.22.15 - '@next/eslint-plugin-next': ^14.0.0 - '@types/eslint': ^8.44.6 - '@types/node': '>=20.8.9' - '@types/react': ^18.2.33 - '@types/react-dom': ^18.2.14 - '@typescript-eslint/eslint-plugin': ^6.9.0 - '@typescript-eslint/parser': ^6.9.0 - eslint: ^8.52.0 + '@babel/eslint-parser': ^7.23.3 + '@next/eslint-plugin-next': ^14.0.2 + '@types/eslint': ^8.44.7 + '@types/node': '>=20.9.0' + '@types/react': ^18.2.37 + '@types/react-dom': ^18.2.15 + '@typescript-eslint/eslint-plugin': ^6.10.0 + '@typescript-eslint/parser': ^6.10.0 + eslint: ^8.53.0 eslint-import-resolver-typescript: ^3.6.1 eslint-plugin-import: ^2.29.0 - eslint-plugin-jsx-a11y: ^6.7.1 + eslint-plugin-jsx-a11y: ^6.8.0 eslint-plugin-jsx-expressions: ^1.3.1 eslint-plugin-react: ^7.33.2 eslint-plugin-react-hooks: ^4.6.0 eslint-plugin-security: ^1.7.1 - eslint-plugin-sonarjs: ^0.21.0 - eslint-plugin-testing-library: ^6.1.0 - eslint-plugin-unicorn: ^48.0.1 + eslint-plugin-sonarjs: ^0.23.0 + eslint-plugin-testing-library: ^6.1.2 + eslint-plugin-unicorn: ^49.0.0 eslint-plugin-upleveled: ^2.1.9 + globals: ^13.23.0 typescript: ^5.2.2 dependencies: - '@babel/eslint-parser': 7.22.15(@babel/core@7.23.2)(eslint@8.52.0) - '@next/eslint-plugin-next': 14.0.0 - '@types/eslint': 8.44.6 - '@types/node': 20.8.9 + '@babel/eslint-parser': 7.23.3(@babel/core@7.23.2)(eslint@8.53.0) + '@next/eslint-plugin-next': 14.0.2 + '@types/eslint': 8.44.7 + '@types/node': 20.9.0 '@types/react': 18.2.14 '@types/react-dom': 18.2.6 - '@typescript-eslint/eslint-plugin': 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.1.6) - eslint: 8.52.0 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.9.0)(eslint-plugin-import@2.29.0)(eslint@8.52.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.52.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.52.0) - eslint-plugin-jsx-expressions: 1.3.1(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.1.6) - eslint-plugin-react: 7.33.2(eslint@8.52.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.52.0) + '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.1.6) + eslint: 8.53.0 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.10.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.53.0) + eslint-plugin-jsx-expressions: 1.3.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.1.6) + eslint-plugin-react: 7.33.2(eslint@8.53.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.53.0) eslint-plugin-security: 1.7.1 - eslint-plugin-sonarjs: 0.21.0(eslint@8.52.0) - eslint-plugin-testing-library: 6.1.0(eslint@8.52.0)(typescript@5.1.6) - eslint-plugin-unicorn: 48.0.1(eslint@8.52.0) - eslint-plugin-upleveled: 2.1.9(eslint@8.52.0) + eslint-plugin-sonarjs: 0.23.0(eslint@8.53.0) + eslint-plugin-testing-library: 6.1.2(eslint@8.53.0)(typescript@5.1.6) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + eslint-plugin-upleveled: 2.1.9(eslint@8.53.0) + globals: 13.23.0 typescript: 5.1.6 dev: true @@ -1409,7 +1411,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.9.0)(eslint-plugin-import@2.29.0)(eslint@8.52.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.10.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -1418,9 +1420,9 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.15.0 - eslint: 8.52.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.52.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.52.0) + eslint: 8.53.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) fast-glob: 3.3.1 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -1432,7 +1434,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.52.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -1453,16 +1455,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.1.6) debug: 3.2.7 - eslint: 8.52.0 + eslint: 8.53.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.9.0)(eslint-plugin-import@2.29.0)(eslint@8.52.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.10.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.52.0): + /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0): resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} engines: {node: '>=4'} peerDependencies: @@ -1472,16 +1474,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.1.6) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.52.0 + eslint: 8.53.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.52.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -1497,8 +1499,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.52.0): - resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} + /eslint-plugin-jsx-a11y@6.8.0(eslint@8.53.0): + resolution: {integrity: sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==} engines: {node: '>=4.0'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -1507,22 +1509,22 @@ packages: aria-query: 5.3.0 array-includes: 3.1.7 array.prototype.flatmap: 1.3.2 - ast-types-flow: 0.0.7 - axe-core: 4.8.2 + ast-types-flow: 0.0.8 + axe-core: 4.7.0 axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.52.0 - has: 1.0.3 + es-iterator-helpers: 1.0.15 + eslint: 8.53.0 + hasown: 2.0.0 jsx-ast-utils: 3.3.5 - language-tags: 1.0.5 + language-tags: 1.0.9 minimatch: 3.1.2 object.entries: 1.1.7 object.fromentries: 2.0.7 - semver: 6.3.1 dev: true - /eslint-plugin-jsx-expressions@1.3.1(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.1.6): + /eslint-plugin-jsx-expressions@1.3.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.1.6): resolution: {integrity: sha512-7PTIx62Oy4l3Igtat361C/SCrJ4yXNNJRh/pzXMbzvPzFkvOpHBkTXITkH8PMLDu1RAdilDpjaOUv1m14DbY7w==} engines: {node: 12.x || 14.x || >= 16} peerDependencies: @@ -1533,25 +1535,25 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.52.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.1.6) - eslint: 8.52.0 + '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.53.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.1.6) + eslint: 8.53.0 tsutils: 3.21.0(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-react-hooks@4.6.0(eslint@8.52.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.53.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.52.0 + eslint: 8.53.0 dev: true - /eslint-plugin-react@7.33.2(eslint@8.52.0): + /eslint-plugin-react@7.33.2(eslint@8.53.0): resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: @@ -1562,7 +1564,7 @@ packages: array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 es-iterator-helpers: 1.0.15 - eslint: 8.52.0 + eslint: 8.53.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -1582,44 +1584,43 @@ packages: safe-regex: 2.1.1 dev: true - /eslint-plugin-sonarjs@0.21.0(eslint@8.52.0): - resolution: {integrity: sha512-oezUDfFT5S6j3rQheZ4DLPrbetPmMS7zHIKWGHr0CM3g5JgyZroz1FpIKa4jV83NsGpmgIeagpokWDKIJzRQmw==} + /eslint-plugin-sonarjs@0.23.0(eslint@8.53.0): + resolution: {integrity: sha512-z44T3PBf9W7qQ/aR+NmofOTyg6HLhSEZOPD4zhStqBpLoMp8GYhFksuUBnCxbnf1nfISpKBVkQhiBLFI/F4Wlg==} engines: {node: '>=14'} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.52.0 + eslint: 8.53.0 dev: true - /eslint-plugin-testing-library@6.1.0(eslint@8.52.0)(typescript@5.1.6): - resolution: {integrity: sha512-r7kE+az3tbp8vyRwfyAGZ6V/xw+XvdWFPicIo6jbOPZoossOFDeHizARqPGV6gEkyF8hyCFhhH3mlQOGS3N5Sg==} + /eslint-plugin-testing-library@6.1.2(eslint@8.53.0)(typescript@5.1.6): + resolution: {integrity: sha512-Ra16FeBlonfbScOIdZEta9o+OxtwDqiUt+4UCpIM42TuatyLdtfU/SbwnIzPcAszrbl58PGwyZ9YGU9dwIo/tA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6'} peerDependencies: eslint: ^7.5.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.52.0)(typescript@5.1.6) - eslint: 8.52.0 + '@typescript-eslint/utils': 5.62.0(eslint@8.53.0)(typescript@5.1.6) + eslint: 8.53.0 transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-unicorn@48.0.1(eslint@8.52.0): - resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} + /eslint-plugin-unicorn@49.0.0(eslint@8.53.0): + resolution: {integrity: sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==} engines: {node: '>=16'} peerDependencies: - eslint: '>=8.44.0' + eslint: '>=8.52.0' dependencies: '@babel/helper-validator-identifier': 7.22.20 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) ci-info: 3.9.0 clean-regexp: 1.0.0 - eslint: 8.52.0 + eslint: 8.53.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 jsesc: 3.0.2 - lodash: 4.17.21 pluralize: 8.0.0 read-pkg-up: 7.0.1 regexp-tree: 0.1.27 @@ -1628,13 +1629,13 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-upleveled@2.1.9(eslint@8.52.0): + /eslint-plugin-upleveled@2.1.9(eslint@8.53.0): resolution: {integrity: sha512-mu5hQJkPQENbUvpBFVs9QvW+nhZF8ZtHA61rctdRp2IYunxur1W/hDvkKjlcCV+UWi2bWgORoJlawyVEO1tfMg==} engines: {node: '>=18.0.0'} peerDependencies: eslint: ^8.46.0 dependencies: - eslint: 8.52.0 + eslint: 8.53.0 dev: true /eslint-scope@5.1.1: @@ -1668,15 +1669,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.52.0: - resolution: {integrity: sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==} + /eslint@8.53.0: + resolution: {integrity: sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.52.0 + '@eslint/eslintrc': 2.1.3 + '@eslint/js': 8.53.0 '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -2410,8 +2411,9 @@ packages: resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} dev: true - /language-tags@1.0.5: - resolution: {integrity: sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==} + /language-tags@1.0.9: + resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} + engines: {node: '>=0.10'} dependencies: language-subtag-registry: 0.3.22 dev: true @@ -2450,10 +2452,6 @@ packages: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} dev: true - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true - /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true diff --git a/__tests__/tsconfig.json b/__tests__/tsconfig.json index 0fdf2e40..96406ef8 100644 --- a/__tests__/tsconfig.json +++ b/__tests__/tsconfig.json @@ -9,7 +9,6 @@ ] }, "include": [ - "**/.eslintrc.cjs", "**/*.ts", "**/*.tsx", "**/*.js", diff --git a/bin/install.js b/bin/install.js index 8a26aada..8b1ebe32 100755 --- a/bin/install.js +++ b/bin/install.js @@ -13,8 +13,9 @@ import { import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; +const projectPackageJsonPath = join(process.cwd(), 'package.json'); const projectPackageJson = JSON.parse( - readFileSync(join(process.cwd(), 'package.json'), 'utf-8'), + readFileSync(projectPackageJsonPath, 'utf-8'), ); const projectDependencies = projectPackageJson.dependencies || {}; @@ -45,10 +46,22 @@ console.log(`Detected project type: ${projectTypeTitle}`); // } // } // -// writeFileSync( -// projectPackageJsonPath, -// JSON.stringify(projectPackageJson, null, 2) + '\n', -// ); + +// Set "type": "module" in package.json for support +// of ESM syntax in eslint.config.js +// +// ESLint does not support other ways of specifying +// that the config file is ESM such as an .mjs extension: +// https://github.com/eslint/eslint/issues/13440 +// https://github.com/eslint/eslint/issues/16580 +if (projectPackageJson.type !== 'module') { + projectPackageJson.type = 'module'; + + writeFileSync( + projectPackageJsonPath, + JSON.stringify(projectPackageJson, null, 2) + '\n', + ); +} const newDevDependenciesToInstall = [ // pnpm v8+ automatically installs peer dependencies (auto-install-peers=true diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..04b0f94e --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,11 @@ +import upleveled from './index.js'; + +/** @type {import('eslint').Linter.FlatConfig[]} */ +const config = [ + ...upleveled, + { + ignores: ['__tests__/**/*'], + }, +]; + +export default config; diff --git a/index.cjs b/index.cjs deleted file mode 100644 index 4f7b8ea5..00000000 --- a/index.cjs +++ /dev/null @@ -1,919 +0,0 @@ -/** @type {import('@typescript-eslint/utils').TSESLint.Linter.RuleLevelAndOptions} */ -const noRestrictedSyntaxOptions = [ - 'warn', - // Currently it is not possible to use Markdown eg. links in ESLint warnings / error messages - // - // FIXME: Switch to a custom rule - // https://github.com/upleveled/eslint-config-upleveled/issues/123 - { - selector: - "ExpressionStatement CallExpression[callee.object.name='document'][callee.property.name='querySelector'], VariableDeclaration VariableDeclarator CallExpression[callee.object.name='document'][callee.property.name='querySelector']", - message: `Using document.querySelector() can lead to problems, and is not commonly used in React code - prefer instead usage of basic React patterns such as state and controlled components -https://github.com/reactjs/reactjs.org/issues/4626#issuecomment-1117535930`, - }, - { - selector: - "ExpressionStatement CallExpression[callee.object.name='document'][callee.property.name='querySelectorAll'], VariableDeclaration VariableDeclarator CallExpression[callee.object.name='document'][callee.property.name='querySelectorAll']", - message: `Using document.querySelectorAll() can lead to problems, and is not commonly used in React code - prefer instead usage of basic React patterns such as state and controlled components -https://github.com/reactjs/reactjs.org/issues/4626#issuecomment-1117535930`, - }, - { - selector: - "ExpressionStatement CallExpression[callee.object.name='document'][callee.property.name='getElementById'], VariableDeclaration VariableDeclarator[init.callee.object.name!='ReactDOM'][init.callee.property.name!='createRoot'] CallExpression[callee.object.name='document'][callee.property.name='getElementById']", - message: `Using document.getElementById() can lead to problems, and is not commonly used in React code - prefer instead usage of basic React patterns such as state and controlled components -https://github.com/reactjs/reactjs.org/issues/4626#issuecomment-1117535930`, - }, - - // Currently it is not possible to use Markdown eg. links in ESLint warnings / error messages - // - // FIXME: Switch to a custom rule - // https://github.com/upleveled/eslint-config-upleveled/issues/126 - { - selector: - 'FunctionDeclaration VariableDeclaration:has(VariableDeclarator > TaggedTemplateExpression > MemberExpression[object.name="styled"][property]), FunctionDeclaration VariableDeclaration:has(VariableDeclarator > TaggedTemplateExpression[tag.name="css"])', - message: - 'Declaring Emotion styles or a styled component within a React component will cause the element to get recreated, causing loss of state and other problems - see the react/no-unstable-nested-components docs for more info https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md', - }, - - { - selector: - "ExpressionStatement CallExpression[callee.object.name='location'][callee.property.name='reload']", - message: - 'Update content and elements with React instead of using location.reload()', - }, - { - selector: - "ExpressionStatement CallExpression[callee.object.object.name='window'][callee.object.property.name='location'][callee.property.name='reload']", - message: - 'Update content and elements with React instead of using location.reload()', - }, - - { - selector: - "JSXAttribute[name.name='href'] > Literal[value=/^\\./], JSXAttribute[name.name='href'] > JSXExpressionContainer > TemplateLiteral TemplateElement:first-child[value.cooked=/^\\./]", - message: - 'Always start href relative URLs with a forward slash (aka use root relative URLs) - read more at https://www.webdevbydoing.com/absolute-relative-and-root-relative-file-paths/', - }, - - { - selector: - "JSXAttribute[name.name='key'] > JSXExpressionContainer > :not(TemplateLiteral)", - message: - // eslint-disable-next-line no-template-curly-in-string -- Allow for the code example including template strings and interpolation - 'Use template literals including a prefixes for the values of key props (eg.
instead of
)', - }, - - // Warn on nesting elements,