diff --git a/.eslintrc.js b/.eslintrc.js index 0ad3cfe59b6..19d288c00ba 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -60,6 +60,12 @@ module.exports = { 'linebreak-style': process.platform === 'win32' ? 'off' : ['error', 'unix'], 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', + 'import/no-import-module-exports': [ + 'error', + { + exceptions: ['**/*/startServer.js'], + }, + ], 'import/no-extraneous-dependencies': [ 'off', { @@ -97,6 +103,14 @@ module.exports = { // adds support for type, interface and enum declarations https://typescript-eslint.io/rules/no-use-before-define/#how-to-use 'no-use-before-define': 'off', '@typescript-eslint/no-use-before-define': ['error'], + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], 'react/require-default-props': 'off', 'react/no-unused-prop-types': 'off', }, diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 62f7b891b17..09643d007c8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,9 +15,6 @@ updates: update-types: ['version-update:semver-major'] - dependency-name: '@typescript-eslint/eslint-plugin' update-types: ['version-update:semver-major'] - # https://jira.dev.bbc.co.uk/browse/WSTEAMA-1545 - Upgrade eslint-config-airbnb to the latest version - - dependency-name: eslint-config-airbnb - update-types: ['version-update:semver-major'] # https://jira.dev.bbc.co.uk/browse/NEWSWORLDSERVICE-2186: Latest version of Emotion contains a memory leak that needs resolved: https://github.com/emotion-js/emotion/issues/3221 - dependency-name: '@emotion/*' # Opera Mini unsupported packages diff --git a/.yarn/cache/@esbuild-darwin-arm64-npm-0.24.0-f33b2ff14e-10.zip b/.yarn/cache/@esbuild-darwin-arm64-npm-0.24.0-f33b2ff14e-10.zip deleted file mode 100644 index c85bd140940..00000000000 Binary files a/.yarn/cache/@esbuild-darwin-arm64-npm-0.24.0-f33b2ff14e-10.zip and /dev/null differ diff --git a/.yarn/cache/@esbuild-linux-x64-npm-0.24.0-744e76a7ed-10.zip b/.yarn/cache/@esbuild-linux-x64-npm-0.24.0-744e76a7ed-10.zip new file mode 100644 index 00000000000..cbb5afdf05f Binary files /dev/null and b/.yarn/cache/@esbuild-linux-x64-npm-0.24.0-744e76a7ed-10.zip differ diff --git a/.yarn/cache/@img-sharp-darwin-arm64-npm-0.33.5-c319591c53-10.zip b/.yarn/cache/@img-sharp-darwin-arm64-npm-0.33.5-c319591c53-10.zip deleted file mode 100644 index 2528a01baac..00000000000 Binary files a/.yarn/cache/@img-sharp-darwin-arm64-npm-0.33.5-c319591c53-10.zip and /dev/null differ diff --git a/.yarn/cache/@img-sharp-libvips-darwin-arm64-npm-1.0.4-d0d063884a-10.zip b/.yarn/cache/@img-sharp-libvips-darwin-arm64-npm-1.0.4-d0d063884a-10.zip deleted file mode 100644 index 6b3340399d0..00000000000 Binary files a/.yarn/cache/@img-sharp-libvips-darwin-arm64-npm-1.0.4-d0d063884a-10.zip and /dev/null differ diff --git a/.yarn/cache/@img-sharp-libvips-linux-x64-npm-1.0.4-0974f077b7-10.zip b/.yarn/cache/@img-sharp-libvips-linux-x64-npm-1.0.4-0974f077b7-10.zip new file mode 100644 index 00000000000..a4a5824aa57 Binary files /dev/null and b/.yarn/cache/@img-sharp-libvips-linux-x64-npm-1.0.4-0974f077b7-10.zip differ diff --git a/.yarn/cache/@img-sharp-linux-x64-npm-0.33.5-1b6c430eb4-10.zip b/.yarn/cache/@img-sharp-linux-x64-npm-0.33.5-1b6c430eb4-10.zip new file mode 100644 index 00000000000..fd9356ce5d3 Binary files /dev/null and b/.yarn/cache/@img-sharp-linux-x64-npm-0.33.5-1b6c430eb4-10.zip differ diff --git a/.yarn/cache/@next-swc-darwin-arm64-npm-15.1.5-8aadf4de48-10.zip b/.yarn/cache/@next-swc-darwin-arm64-npm-15.1.5-8aadf4de48-10.zip deleted file mode 100644 index 7f5eb739d2b..00000000000 Binary files a/.yarn/cache/@next-swc-darwin-arm64-npm-15.1.5-8aadf4de48-10.zip and /dev/null differ diff --git a/.yarn/cache/eslint-config-airbnb-base-npm-14.2.1-50131c00fb-0d679b6fe8.zip b/.yarn/cache/eslint-config-airbnb-base-npm-14.2.1-50131c00fb-0d679b6fe8.zip deleted file mode 100644 index 25d507b8887..00000000000 Binary files a/.yarn/cache/eslint-config-airbnb-base-npm-14.2.1-50131c00fb-0d679b6fe8.zip and /dev/null differ diff --git a/.yarn/cache/eslint-config-airbnb-base-npm-15.0.0-802837dd26-daa68a1dcb.zip b/.yarn/cache/eslint-config-airbnb-base-npm-15.0.0-802837dd26-daa68a1dcb.zip new file mode 100644 index 00000000000..18cd421b379 Binary files /dev/null and b/.yarn/cache/eslint-config-airbnb-base-npm-15.0.0-802837dd26-daa68a1dcb.zip differ diff --git a/.yarn/cache/eslint-config-airbnb-npm-18.2.1-19125926b3-0f251b0512.zip b/.yarn/cache/eslint-config-airbnb-npm-18.2.1-19125926b3-0f251b0512.zip deleted file mode 100644 index c1f22391569..00000000000 Binary files a/.yarn/cache/eslint-config-airbnb-npm-18.2.1-19125926b3-0f251b0512.zip and /dev/null differ diff --git a/.yarn/cache/eslint-config-airbnb-npm-19.0.4-a73150c84a-f2086523cf.zip b/.yarn/cache/eslint-config-airbnb-npm-19.0.4-a73150c84a-f2086523cf.zip new file mode 100644 index 00000000000..67c211412a9 Binary files /dev/null and b/.yarn/cache/eslint-config-airbnb-npm-19.0.4-a73150c84a-f2086523cf.zip differ diff --git a/.yarn/cache/fsevents-patch-6b67494872-10.zip b/.yarn/cache/fsevents-patch-6b67494872-10.zip deleted file mode 100644 index 9887ada72d9..00000000000 Binary files a/.yarn/cache/fsevents-patch-6b67494872-10.zip and /dev/null differ diff --git a/cypress/support/helpers/ampOnlyServices.js b/cypress/support/helpers/ampOnlyServices.js index df8612f50e1..bdcce005d1c 100644 --- a/cypress/support/helpers/ampOnlyServices.js +++ b/cypress/support/helpers/ampOnlyServices.js @@ -1,2 +1,2 @@ const ampOnlyServices = ['news', 'sport', 'newsround']; -export { ampOnlyServices as default }; +export default ampOnlyServices; diff --git a/package.json b/package.json index 4b4e0233a2f..c2b4b40cce0 100644 --- a/package.json +++ b/package.json @@ -213,7 +213,7 @@ "cypress-terminal-report": "7.1.0", "depcheck": "1.4.7", "eslint": "7.32.0", - "eslint-config-airbnb": "18.2.1", + "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "10.0.1", "eslint-import-resolver-alias": "1.1.2", "eslint-plugin-cypress": "4.1.0", diff --git a/src/app/components/ATIAnalytics/params/index.ts b/src/app/components/ATIAnalytics/params/index.ts index 4d3c1ee3e40..19624ac6e2a 100644 --- a/src/app/components/ATIAnalytics/params/index.ts +++ b/src/app/components/ATIAnalytics/params/index.ts @@ -121,7 +121,7 @@ type BuilderFunction = { }; type PageTypeHandlers = { - [key in PageTypes]: BuilderFunction; + [_key in PageTypes]: BuilderFunction; }; const isMigrated = (pageType: PageTypes) => diff --git a/src/app/components/Ad/Amp/AdSlot/index.tsx b/src/app/components/Ad/Amp/AdSlot/index.tsx index f5188aedeb1..ff0d851b6bd 100644 --- a/src/app/components/Ad/Amp/AdSlot/index.tsx +++ b/src/app/components/Ad/Amp/AdSlot/index.tsx @@ -68,8 +68,8 @@ interface DeviceSettings { } const slotConfigurations: { - [slot in SlotType]: { - [device in Device]?: DeviceSettings; + [_slot in SlotType]: { + [_device in Device]?: DeviceSettings; }; } = { leaderboard: { diff --git a/src/app/components/Billboard/index.styles.ts b/src/app/components/Billboard/index.styles.ts index 9d0e8f27933..f37508b797e 100644 --- a/src/app/components/Billboard/index.styles.ts +++ b/src/app/components/Billboard/index.styles.ts @@ -5,6 +5,7 @@ export default { link: ({ palette }: Theme) => css({ textDecoration: 'none', + display: 'block', color: palette.WHITE, cursor: 'pointer', '&:hover, &:focus': { diff --git a/src/app/components/Billboard/index.tsx b/src/app/components/Billboard/index.tsx index aa55dc86750..d83ab0a56bd 100644 --- a/src/app/components/Billboard/index.tsx +++ b/src/app/components/Billboard/index.tsx @@ -53,12 +53,7 @@ const Billboard = forwardRef( />