diff --git a/.changeset/four-humans-cheer.md b/.changeset/four-humans-cheer.md new file mode 100644 index 00000000..497f2d02 --- /dev/null +++ b/.changeset/four-humans-cheer.md @@ -0,0 +1,5 @@ +--- +"@sumup-oss/foundry": minor +--- + +Added support for the Circuit UI plugins under the new `@sumup/oss` package scope. diff --git a/src/configs/eslint/__snapshots__/config.spec.ts.snap b/src/configs/eslint/__snapshots__/config.spec.ts.snap index 38eaf8b6..b507185f 100644 --- a/src/configs/eslint/__snapshots__/config.spec.ts.snap +++ b/src/configs/eslint/__snapshots__/config.spec.ts.snap @@ -1,5 +1,207 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` +{ + "env": { + "browser": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:compat/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "compat/compat": "off", + }, + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "@sumup-oss/circuit-ui", + ], + "root": true, + "rules": { + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "lintAllEsApis": true, + "polyfills": [ + "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", + ], + }, +} +`; + exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` { "env": { @@ -1631,7 +1833,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` { "env": { "browser": true, @@ -1723,15 +1925,16 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "react", "react-hooks", "jsx-a11y", - "@sumup/circuit-ui", + "@sumup-oss/circuit-ui", ], "root": true, "rules": { - "@sumup/circuit-ui/component-lifecycle-imports": "error", - "@sumup/circuit-ui/no-deprecated-components": "warn", - "@sumup/circuit-ui/no-deprecated-props": "warn", - "@sumup/circuit-ui/no-invalid-custom-properties": "error", - "@sumup/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", "curly": [ "error", "all", @@ -1797,7 +2000,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Cypress' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI' ] } 1`] = ` { "env": { "browser": true, @@ -1873,21 +2076,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "compat/compat": "off", }, }, - { - "env": { - "cypress/globals": true, - }, - "extends": [ - "plugin:cypress/recommended", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - "plugins": [ - "cypress", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -1904,9 +2092,15 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "react", "react-hooks", "jsx-a11y", + "@sumup/circuit-ui", ], "root": true, "rules": { + "@sumup/circuit-ui/component-lifecycle-imports": "error", + "@sumup/circuit-ui/no-deprecated-components": "warn", + "@sumup/circuit-ui/no-deprecated-props": "warn", + "@sumup/circuit-ui/no-invalid-custom-properties": "error", + "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -1972,7 +2166,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Emotion' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Cypress' ] } 1`] = ` { "env": { "browser": true, @@ -2048,6 +2242,21 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "compat/compat": "off", }, }, + { + "env": { + "cypress/globals": true, + }, + "extends": [ + "plugin:cypress/recommended", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + "plugins": [ + "cypress", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -2064,15 +2273,9 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "react", "react-hooks", "jsx-a11y", - "@emotion", ], "root": true, "rules": { - "@emotion/import-from-emotion": "error", - "@emotion/jsx-import": "off", - "@emotion/no-vanilla": "error", - "@emotion/pkg-renaming": "error", - "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -2114,14 +2317,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr }, ], "react/display-name": "off", - "react/no-unknown-property": [ - "error", - { - "ignore": [ - "css", - ], - }, - ], "react/react-in-jsx-scope": "off", }, "settings": { @@ -2146,7 +2341,181 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Jest' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Emotion' ] } 1`] = ` +{ + "env": { + "browser": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:compat/recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "compat/compat": "off", + }, + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "jsx": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + "@emotion", + ], + "root": true, + "rules": { + "@emotion/import-from-emotion": "error", + "@emotion/jsx-import": "off", + "@emotion/no-vanilla": "error", + "@emotion/pkg-renaming": "error", + "@emotion/styled-import": "error", + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "react/display-name": "off", + "react/no-unknown-property": [ + "error", + { + "ignore": [ + "css", + ], + }, + ], + "react/react-in-jsx-scope": "off", + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "lintAllEsApis": true, + "polyfills": [ + "document.body", + ], + "react": { + "version": "detect", + }, + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Jest' ] } 1`] = ` { "env": { "browser": true, @@ -2994,7 +3363,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` { "env": { "node": true, @@ -3077,15 +3446,16 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "sourceType": "module", }, "plugins": [ - "@sumup/circuit-ui", + "@sumup-oss/circuit-ui", ], "root": true, "rules": { - "@sumup/circuit-ui/component-lifecycle-imports": "error", - "@sumup/circuit-ui/no-deprecated-components": "warn", - "@sumup/circuit-ui/no-deprecated-props": "warn", - "@sumup/circuit-ui/no-invalid-custom-properties": "error", - "@sumup/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", "curly": [ "error", "all", @@ -3195,7 +3565,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Cypress' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` { "env": { "node": true, @@ -3266,21 +3636,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, - { - "env": { - "cypress/globals": true, - }, - "extends": [ - "plugin:cypress/recommended", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - "plugins": [ - "cypress", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -3292,8 +3647,16 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "@sumup/circuit-ui", + ], "root": true, "rules": { + "@sumup/circuit-ui/component-lifecycle-imports": "error", + "@sumup/circuit-ui/no-deprecated-components": "warn", + "@sumup/circuit-ui/no-deprecated-props": "warn", + "@sumup/circuit-ui/no-invalid-custom-properties": "error", + "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -3403,7 +3766,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Emotion' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Cypress' ] } 1`] = ` { "env": { "node": true, @@ -3474,6 +3837,21 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, + { + "env": { + "cypress/globals": true, + }, + "extends": [ + "plugin:cypress/recommended", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + "plugins": [ + "cypress", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -3485,16 +3863,8 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "ecmaVersion": 6, "sourceType": "module", }, - "plugins": [ - "@emotion", - ], "root": true, "rules": { - "@emotion/import-from-emotion": "error", - "@emotion/jsx-import": "off", - "@emotion/no-vanilla": "error", - "@emotion/pkg-renaming": "error", - "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -3538,14 +3908,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-extraneous-import": "off", "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", - "react/no-unknown-property": [ - "error", - { - "ignore": [ - "css", - ], - }, - ], "security/detect-object-injection": "off", }, "settings": { @@ -3612,7 +3974,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Jest' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Emotion' ] } 1`] = ` { "env": { "node": true, @@ -3683,26 +4045,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, - { - "env": { - "jest/globals": true, - }, - "extends": [ - "plugin:jest/recommended", - ], - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "jest", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -3714,8 +4056,16 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "@emotion", + ], "root": true, "rules": { + "@emotion/import-from-emotion": "error", + "@emotion/jsx-import": "off", + "@emotion/no-vanilla": "error", + "@emotion/pkg-renaming": "error", + "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -3759,6 +4109,14 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-extraneous-import": "off", "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", + "react/no-unknown-property": [ + "error", + { + "ignore": [ + "css", + ], + }, + ], "security/detect-object-injection": "off", }, "settings": { @@ -3825,7 +4183,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Next.js' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Jest' ] } 1`] = ` { "env": { "node": true, @@ -3836,7 +4194,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", - "next", ], "overrides": [ { @@ -3897,6 +4254,26 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, + { + "env": { + "jest/globals": true, + }, + "extends": [ + "plugin:jest/recommended", + ], + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "jest", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -4019,7 +4396,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Playwright' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Next.js' ] } 1`] = ` { "env": { "node": true, @@ -4030,6 +4407,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", + "next", ], "overrides": [ { @@ -4090,15 +4468,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, - { - "extends": [ - "plugin:playwright/playwright-test", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -4221,7 +4590,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Storybook' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Playwright' ] } 1`] = ` { "env": { "node": true, @@ -4232,7 +4601,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", - "plugin:storybook/recommended", ], "overrides": [ { @@ -4293,6 +4661,15 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, + { + "extends": [ + "plugin:playwright/playwright-test", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -4415,7 +4792,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Testing Library' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Storybook' ] } 1`] = ` { "env": { "node": true, @@ -4426,6 +4803,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", + "plugin:storybook/recommended", ], "overrides": [ { @@ -4486,23 +4864,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, - { - "extends": [ - "plugin:testing-library/react", - ], - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "testing-library", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -4625,7 +4986,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Testing Library' ] } 1`] = ` { "env": { "node": true, @@ -4636,9 +4997,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "plugin:jsx-a11y/recommended", ], "overrides": [ { @@ -4699,31 +5057,36 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, + { + "extends": [ + "plugin:testing-library/react", + ], + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "testing-library", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, - "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, - "plugins": [ - "react", - "react-hooks", - "jsx-a11y", - "@sumup/circuit-ui", - ], "root": true, "rules": { - "@sumup/circuit-ui/component-lifecycle-imports": "error", - "@sumup/circuit-ui/no-deprecated-components": "warn", - "@sumup/circuit-ui/no-deprecated-props": "warn", - "@sumup/circuit-ui/no-invalid-custom-properties": "error", - "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -4767,8 +5130,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-extraneous-import": "off", "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", - "react/display-name": "off", - "react/react-in-jsx-scope": "off", "security/detect-object-injection": "off", }, "settings": { @@ -4782,14 +5143,60 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr ], }, }, - "react": { - "version": "detect", - }, + "polyfills": [ + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", + ], }, } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Cypress' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` { "env": { "node": true, @@ -4863,21 +5270,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-unpublished-require": "off", }, }, - { - "env": { - "cypress/globals": true, - }, - "extends": [ - "plugin:cypress/recommended", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - "plugins": [ - "cypress", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -4894,9 +5286,16 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "react", "react-hooks", "jsx-a11y", + "@sumup-oss/circuit-ui", ], "root": true, "rules": { + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", "curly": [ "error", "all", @@ -4962,7 +5361,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Emotion' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI' ] } 1`] = ` { "env": { "node": true, @@ -5052,15 +5451,15 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "react", "react-hooks", "jsx-a11y", - "@emotion", + "@sumup/circuit-ui", ], "root": true, "rules": { - "@emotion/import-from-emotion": "error", - "@emotion/jsx-import": "off", - "@emotion/no-vanilla": "error", - "@emotion/pkg-renaming": "error", - "@emotion/styled-import": "error", + "@sumup/circuit-ui/component-lifecycle-imports": "error", + "@sumup/circuit-ui/no-deprecated-components": "warn", + "@sumup/circuit-ui/no-deprecated-props": "warn", + "@sumup/circuit-ui/no-invalid-custom-properties": "error", + "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -5105,14 +5504,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", "react/display-name": "off", - "react/no-unknown-property": [ - "error", - { - "ignore": [ - "css", - ], - }, - ], "react/react-in-jsx-scope": "off", "security/detect-object-injection": "off", }, @@ -5134,7 +5525,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Jest' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Cypress' ] } 1`] = ` { "env": { "node": true, @@ -5210,22 +5601,17 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr }, { "env": { - "jest/globals": true, + "cypress/globals": true, }, "extends": [ - "plugin:jest/recommended", + "plugin:cypress/recommended", ], "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", + "e2e/**/*", + "tests/**/*", ], "plugins": [ - "jest", + "cypress", ], }, ], @@ -5312,7 +5698,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Next.js' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Emotion' ] } 1`] = ` { "env": { "node": true, @@ -5326,7 +5712,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", - "next", ], "overrides": [ { @@ -5403,9 +5788,15 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "react", "react-hooks", "jsx-a11y", + "@emotion", ], "root": true, "rules": { + "@emotion/import-from-emotion": "error", + "@emotion/jsx-import": "off", + "@emotion/no-vanilla": "error", + "@emotion/pkg-renaming": "error", + "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -5450,6 +5841,14 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", "react/display-name": "off", + "react/no-unknown-property": [ + "error", + { + "ignore": [ + "css", + ], + }, + ], "react/react-in-jsx-scope": "off", "security/detect-object-injection": "off", }, @@ -5471,7 +5870,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Playwright' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Jest' ] } 1`] = ` { "env": { "node": true, @@ -5546,12 +5945,23 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr }, }, { + "env": { + "jest/globals": true, + }, "extends": [ - "plugin:playwright/playwright-test", + "plugin:jest/recommended", ], "files": [ - "e2e/**/*", - "tests/**/*", + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "jest", ], }, ], @@ -5638,7 +6048,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Storybook' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Next.js' ] } 1`] = ` { "env": { "node": true, @@ -5652,7 +6062,7 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", - "plugin:storybook/recommended", + "next", ], "overrides": [ { @@ -5797,7 +6207,174 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr } `; -exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Testing Library' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Playwright' ] } 1`] = ` +{ + "env": { + "node": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:node/recommended", + "plugin:security/recommended-legacy", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "node/no-extraneous-require": "off", + "node/no-missing-require": "off", + "node/no-unpublished-import": "off", + "node/no-unpublished-require": "off", + }, + }, + { + "extends": [ + "plugin:playwright/playwright-test", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "jsx": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + ], + "root": true, + "rules": { + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "node/no-extraneous-import": "off", + "node/no-missing-import": "off", + "node/no-unsupported-features/es-syntax": "off", + "react/display-name": "off", + "react/react-in-jsx-scope": "off", + "security/detect-object-injection": "off", + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "react": { + "version": "detect", + }, + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Storybook' ] } 1`] = ` { "env": { "node": true, @@ -5811,27 +6388,1464 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", + "plugin:storybook/recommended", ], "overrides": [ { "files": [ - "api/**/*", - "pages/api/**/*", - "src/pages/api/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "node/no-extraneous-require": "off", + "node/no-missing-require": "off", + "node/no-unpublished-import": "off", + "node/no-unpublished-require": "off", + }, + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "jsx": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + ], + "root": true, + "rules": { + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "node/no-extraneous-import": "off", + "node/no-missing-import": "off", + "node/no-unsupported-features/es-syntax": "off", + "react/display-name": "off", + "react/react-in-jsx-scope": "off", + "security/detect-object-injection": "off", + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "react": { + "version": "detect", + }, + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'JavaScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Testing Library' ] } 1`] = ` +{ + "env": { + "node": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:node/recommended", + "plugin:security/recommended-legacy", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "node/no-extraneous-require": "off", + "node/no-missing-require": "off", + "node/no-unpublished-import": "off", + "node/no-unpublished-require": "off", + }, + }, + { + "extends": [ + "plugin:testing-library/react", + ], + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "testing-library", + ], + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "jsx": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + ], + "root": true, + "rules": { + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "node/no-extraneous-import": "off", + "node/no-missing-import": "off", + "node/no-unsupported-features/es-syntax": "off", + "react/display-name": "off", + "react/react-in-jsx-scope": "off", + "security/detect-object-injection": "off", + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "react": { + "version": "detect", + }, + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` +{ + "env": { + "browser": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:compat/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "extends": [ + "airbnb-typescript/base", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + ], + "files": [ + "**/*.{ts,tsx}", + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "modules": true, + }, + "ecmaVersion": 6, + "extraFileExtensions": [ + ".json", + ], + "project": [ + "./tsconfig.json", + ], + "sourceType": "module", + "tsconfigRootDir": "/project/dir", + }, + "plugins": [ + "@typescript-eslint", + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": false, + }, + ], + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-use-before-define": [ + "error", + { + "functions": false, + }, + ], + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.d.ts", + ], + "rules": { + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": true, + }, + ], + "node/no-extraneous-import": "off", + "spaced-comment": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.{ts,tsx}", + ], + "rules": { + "@typescript-eslint/explicit-module-boundary-types": "off", + }, + }, + { + "files": [ + "**/*spec.{ts,tsx}", + "**/setupTests.{ts,tsx}", + "**/test-utils.{ts,tsx}", + ], + "rules": { + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/unbound-method": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "compat/compat": "off", + }, + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "@sumup-oss/circuit-ui", + ], + "root": true, + "rules": { + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "lintAllEsApis": true, + "polyfills": [ + "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", + ], + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` +{ + "env": { + "browser": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:compat/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "extends": [ + "airbnb-typescript/base", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + ], + "files": [ + "**/*.{ts,tsx}", + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "modules": true, + }, + "ecmaVersion": 6, + "extraFileExtensions": [ + ".json", + ], + "project": [ + "./tsconfig.json", + ], + "sourceType": "module", + "tsconfigRootDir": "/project/dir", + }, + "plugins": [ + "@typescript-eslint", + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": false, + }, + ], + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-use-before-define": [ + "error", + { + "functions": false, + }, + ], + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.d.ts", + ], + "rules": { + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": true, + }, + ], + "node/no-extraneous-import": "off", + "spaced-comment": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.{ts,tsx}", + ], + "rules": { + "@typescript-eslint/explicit-module-boundary-types": "off", + }, + }, + { + "files": [ + "**/*spec.{ts,tsx}", + "**/setupTests.{ts,tsx}", + "**/test-utils.{ts,tsx}", + ], + "rules": { + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/unbound-method": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "compat/compat": "off", + }, + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "plugins": [ + "@sumup/circuit-ui", + ], + "root": true, + "rules": { + "@sumup/circuit-ui/component-lifecycle-imports": "error", + "@sumup/circuit-ui/no-deprecated-components": "warn", + "@sumup/circuit-ui/no-deprecated-props": "warn", + "@sumup/circuit-ui/no-invalid-custom-properties": "error", + "@sumup/circuit-ui/no-renamed-props": "error", + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "lintAllEsApis": true, + "polyfills": [ + "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", + ], + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Cypress' ] } 1`] = ` +{ + "env": { + "browser": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:compat/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "extends": [ + "airbnb-typescript/base", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + ], + "files": [ + "**/*.{ts,tsx}", + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "modules": true, + }, + "ecmaVersion": 6, + "extraFileExtensions": [ + ".json", + ], + "project": [ + "./tsconfig.json", + ], + "sourceType": "module", + "tsconfigRootDir": "/project/dir", + }, + "plugins": [ + "@typescript-eslint", + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": false, + }, + ], + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-use-before-define": [ + "error", + { + "functions": false, + }, + ], + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.d.ts", + ], + "rules": { + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": true, + }, + ], + "node/no-extraneous-import": "off", + "spaced-comment": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.{ts,tsx}", + ], + "rules": { + "@typescript-eslint/explicit-module-boundary-types": "off", + }, + }, + { + "files": [ + "**/*spec.{ts,tsx}", + "**/setupTests.{ts,tsx}", + "**/test-utils.{ts,tsx}", + ], + "rules": { + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/unbound-method": "off", + }, + }, + { + "files": [ + "**/*.{story,stories}.*", + ], + "rules": { + "import/no-anonymous-default-export": "off", + "import/no-extraneous-dependencies": "off", + "no-alert": "off", + }, + }, + { + "files": [ + "**/*spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "compat/compat": "off", + }, + }, + { + "env": { + "cypress/globals": true, + }, + "extends": [ + "plugin:cypress/recommended", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + "plugins": [ + "cypress", + ], + }, + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "impliedStrict": true, + "modules": true, + }, + "ecmaVersion": 6, + "sourceType": "module", + }, + "root": true, + "rules": { + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx", + ], + }, + }, + "lintAllEsApis": true, + "polyfills": [ + "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", + ], + }, +} +`; + +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Emotion' ] } 1`] = ` +{ + "env": { + "browser": true, + }, + "extends": [ + "eslint:recommended", + "airbnb-base", + "plugin:prettier/recommended", + "plugin:compat/recommended", + ], + "overrides": [ + { + "files": [ + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "no-console": "off", + }, + }, + { + "extends": [ + "plugin:json/recommended-legacy", + ], + "files": [ + "**/*.json", + ], + "rules": { + "notice/notice": "off", + }, + }, + { + "extends": [ + "airbnb-typescript/base", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + ], + "files": [ + "**/*.{ts,tsx}", + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "modules": true, + }, + "ecmaVersion": 6, + "extraFileExtensions": [ + ".json", + ], + "project": [ + "./tsconfig.json", + ], + "sourceType": "module", + "tsconfigRootDir": "/project/dir", + }, + "plugins": [ + "@typescript-eslint", + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": false, + }, + ], + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-use-before-define": [ + "error", + { + "functions": false, + }, + ], + "curly": [ + "error", + "all", + ], + "import/extensions": "off", + "import/no-cycle": [ + "error", + { + "maxDepth": 7, + }, + ], + "import/order": [ + "error", + { + "newlines-between": "always", + }, + ], + "import/prefer-default-export": "off", + "max-len": [ + "error", + { + "code": 80, + "ignoreComments": true, + "ignorePattern": "^(?:import\\s|export\\s|\\s*it(?:\\.(?:skip|only))?\\()", + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreUrls": true, + "tabWidth": 2, + }, + ], + "no-confusing-arrow": "off", + "no-underscore-dangle": "error", + "no-use-before-define": "off", + "no-void": [ + "error", + { + "allowAsStatement": true, + }, + ], + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.d.ts", ], "rules": { - "no-console": "off", + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": true, + }, + ], + "node/no-extraneous-import": "off", + "spaced-comment": "off", }, }, { - "extends": [ - "plugin:json/recommended-legacy", + "files": [ + "**/*.{story,stories}.{ts,tsx}", ], + "rules": { + "@typescript-eslint/explicit-module-boundary-types": "off", + }, + }, + { "files": [ - "**/*.json", + "**/*spec.{ts,tsx}", + "**/setupTests.{ts,tsx}", + "**/test-utils.{ts,tsx}", ], "rules": { - "notice/notice": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/unbound-method": "off", }, }, { @@ -5858,23 +7872,6 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr }, }, { - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - ], - "rules": { - "node/no-extraneous-require": "off", - "node/no-missing-require": "off", - "node/no-unpublished-import": "off", - "node/no-unpublished-require": "off", - }, - }, - { - "extends": [ - "plugin:testing-library/react", - ], "files": [ "**/*.spec.*", "**/jest*", @@ -5883,10 +7880,13 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "**/*Fixtures.*", "**/__fixtures__/**/*", "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", ], - "plugins": [ - "testing-library", - ], + "rules": { + "compat/compat": "off", + }, }, ], "parser": "@babel/eslint-parser", @@ -5894,19 +7894,21 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, - "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, "plugins": [ - "react", - "react-hooks", - "jsx-a11y", + "@emotion", ], "root": true, "rules": { + "@emotion/import-from-emotion": "error", + "@emotion/jsx-import": "off", + "@emotion/no-vanilla": "error", + "@emotion/pkg-renaming": "error", + "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -5947,12 +7949,14 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr "allowAsStatement": true, }, ], - "node/no-extraneous-import": "off", - "node/no-missing-import": "off", - "node/no-unsupported-features/es-syntax": "off", - "react/display-name": "off", - "react/react-in-jsx-scope": "off", - "security/detect-object-injection": "off", + "react/no-unknown-property": [ + "error", + { + "ignore": [ + "css", + ], + }, + ], }, "settings": { "import/resolver": { @@ -5965,14 +7969,62 @@ exports[`eslint > with options > should return a config for { language: 'JavaScr ], }, }, - "react": { - "version": "detect", - }, + "lintAllEsApis": true, + "polyfills": [ + "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", + ], }, } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Jest' ] } 1`] = ` { "env": { "browser": true, @@ -6169,6 +8221,26 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "compat/compat": "off", }, }, + { + "env": { + "jest/globals": true, + }, + "extends": [ + "plugin:jest/recommended", + ], + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "jest", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -6180,16 +8252,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "ecmaVersion": 6, "sourceType": "module", }, - "plugins": [ - "@sumup/circuit-ui", - ], "root": true, "rules": { - "@sumup/circuit-ui/component-lifecycle-imports": "error", - "@sumup/circuit-ui/no-deprecated-components": "warn", - "@sumup/circuit-ui/no-deprecated-props": "warn", - "@sumup/circuit-ui/no-invalid-custom-properties": "error", - "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -6297,7 +8361,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Cypress' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Next.js' ] } 1`] = ` { "env": { "browser": true, @@ -6307,6 +8371,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "airbnb-base", "plugin:prettier/recommended", "plugin:compat/recommended", + "next", ], "overrides": [ { @@ -6494,21 +8559,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "compat/compat": "off", }, }, - { - "env": { - "cypress/globals": true, - }, - "extends": [ - "plugin:cypress/recommended", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - "plugins": [ - "cypress", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -6629,7 +8679,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Emotion' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Playwright' ] } 1`] = ` { "env": { "browser": true, @@ -6826,6 +8876,15 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "compat/compat": "off", }, }, + { + "extends": [ + "plugin:playwright/playwright-test", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -6837,16 +8896,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "ecmaVersion": 6, "sourceType": "module", }, - "plugins": [ - "@emotion", - ], "root": true, "rules": { - "@emotion/import-from-emotion": "error", - "@emotion/jsx-import": "off", - "@emotion/no-vanilla": "error", - "@emotion/pkg-renaming": "error", - "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -6887,14 +8938,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowAsStatement": true, }, ], - "react/no-unknown-property": [ - "error", - { - "ignore": [ - "css", - ], - }, - ], }, "settings": { "import/resolver": { @@ -6962,7 +9005,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Jest' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Storybook' ] } 1`] = ` { "env": { "browser": true, @@ -6972,6 +9015,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "airbnb-base", "plugin:prettier/recommended", "plugin:compat/recommended", + "plugin:storybook/recommended", ], "overrides": [ { @@ -7159,26 +9203,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "compat/compat": "off", }, }, - { - "env": { - "jest/globals": true, - }, - "extends": [ - "plugin:jest/recommended", - ], - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "jest", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -7299,7 +9323,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Next.js' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Testing Library' ] } 1`] = ` { "env": { "browser": true, @@ -7309,7 +9333,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "airbnb-base", "plugin:prettier/recommended", "plugin:compat/recommended", - "next", ], "overrides": [ { @@ -7475,12 +9498,32 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "**/test-utils.*", ], "rules": { - "import/no-extraneous-dependencies": "off", - "react/display-name": "off", - "react/prop-types": "off", + "import/no-extraneous-dependencies": "off", + "react/display-name": "off", + "react/prop-types": "off", + }, + }, + { + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + "api/**/*", + "pages/api/**/*", + "src/pages/api/**/*", + ], + "rules": { + "compat/compat": "off", }, }, { + "extends": [ + "plugin:testing-library/react", + ], "files": [ "**/*.spec.*", "**/jest*", @@ -7489,13 +9532,10 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "**/*Fixtures.*", "**/__fixtures__/**/*", "**/__mocks__/**/*", - "api/**/*", - "pages/api/**/*", - "src/pages/api/**/*", ], - "rules": { - "compat/compat": "off", - }, + "plugins": [ + "testing-library", + ], }, ], "parser": "@babel/eslint-parser", @@ -7617,7 +9657,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Playwright' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` { "env": { "browser": true, @@ -7627,6 +9667,9 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "airbnb-base", "plugin:prettier/recommended", "plugin:compat/recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", ], "overrides": [ { @@ -7814,28 +9857,32 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "compat/compat": "off", }, }, - { - "extends": [ - "plugin:playwright/playwright-test", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, + "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + "@sumup-oss/circuit-ui", + ], "root": true, "rules": { + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", "curly": [ "error", "all", @@ -7876,6 +9923,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowAsStatement": true, }, ], + "react/display-name": "off", + "react/react-in-jsx-scope": "off", }, "settings": { "import/resolver": { @@ -7891,59 +9940,15 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "lintAllEsApis": true, "polyfills": [ "document.body", - "Array.prototype.copyWithin", - "Array.prototype.fill", - "Array.prototype.find", - "Array.prototype.findIndex", - "Array.prototype.flagMap", - "Array.prototype.flat", - "Array.from", - "Array.prototype.includes", - "Array.of", - "Function.name", - "Map", - "Number.EPSILON", - "Number.isFinite", - "Number.isInteger", - "Number.isNaN", - "Number.isSafeInteger", - "Number.MAX_SAFE_INTEGER", - "Number.MIN_SAFE_INTEGER", - "Number.parseFloat", - "Number.parseInt", - "Object.assign", - "Object.entries", - "Object.getOwnPropertyDescriptors", - "Object.keys", - "Object.is", - "Object.values", - "Reflect", - "RegExp", - "Set", - "Symbol", - "String.prototype.codePointAt", - "String.prototype.endsWith", - "String.prototype.fromCodePoint", - "String.prototype.includes", - "String.prototype.padStart", - "String.prototype.padEnd", - "String.prototype.raw", - "String.prototype.repeat", - "String.prototype.startsWith", - "String.prototype.trimLeft", - "String.prototype.trimRight", - "URL", - "URLSearchParams", - "WeakMap", - "WeakSet", - "Promise", - "fetch", ], + "react": { + "version": "detect", + }, }, } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Storybook' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI' ] } 1`] = ` { "env": { "browser": true, @@ -7953,7 +9958,9 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "airbnb-base", "plugin:prettier/recommended", "plugin:compat/recommended", - "plugin:storybook/recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", ], "overrides": [ { @@ -8147,13 +10154,25 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, + "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + "@sumup/circuit-ui", + ], "root": true, "rules": { + "@sumup/circuit-ui/component-lifecycle-imports": "error", + "@sumup/circuit-ui/no-deprecated-components": "warn", + "@sumup/circuit-ui/no-deprecated-props": "warn", + "@sumup/circuit-ui/no-invalid-custom-properties": "error", + "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -8194,6 +10213,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowAsStatement": true, }, ], + "react/display-name": "off", + "react/react-in-jsx-scope": "off", }, "settings": { "import/resolver": { @@ -8209,59 +10230,15 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "lintAllEsApis": true, "polyfills": [ "document.body", - "Array.prototype.copyWithin", - "Array.prototype.fill", - "Array.prototype.find", - "Array.prototype.findIndex", - "Array.prototype.flagMap", - "Array.prototype.flat", - "Array.from", - "Array.prototype.includes", - "Array.of", - "Function.name", - "Map", - "Number.EPSILON", - "Number.isFinite", - "Number.isInteger", - "Number.isNaN", - "Number.isSafeInteger", - "Number.MAX_SAFE_INTEGER", - "Number.MIN_SAFE_INTEGER", - "Number.parseFloat", - "Number.parseInt", - "Object.assign", - "Object.entries", - "Object.getOwnPropertyDescriptors", - "Object.keys", - "Object.is", - "Object.values", - "Reflect", - "RegExp", - "Set", - "Symbol", - "String.prototype.codePointAt", - "String.prototype.endsWith", - "String.prototype.fromCodePoint", - "String.prototype.includes", - "String.prototype.padStart", - "String.prototype.padEnd", - "String.prototype.raw", - "String.prototype.repeat", - "String.prototype.startsWith", - "String.prototype.trimLeft", - "String.prototype.trimRight", - "URL", - "URLSearchParams", - "WeakMap", - "WeakSet", - "Promise", - "fetch", ], + "react": { + "version": "detect", + }, }, } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'Next.js' ], plugins: [ 'Testing Library' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Cypress' ] } 1`] = ` { "env": { "browser": true, @@ -8271,6 +10248,9 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "airbnb-base", "plugin:prettier/recommended", "plugin:compat/recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", ], "overrides": [ { @@ -8459,20 +10439,18 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr }, }, { + "env": { + "cypress/globals": true, + }, "extends": [ - "plugin:testing-library/react", + "plugin:cypress/recommended", ], "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", + "e2e/**/*", + "tests/**/*", ], "plugins": [ - "testing-library", + "cypress", ], }, ], @@ -8481,11 +10459,17 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, + "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + ], "root": true, "rules": { "curly": [ @@ -8528,6 +10512,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowAsStatement": true, }, ], + "react/display-name": "off", + "react/react-in-jsx-scope": "off", }, "settings": { "import/resolver": { @@ -8543,59 +10529,15 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "lintAllEsApis": true, "polyfills": [ "document.body", - "Array.prototype.copyWithin", - "Array.prototype.fill", - "Array.prototype.find", - "Array.prototype.findIndex", - "Array.prototype.flagMap", - "Array.prototype.flat", - "Array.from", - "Array.prototype.includes", - "Array.of", - "Function.name", - "Map", - "Number.EPSILON", - "Number.isFinite", - "Number.isInteger", - "Number.isNaN", - "Number.isSafeInteger", - "Number.MAX_SAFE_INTEGER", - "Number.MIN_SAFE_INTEGER", - "Number.parseFloat", - "Number.parseInt", - "Object.assign", - "Object.entries", - "Object.getOwnPropertyDescriptors", - "Object.keys", - "Object.is", - "Object.values", - "Reflect", - "RegExp", - "Set", - "Symbol", - "String.prototype.codePointAt", - "String.prototype.endsWith", - "String.prototype.fromCodePoint", - "String.prototype.includes", - "String.prototype.padStart", - "String.prototype.padEnd", - "String.prototype.raw", - "String.prototype.repeat", - "String.prototype.startsWith", - "String.prototype.trimLeft", - "String.prototype.trimRight", - "URL", - "URLSearchParams", - "WeakMap", - "WeakSet", - "Promise", - "fetch", ], + "react": { + "version": "detect", + }, }, } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Emotion' ] } 1`] = ` { "env": { "browser": true, @@ -8811,15 +10753,15 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "react", "react-hooks", "jsx-a11y", - "@sumup/circuit-ui", + "@emotion", ], "root": true, "rules": { - "@sumup/circuit-ui/component-lifecycle-imports": "error", - "@sumup/circuit-ui/no-deprecated-components": "warn", - "@sumup/circuit-ui/no-deprecated-props": "warn", - "@sumup/circuit-ui/no-invalid-custom-properties": "error", - "@sumup/circuit-ui/no-renamed-props": "error", + "@emotion/import-from-emotion": "error", + "@emotion/jsx-import": "off", + "@emotion/no-vanilla": "error", + "@emotion/pkg-renaming": "error", + "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -8857,10 +10799,18 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "no-void": [ "error", { - "allowAsStatement": true, + "allowAsStatement": true, + }, + ], + "react/display-name": "off", + "react/no-unknown-property": [ + "error", + { + "ignore": [ + "css", + ], }, ], - "react/display-name": "off", "react/react-in-jsx-scope": "off", }, "settings": { @@ -8885,7 +10835,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Cypress' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Jest' ] } 1`] = ` { "env": { "browser": true, @@ -9087,17 +11037,22 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr }, { "env": { - "cypress/globals": true, + "jest/globals": true, }, "extends": [ - "plugin:cypress/recommended", + "plugin:jest/recommended", ], "files": [ - "e2e/**/*", - "tests/**/*", + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", ], "plugins": [ - "cypress", + "jest", ], }, ], @@ -9184,7 +11139,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Emotion' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Next.js' ] } 1`] = ` { "env": { "browser": true, @@ -9197,6 +11152,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", + "next", ], "overrides": [ { @@ -9400,15 +11356,9 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "react", "react-hooks", "jsx-a11y", - "@emotion", ], "root": true, "rules": { - "@emotion/import-from-emotion": "error", - "@emotion/jsx-import": "off", - "@emotion/no-vanilla": "error", - "@emotion/pkg-renaming": "error", - "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -9450,14 +11400,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr }, ], "react/display-name": "off", - "react/no-unknown-property": [ - "error", - { - "ignore": [ - "css", - ], - }, - ], "react/react-in-jsx-scope": "off", }, "settings": { @@ -9482,7 +11424,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Jest' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Playwright' ] } 1`] = ` { "env": { "browser": true, @@ -9683,23 +11625,12 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr }, }, { - "env": { - "jest/globals": true, - }, "extends": [ - "plugin:jest/recommended", + "plugin:playwright/playwright-test", ], "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "jest", + "e2e/**/*", + "tests/**/*", ], }, ], @@ -9786,7 +11717,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Next.js' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Storybook' ] } 1`] = ` { "env": { "browser": true, @@ -9799,7 +11730,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", - "next", + "plugin:storybook/recommended", ], "overrides": [ { @@ -10071,7 +12002,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Playwright' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Testing Library' ] } 1`] = ` { "env": { "browser": true, @@ -10273,11 +12204,19 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr }, { "extends": [ - "plugin:playwright/playwright-test", + "plugin:testing-library/react", ], "files": [ - "e2e/**/*", - "tests/**/*", + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "testing-library", ], }, ], @@ -10364,20 +12303,17 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Storybook' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` { "env": { - "browser": true, + "node": true, }, "extends": [ "eslint:recommended", "airbnb-base", "plugin:prettier/recommended", - "plugin:compat/recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "plugin:jsx-a11y/recommended", - "plugin:storybook/recommended", + "plugin:node/recommended", + "plugin:security/recommended-legacy", ], "overrides": [ { @@ -10554,15 +12490,12 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "**/jest*", "**/setupTests.*", "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - "api/**/*", - "pages/api/**/*", - "src/pages/api/**/*", ], "rules": { - "compat/compat": "off", + "node/no-extraneous-require": "off", + "node/no-missing-require": "off", + "node/no-unpublished-import": "off", + "node/no-unpublished-require": "off", }, }, ], @@ -10571,19 +12504,22 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, - "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, "plugins": [ - "react", - "react-hooks", - "jsx-a11y", + "@sumup-oss/circuit-ui", ], "root": true, "rules": { + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", "curly": [ "error", "all", @@ -10624,8 +12560,10 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowAsStatement": true, }, ], - "react/display-name": "off", - "react/react-in-jsx-scope": "off", + "node/no-extraneous-import": "off", + "node/no-missing-import": "off", + "node/no-unsupported-features/es-syntax": "off", + "security/detect-object-injection": "off", }, "settings": { "import/resolver": { @@ -10638,30 +12576,70 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr ], }, }, - "lintAllEsApis": true, "polyfills": [ - "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", ], - "react": { - "version": "detect", - }, }, } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Browser' ], frameworks: [ 'React' ], plugins: [ 'Testing Library' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` { "env": { - "browser": true, + "node": true, }, "extends": [ "eslint:recommended", "airbnb-base", "plugin:prettier/recommended", - "plugin:compat/recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "plugin:jsx-a11y/recommended", + "plugin:node/recommended", + "plugin:security/recommended-legacy", ], "overrides": [ { @@ -10838,53 +12816,35 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "**/jest*", "**/setupTests.*", "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - "api/**/*", - "pages/api/**/*", - "src/pages/api/**/*", ], "rules": { - "compat/compat": "off", + "node/no-extraneous-require": "off", + "node/no-missing-require": "off", + "node/no-unpublished-import": "off", + "node/no-unpublished-require": "off", }, }, - { - "extends": [ - "plugin:testing-library/react", - ], - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "testing-library", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, - "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, "plugins": [ - "react", - "react-hooks", - "jsx-a11y", + "@sumup/circuit-ui", ], "root": true, "rules": { + "@sumup/circuit-ui/component-lifecycle-imports": "error", + "@sumup/circuit-ui/no-deprecated-components": "warn", + "@sumup/circuit-ui/no-deprecated-props": "warn", + "@sumup/circuit-ui/no-invalid-custom-properties": "error", + "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -10925,8 +12885,10 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "allowAsStatement": true, }, ], - "react/display-name": "off", - "react/react-in-jsx-scope": "off", + "node/no-extraneous-import": "off", + "node/no-missing-import": "off", + "node/no-unsupported-features/es-syntax": "off", + "security/detect-object-injection": "off", }, "settings": { "import/resolver": { @@ -10939,18 +12901,60 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr ], }, }, - "lintAllEsApis": true, "polyfills": [ - "document.body", + "Array.prototype.copyWithin", + "Array.prototype.fill", + "Array.prototype.find", + "Array.prototype.findIndex", + "Array.prototype.flagMap", + "Array.prototype.flat", + "Array.from", + "Array.prototype.includes", + "Array.of", + "Function.name", + "Map", + "Number.EPSILON", + "Number.isFinite", + "Number.isInteger", + "Number.isNaN", + "Number.isSafeInteger", + "Number.MAX_SAFE_INTEGER", + "Number.MIN_SAFE_INTEGER", + "Number.parseFloat", + "Number.parseInt", + "Object.assign", + "Object.entries", + "Object.getOwnPropertyDescriptors", + "Object.keys", + "Object.is", + "Object.values", + "Reflect", + "RegExp", + "Set", + "Symbol", + "String.prototype.codePointAt", + "String.prototype.endsWith", + "String.prototype.fromCodePoint", + "String.prototype.includes", + "String.prototype.padStart", + "String.prototype.padEnd", + "String.prototype.raw", + "String.prototype.repeat", + "String.prototype.startsWith", + "String.prototype.trimLeft", + "String.prototype.trimRight", + "URL", + "URLSearchParams", + "WeakMap", + "WeakSet", + "Promise", + "fetch", ], - "react": { - "version": "detect", - }, }, } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Circuit UI' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Cypress' ] } 1`] = ` { "env": { "node": true, @@ -11145,6 +13149,21 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, + { + "env": { + "cypress/globals": true, + }, + "extends": [ + "plugin:cypress/recommended", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + "plugins": [ + "cypress", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -11156,16 +13175,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "ecmaVersion": 6, "sourceType": "module", }, - "plugins": [ - "@sumup/circuit-ui", - ], "root": true, "rules": { - "@sumup/circuit-ui/component-lifecycle-imports": "error", - "@sumup/circuit-ui/no-deprecated-components": "warn", - "@sumup/circuit-ui/no-deprecated-props": "warn", - "@sumup/circuit-ui/no-invalid-custom-properties": "error", - "@sumup/circuit-ui/no-renamed-props": "error", "curly": [ "error", "all", @@ -11275,7 +13286,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Cypress' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Emotion' ] } 1`] = ` { "env": { "node": true, @@ -11470,21 +13481,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, - { - "env": { - "cypress/globals": true, - }, - "extends": [ - "plugin:cypress/recommended", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - "plugins": [ - "cypress", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -11496,8 +13492,16 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "@emotion", + ], "root": true, "rules": { + "@emotion/import-from-emotion": "error", + "@emotion/jsx-import": "off", + "@emotion/no-vanilla": "error", + "@emotion/pkg-renaming": "error", + "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -11541,6 +13545,14 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-extraneous-import": "off", "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", + "react/no-unknown-property": [ + "error", + { + "ignore": [ + "css", + ], + }, + ], "security/detect-object-injection": "off", }, "settings": { @@ -11607,7 +13619,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Emotion' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Jest' ] } 1`] = ` { "env": { "node": true, @@ -11802,6 +13814,26 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, + { + "env": { + "jest/globals": true, + }, + "extends": [ + "plugin:jest/recommended", + ], + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "jest", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -11813,16 +13845,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "ecmaVersion": 6, "sourceType": "module", }, - "plugins": [ - "@emotion", - ], "root": true, "rules": { - "@emotion/import-from-emotion": "error", - "@emotion/jsx-import": "off", - "@emotion/no-vanilla": "error", - "@emotion/pkg-renaming": "error", - "@emotion/styled-import": "error", "curly": [ "error", "all", @@ -11866,14 +13890,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-extraneous-import": "off", "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", - "react/no-unknown-property": [ - "error", - { - "ignore": [ - "css", - ], - }, - ], "security/detect-object-injection": "off", }, "settings": { @@ -11940,7 +13956,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Jest' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Next.js' ] } 1`] = ` { "env": { "node": true, @@ -11951,6 +13967,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", + "next", ], "overrides": [ { @@ -12135,26 +14152,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, - { - "env": { - "jest/globals": true, - }, - "extends": [ - "plugin:jest/recommended", - ], - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "jest", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -12277,7 +14274,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Next.js' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Playwright' ] } 1`] = ` { "env": { "node": true, @@ -12288,7 +14285,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", - "next", ], "overrides": [ { @@ -12473,6 +14469,15 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, + { + "extends": [ + "plugin:playwright/playwright-test", + ], + "files": [ + "e2e/**/*", + "tests/**/*", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -12595,7 +14600,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Playwright' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Storybook' ] } 1`] = ` { "env": { "node": true, @@ -12606,6 +14611,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", + "plugin:storybook/recommended", ], "overrides": [ { @@ -12790,15 +14796,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, - { - "extends": [ - "plugin:playwright/playwright-test", - ], - "files": [ - "e2e/**/*", - "tests/**/*", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -12921,7 +14918,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Storybook' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Testing Library' ] } 1`] = ` { "env": { "node": true, @@ -12932,7 +14929,6 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", - "plugin:storybook/recommended", ], "overrides": [ { @@ -13117,6 +15113,23 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, + { + "extends": [ + "plugin:testing-library/react", + ], + "files": [ + "**/*.spec.*", + "**/jest*", + "**/setupTests.*", + "**/test-utils.*", + "**/*Fixtures.*", + "**/__fixtures__/**/*", + "**/__mocks__/**/*", + ], + "plugins": [ + "testing-library", + ], + }, ], "parser": "@babel/eslint-parser", "parserOptions": { @@ -13239,7 +15252,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr } `; -exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'Next.js' ], plugins: [ 'Testing Library' ] } 1`] = ` +exports[`eslint > with options > should return a config for { language: 'TypeScript', environments: [ 'Node' ], frameworks: [ 'React' ], plugins: [ 'Circuit UI (OSS scope)' ] } 1`] = ` { "env": { "node": true, @@ -13250,6 +15263,9 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "plugin:prettier/recommended", "plugin:node/recommended", "plugin:security/recommended-legacy", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", ], "overrides": [ { @@ -13434,36 +15450,32 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-unpublished-require": "off", }, }, - { - "extends": [ - "plugin:testing-library/react", - ], - "files": [ - "**/*.spec.*", - "**/jest*", - "**/setupTests.*", - "**/test-utils.*", - "**/*Fixtures.*", - "**/__fixtures__/**/*", - "**/__mocks__/**/*", - ], - "plugins": [ - "testing-library", - ], - }, ], "parser": "@babel/eslint-parser", "parserOptions": { "allowImportExportEverywhere": true, "ecmaFeatures": { "impliedStrict": true, + "jsx": true, "modules": true, }, "ecmaVersion": 6, "sourceType": "module", }, + "plugins": [ + "react", + "react-hooks", + "jsx-a11y", + "@sumup-oss/circuit-ui", + ], "root": true, "rules": { + "@sumup-oss/circuit-ui/component-lifecycle-imports": "error", + "@sumup-oss/circuit-ui/no-deprecated-components": "warn", + "@sumup-oss/circuit-ui/no-deprecated-props": "warn", + "@sumup-oss/circuit-ui/no-invalid-custom-properties": "error", + "@sumup-oss/circuit-ui/no-renamed-props": "error", + "@sumup-oss/circuit-ui/renamed-package-scope": "error", "curly": [ "error", "all", @@ -13507,6 +15519,8 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr "node/no-extraneous-import": "off", "node/no-missing-import": "off", "node/no-unsupported-features/es-syntax": "off", + "react/display-name": "off", + "react/react-in-jsx-scope": "off", "security/detect-object-injection": "off", }, "settings": { @@ -13520,55 +15534,9 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr ], }, }, - "polyfills": [ - "Array.prototype.copyWithin", - "Array.prototype.fill", - "Array.prototype.find", - "Array.prototype.findIndex", - "Array.prototype.flagMap", - "Array.prototype.flat", - "Array.from", - "Array.prototype.includes", - "Array.of", - "Function.name", - "Map", - "Number.EPSILON", - "Number.isFinite", - "Number.isInteger", - "Number.isNaN", - "Number.isSafeInteger", - "Number.MAX_SAFE_INTEGER", - "Number.MIN_SAFE_INTEGER", - "Number.parseFloat", - "Number.parseInt", - "Object.assign", - "Object.entries", - "Object.getOwnPropertyDescriptors", - "Object.keys", - "Object.is", - "Object.values", - "Reflect", - "RegExp", - "Set", - "Symbol", - "String.prototype.codePointAt", - "String.prototype.endsWith", - "String.prototype.fromCodePoint", - "String.prototype.includes", - "String.prototype.padStart", - "String.prototype.padEnd", - "String.prototype.raw", - "String.prototype.repeat", - "String.prototype.startsWith", - "String.prototype.trimLeft", - "String.prototype.trimRight", - "URL", - "URLSearchParams", - "WeakMap", - "WeakSet", - "Promise", - "fetch", - ], + "react": { + "version": "detect", + }, }, } `; diff --git a/src/configs/eslint/config.ts b/src/configs/eslint/config.ts index b4774524..a15cfb2a 100644 --- a/src/configs/eslint/config.ts +++ b/src/configs/eslint/config.ts @@ -639,6 +639,17 @@ function customizePlugin(plugins: Plugin[], workspaces: Workspaces) { '@sumup/circuit-ui/no-deprecated-components': 'warn', }, }, + [Plugin.CIRCUIT_UI_OSS]: { + plugins: ['@sumup-oss/circuit-ui'], + rules: { + '@sumup-oss/circuit-ui/component-lifecycle-imports': 'error', + '@sumup-oss/circuit-ui/no-invalid-custom-properties': 'error', + '@sumup-oss/circuit-ui/no-renamed-props': 'error', + '@sumup-oss/circuit-ui/no-deprecated-props': 'warn', + '@sumup-oss/circuit-ui/no-deprecated-components': 'warn', + '@sumup-oss/circuit-ui/renamed-package-scope': 'error', + }, + }, [Plugin.EMOTION]: { plugins: ['@emotion'], rules: { diff --git a/src/configs/stylelint/__snapshots__/config.spec.ts.snap b/src/configs/stylelint/__snapshots__/config.spec.ts.snap index 96e674f6..26159002 100644 --- a/src/configs/stylelint/__snapshots__/config.spec.ts.snap +++ b/src/configs/stylelint/__snapshots__/config.spec.ts.snap @@ -1,5 +1,55 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`stylelint > with options > should return a config for { plugins: ['Circuit UI (OSS scope)'] } 1`] = ` +{ + "extends": [ + "stylelint-config-standard", + "stylelint-config-recess-order", + ], + "plugins": [ + "stylelint-no-unsupported-browser-features", + "@sumup-oss/stylelint-plugin-circuit-ui", + ], + "reportDescriptionlessDisables": true, + "reportInvalidScopeDisables": true, + "reportNeedlessDisables": true, + "rules": { + "circuit-ui/no-deprecated-custom-properties": true, + "circuit-ui/no-invalid-custom-properties": true, + "declaration-block-no-redundant-longhand-properties": null, + "media-feature-range-notation": [ + "prefix", + ], + "no-descending-specificity": null, + "plugin/no-unsupported-browser-features": [ + true, + { + "ignorePartialSupport": true, + "severity": "warning", + }, + ], + "selector-class-pattern": null, + "selector-not-notation": [ + "simple", + ], + "selector-pseudo-class-no-unknown": [ + true, + { + "ignorePseudoClasses": [ + "global", + ], + }, + ], + "value-keyword-case": [ + "lower", + { + "camelCaseSvgKeywords": true, + }, + ], + }, +} +`; + exports[`stylelint > with options > should return a config for { plugins: ['Circuit UI'] } 1`] = ` { "extends": [ diff --git a/src/configs/stylelint/config.spec.ts b/src/configs/stylelint/config.spec.ts index 524addb4..510bea89 100644 --- a/src/configs/stylelint/config.spec.ts +++ b/src/configs/stylelint/config.spec.ts @@ -122,5 +122,11 @@ describe('stylelint', () => { const actual = createConfig(); expect(actual).toMatchSnapshot(); }); + + it("should return a config for { plugins: ['Circuit UI (OSS scope)'] }", () => { + getOptions.mockReturnValue({ plugins: [Plugin.CIRCUIT_UI_OSS] }); + const actual = createConfig(); + expect(actual).toMatchSnapshot(); + }); }); }); diff --git a/src/configs/stylelint/config.ts b/src/configs/stylelint/config.ts index 1bb9d453..94abfeb4 100644 --- a/src/configs/stylelint/config.ts +++ b/src/configs/stylelint/config.ts @@ -71,6 +71,13 @@ function customizePlugin(plugins: Plugin[]) { 'circuit-ui/no-invalid-custom-properties': true, }, }, + [Plugin.CIRCUIT_UI_OSS]: { + plugins: ['@sumup-oss/stylelint-plugin-circuit-ui'], + rules: { + 'circuit-ui/no-invalid-custom-properties': true, + 'circuit-ui/no-deprecated-custom-properties': true, + }, + }, }; return (config: StylelintConfig): StylelintConfig => { diff --git a/src/lib/options.ts b/src/lib/options.ts index a3a815c2..4c1e5170 100644 --- a/src/lib/options.ts +++ b/src/lib/options.ts @@ -48,6 +48,16 @@ const PLUGINS = [ '@sumup/stylelint-plugin-circuit-ui': '>=1.0.0 <3.0.0', }, }, + { + name: Plugin.CIRCUIT_UI_OSS, + frameworkPackages: ['@sumup-oss/circuit-ui', '@sumup-oss/design-tokens'], + eslintPlugins: { + '@sumup-oss/eslint-plugin-circuit-ui': '>=5.0.0 <6.0.0', + }, + stylelintPlugins: { + '@sumup-oss/stylelint-plugin-circuit-ui': '>=3.0.0 <4.0.0', + }, + }, { name: Plugin.NEXT_JS, frameworkPackages: ['next'], diff --git a/src/types/shared.ts b/src/types/shared.ts index 23980d26..c572805c 100644 --- a/src/types/shared.ts +++ b/src/types/shared.ts @@ -41,6 +41,7 @@ export enum Framework { export enum Plugin { CIRCUIT_UI = 'Circuit UI', + CIRCUIT_UI_OSS = 'Circuit UI (OSS scope)', CYPRESS = 'Cypress', EMOTION = 'Emotion', JEST = 'Jest',