diff --git a/.prettierrc.js b/.prettierrc.js index e01552e6358c7..74d3911ed6bf2 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,4 +1,7 @@ module.exports = { + // Load plugins from sub-project so we don't have to clutter the monorepo root with them. + plugins: require( './tools/js-tools/prettier-plugins.js' ), + useTabs: true, tabWidth: 2, printWidth: 100, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1c681a789a57..c15f28b47b584 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -269,12 +269,6 @@ importers: '@automattic/jetpack-webpack-config': specifier: workspace:* version: link:../webpack-config - '@typescript-eslint/parser': - specifier: 6.21.0 - version: 6.21.0(eslint@8.57.1)(typescript@5.0.4) - eslint: - specifier: 8.57.1 - version: 8.57.1 jest: specifier: 29.7.0 version: 29.7.0 @@ -593,9 +587,6 @@ importers: playwright-core: specifier: ^1.45.1 version: 1.48.2 - prettier: - specifier: npm:wp-prettier@3.0.3 - version: wp-prettier@3.0.3 process: specifier: 0.11.10 version: 0.11.10 @@ -799,12 +790,6 @@ importers: '@rollup/plugin-typescript': specifier: 12.1.0 version: 12.1.0(rollup@3.29.5)(tslib@2.5.0)(typescript@5.0.4) - '@typescript-eslint/parser': - specifier: 6.21.0 - version: 6.21.0(eslint@8.57.1)(typescript@5.0.4) - eslint: - specifier: 8.57.1 - version: 8.57.1 jest: specifier: 29.7.0 version: 29.7.0 @@ -1526,12 +1511,6 @@ importers: '@automattic/jetpack-webpack-config': specifier: workspace:* version: link:../webpack-config - '@typescript-eslint/parser': - specifier: 6.21.0 - version: 6.21.0(eslint@8.57.1)(typescript@5.0.4) - eslint: - specifier: 8.57.1 - version: 8.57.1 jest: specifier: 29.7.0 version: 29.7.0 @@ -2805,9 +2784,6 @@ importers: postcss-loader: specifier: 6.2.0 version: 6.2.0(postcss@8.4.47)(webpack@5.94.0(webpack-cli@4.9.1)) - prettier: - specifier: npm:wp-prettier@3.0.3 - version: wp-prettier@3.0.3 sass: specifier: 1.64.1 version: 1.64.1 @@ -3147,9 +3123,6 @@ importers: jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0 - prettier: - specifier: npm:wp-prettier@3.0.3 - version: wp-prettier@3.0.3 sass: specifier: 1.64.1 version: 1.64.1 @@ -3370,9 +3343,6 @@ importers: history: specifier: 5.3.0 version: 5.3.0 - prettier: - specifier: npm:wp-prettier@3.0.3 - version: wp-prettier@3.0.3 react-router-dom: specifier: 6.21.0 version: 6.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -4858,8 +4828,8 @@ importers: specifier: npm:wp-prettier@3.0.3 version: wp-prettier@3.0.3 prettier-plugin-svelte: - specifier: 3.0.3 - version: 3.0.3(svelte@4.2.19)(wp-prettier@3.0.3) + specifier: 3.3.2 + version: 3.3.2(svelte@4.2.19)(wp-prettier@3.0.3) semver: specifier: 7.5.2 version: 7.5.2 @@ -12154,11 +12124,11 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier-plugin-svelte@3.0.3: - resolution: {integrity: sha512-dLhieh4obJEK1hnZ6koxF+tMUrZbV5YGvRpf2+OADyanjya5j0z1Llo8iGwiHmFWZVG/hLEw/AJD5chXd9r3XA==} + prettier-plugin-svelte@3.3.2: + resolution: {integrity: sha512-kRPjH8wSj2iu+dO+XaUv4vD8qr5mdDmlak3IT/7AOgGIMRG86z/EHOLauFcClKEnOUf4A4nOA7sre5KrJD4Raw==} peerDependencies: prettier: ^3.0.0 - svelte: ^3.2.0 || ^4.0.0-next.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} @@ -24549,7 +24519,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-svelte@3.0.3(svelte@4.2.19)(wp-prettier@3.0.3): + prettier-plugin-svelte@3.3.2(svelte@4.2.19)(wp-prettier@3.0.3): dependencies: prettier: wp-prettier@3.0.3 svelte: 4.2.19 diff --git a/projects/js-packages/babel-plugin-replace-textdomain/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/babel-plugin-replace-textdomain/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..c4865a894ae4f --- /dev/null +++ b/projects/js-packages/babel-plugin-replace-textdomain/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Add `NODE_OPTIONS=--experimental-vm-modules` to test run, apparently the `require()` in `.prettierrc.js` somehow requires that now. 🤷 + + diff --git a/projects/js-packages/babel-plugin-replace-textdomain/package.json b/projects/js-packages/babel-plugin-replace-textdomain/package.json index a40452cb871eb..c44b6778ed5ec 100644 --- a/projects/js-packages/babel-plugin-replace-textdomain/package.json +++ b/projects/js-packages/babel-plugin-replace-textdomain/package.json @@ -14,7 +14,7 @@ "license": "GPL-2.0-or-later", "author": "Automattic", "scripts": { - "test": "jest --config=tests/jest.config.cjs", + "test": "NODE_OPTIONS=--experimental-vm-modules jest --config=tests/jest.config.cjs", "test-coverage": "pnpm run test --coverage" }, "dependencies": { diff --git a/projects/js-packages/boost-score-api/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/boost-score-api/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..2364576bd9ea9 --- /dev/null +++ b/projects/js-packages/boost-score-api/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused eslint deps. + + diff --git a/projects/js-packages/boost-score-api/package.json b/projects/js-packages/boost-score-api/package.json index 0fa380086c622..514961b2d7d8e 100644 --- a/projects/js-packages/boost-score-api/package.json +++ b/projects/js-packages/boost-score-api/package.json @@ -26,8 +26,6 @@ }, "devDependencies": { "@automattic/jetpack-webpack-config": "workspace:*", - "@typescript-eslint/parser": "6.21.0", - "eslint": "8.57.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "typescript": "5.0.4", diff --git a/projects/js-packages/critical-css-gen/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/critical-css-gen/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..3779e08b5101e --- /dev/null +++ b/projects/js-packages/critical-css-gen/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,4 @@ +Significance: patch +Type: removed + +Remove unused prettier dep. diff --git a/projects/js-packages/critical-css-gen/package.json b/projects/js-packages/critical-css-gen/package.json index ddc33a9d45df8..939ecb181adaa 100644 --- a/projects/js-packages/critical-css-gen/package.json +++ b/projects/js-packages/critical-css-gen/package.json @@ -36,7 +36,6 @@ "path-browserify": "1.0.1", "playwright": "1.45.1", "playwright-core": "^1.45.1", - "prettier": "npm:wp-prettier@3.0.3", "process": "0.11.10", "source-map": "0.7.4", "source-map-js": "1.2.0", diff --git a/projects/js-packages/image-guide/.eslintrc.cjs b/projects/js-packages/image-guide/.eslintrc.cjs index 83b2285148e1e..f0f49c0278186 100644 --- a/projects/js-packages/image-guide/.eslintrc.cjs +++ b/projects/js-packages/image-guide/.eslintrc.cjs @@ -45,7 +45,6 @@ module.exports = { 'import/no-unresolved': 0, 'import/order': 0, 'no-nested-ternary': 0, - 'prettier/prettier': 0, camelcase: 0, }, }; diff --git a/projects/js-packages/image-guide/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/image-guide/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..720019229cd39 --- /dev/null +++ b/projects/js-packages/image-guide/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Enable prettier via eslint, and fix issues. Also remove unused eslint deps and package.json scripts. + + diff --git a/projects/js-packages/image-guide/package.json b/projects/js-packages/image-guide/package.json index 8a8e70fc80890..9e121c7254f01 100644 --- a/projects/js-packages/image-guide/package.json +++ b/projects/js-packages/image-guide/package.json @@ -23,8 +23,6 @@ "dev-validate-ts": "tsc --watch --pretty --strict false # Note: Disable Strict mode to avoid noisy development, while keeping strict errors visible in IDEs.", "dev-compile": "pnpm run clear-dist && rollup -c -w", "dev": "concurrently 'pnpm:dev-validate-ts' 'pnpm:dev-compile'", - "reformat-files": "../../../tools/js-tools/node_modules/.bin/prettier --ignore-path .eslintignore --write --plugin-search-dir=. ./**/*.{svelte,js,ts,json}", - "lint": "pnpm run reformat-files && echo 'Running eslint...' && pnpm eslint app/assets/src/js tests/e2e --fix && echo '✔ prettier and eslint ran successfully.'", "clear-dist": "rm -rf app/assets/dist/*", "test-coverage": "pnpm run test --coverage", "test": "NODE_OPTIONS=--experimental-vm-modules jest --config=tests/jest.config.cjs" @@ -44,8 +42,6 @@ "@rollup/plugin-replace": "5.0.2", "@rollup/plugin-terser": "0.4.3", "@rollup/plugin-typescript": "12.1.0", - "@typescript-eslint/parser": "6.21.0", - "eslint": "8.57.1", "jest": "29.7.0", "postcss": "8.4.47", "rollup": "3.29.5", diff --git a/projects/js-packages/image-guide/src/ui/Main.svelte b/projects/js-packages/image-guide/src/ui/Main.svelte index 483918393b396..fa03fa881229b 100644 --- a/projects/js-packages/image-guide/src/ui/Main.svelte +++ b/projects/js-packages/image-guide/src/ui/Main.svelte @@ -14,16 +14,16 @@ * This onMount is triggered when the window loads * and the Image Guide UI is first */ - onMount(() => { - stores.forEach(store => store.updateDimensions()); - }); + onMount( () => { + stores.forEach( store => store.updateDimensions() ); + } ); - function closeDetails(e) { + function closeDetails( e ) { // Don't exit when hovering the Portal if ( e.relatedTarget && // Don't exit when hovering the Popup - e.relatedTarget.classList.contains('keep-guide-open') + e.relatedTarget.classList.contains( 'keep-guide-open' ) ) { return; } @@ -31,34 +31,34 @@ show = false; } - function getGuideSize(width = -1, height = -1): GuideSize { - if (width < 200 || height < 200) { + function getGuideSize( width = -1, height = -1 ): GuideSize { + if ( width < 200 || height < 200 ) { return 'micro'; - } else if (width < 400 || height < 400) { + } else if ( width < 400 || height < 400 ) { return 'small'; } return 'normal'; } - function toggleBackdrop(on = false) { - if (on) { - stores.forEach(store => store.node.classList.add('jetpack-boost-guide__backdrop')); + function toggleBackdrop( on = false ) { + if ( on ) { + stores.forEach( store => store.node.classList.add( 'jetpack-boost-guide__backdrop' ) ); } else { - stores.forEach(store => store.node.classList.remove('jetpack-boost-guide__backdrop')); + stores.forEach( store => store.node.classList.remove( 'jetpack-boost-guide__backdrop' ) ); } } // Use the first image available in the stores to determine the guide size - const sizeOnPage = stores[0].sizeOnPage; - $: size = getGuideSize($sizeOnPage.width, $sizeOnPage.height); + const sizeOnPage = stores[ 0 ].sizeOnPage; + $: size = getGuideSize( $sizeOnPage.width, $sizeOnPage.height ); - $: toggleBackdrop(show !== false); + $: toggleBackdrop( show !== false ); let position = { top: 0, left: 0, }; - function hover(e: CustomEvent) { + function hover( e: CustomEvent ) { const detail = e.detail; const index = detail.index; position = detail.position; @@ -69,8 +69,9 @@ * Only show image guide if at least one of the images * has a file size available. */ - const hasItemsWithFileSize = derived(stores.map(s => s.fileSize), $fileSizes => - $fileSizes.some(fileSize => fileSize.width !== -1 && fileSize.height !== -1) + const hasItemsWithFileSize = derived( + stores.map( s => s.fileSize ), + $fileSizes => $fileSizes.some( fileSize => fileSize.width !== -1 && fileSize.height !== -1 ) ); @@ -94,20 +95,20 @@ Intentionally using only a single component here. See component source for details. --> - + {/if} {/if} diff --git a/projects/js-packages/react-data-sync-client/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/react-data-sync-client/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..7e8af900c1dac --- /dev/null +++ b/projects/js-packages/react-data-sync-client/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused eslint and prettier scripts from package.json. + + diff --git a/projects/js-packages/react-data-sync-client/package.json b/projects/js-packages/react-data-sync-client/package.json index cb91183c54716..32e14e1b8b89e 100644 --- a/projects/js-packages/react-data-sync-client/package.json +++ b/projects/js-packages/react-data-sync-client/package.json @@ -18,8 +18,6 @@ "build": "pnpm run clean && webpack", "clean": "rm -rf build/", "watch": "pnpm run build && pnpm webpack watch", - "reformat-files": "../../../tools/js-tools/node_modules/.bin/prettier --ignore-path .eslintignore --write --plugin-search-dir=. ./src/**/*.ts", - "lint": "pnpm run reformat-files && echo 'Running eslint...' && pnpm eslint src --fix && echo '✔ prettier and eslint ran successfully.'", "test": "NODE_OPTIONS=--experimental-vm-modules jest --config=tests/jest.config.cjs", "test-coverage": "pnpm run test --coverage" }, diff --git a/projects/js-packages/svelte-data-sync-client/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/svelte-data-sync-client/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..04bcc1ebf9f3c --- /dev/null +++ b/projects/js-packages/svelte-data-sync-client/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused eslint and prettier scripts from package.json, and unused eslint deps. + + diff --git a/projects/js-packages/svelte-data-sync-client/package.json b/projects/js-packages/svelte-data-sync-client/package.json index 616d7e8034ba3..7d702595c5098 100644 --- a/projects/js-packages/svelte-data-sync-client/package.json +++ b/projects/js-packages/svelte-data-sync-client/package.json @@ -19,15 +19,11 @@ "build": "pnpm run clean && webpack", "clean": "rm -rf build/", "watch": "pnpm run build && pnpm webpack watch", - "reformat-files": "../../../tools/js-tools/node_modules/.bin/prettier --ignore-path .eslintignore --write --plugin-search-dir=. ./src/**/*.ts", - "lint": "pnpm run reformat-files && echo 'Running eslint...' && pnpm eslint src --fix && echo '✔ prettier and eslint ran successfully.'", "test-coverage": "pnpm run test --coverage", "test": "NODE_OPTIONS=--experimental-vm-modules jest --config=tests/jest.config.cjs" }, "devDependencies": { "@automattic/jetpack-webpack-config": "workspace:*", - "@typescript-eslint/parser": "6.21.0", - "eslint": "8.57.1", "jest": "29.7.0", "svelte": "4.2.19", "tslib": "2.5.0", diff --git a/projects/js-packages/videopress-core/changelog/update-cleanup-project-level-eslint-prettier b/projects/js-packages/videopress-core/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..42c5b09465196 --- /dev/null +++ b/projects/js-packages/videopress-core/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused eslint and prettier scripts from package.json + + diff --git a/projects/js-packages/videopress-core/package.json b/projects/js-packages/videopress-core/package.json index ba65854c9c0db..0818789dbd3c9 100644 --- a/projects/js-packages/videopress-core/package.json +++ b/projects/js-packages/videopress-core/package.json @@ -17,8 +17,6 @@ "build": "pnpm run clean && webpack", "clean": "rm -rf build/", "watch": "pnpm run build && pnpm webpack watch", - "reformat-files": "../../../tools/js-tools/node_modules/.bin/prettier --ignore-path .eslintignore --write --plugin-search-dir=. ./src/**/*.ts", - "lint": "pnpm run reformat-files && echo 'Running eslint...' && pnpm eslint src --fix && echo '✔ prettier and eslint ran successfully.'", "test": "NODE_OPTIONS=--experimental-vm-modules jest --config=tests/jest.config.cjs", "test-coverage": "pnpm run test --coverage" }, diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-cleanup-project-level-eslint-prettier b/projects/packages/jetpack-mu-wpcom/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..9cfe3129f052e --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused eslint script from package.json + + diff --git a/projects/packages/jetpack-mu-wpcom/package.json b/projects/packages/jetpack-mu-wpcom/package.json index f72620d2e1ae7..b4ce5d498f4d7 100644 --- a/projects/packages/jetpack-mu-wpcom/package.json +++ b/projects/packages/jetpack-mu-wpcom/package.json @@ -19,7 +19,6 @@ "build-js": "pnpm clean && webpack", "build-production": "echo 'Not implemented.'", "build-production-js": "NODE_ENV=production BABEL_ENV=production pnpm build-js", - "lint": "eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx .", "clean": "rm -rf src/build/", "watch": "pnpm run build-production-js && pnpm webpack watch", "e2e-tests": "playwright test --config src/features/verbum-comments/playwright.config.ts", diff --git a/projects/packages/search/changelog/update-cleanup-project-level-eslint-prettier b/projects/packages/search/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..8256e2f511aed --- /dev/null +++ b/projects/packages/search/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused prettier dep. + + diff --git a/projects/packages/search/package.json b/projects/packages/search/package.json index d40fc8151916d..785dbcc26ec1d 100644 --- a/projects/packages/search/package.json +++ b/projects/packages/search/package.json @@ -88,7 +88,6 @@ "postcss": "8.4.47", "postcss-custom-properties": "12.1.7", "postcss-loader": "6.2.0", - "prettier": "npm:wp-prettier@3.0.3", "sass": "1.64.1", "sass-loader": "12.4.0", "size-limit": "11.1.6", diff --git a/projects/packages/wordads/changelog/update-cleanup-project-level-eslint-prettier b/projects/packages/wordads/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..8256e2f511aed --- /dev/null +++ b/projects/packages/wordads/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused prettier dep. + + diff --git a/projects/packages/wordads/package.json b/projects/packages/wordads/package.json index 95cc2e8057867..5cb0c4f4a6c81 100644 --- a/projects/packages/wordads/package.json +++ b/projects/packages/wordads/package.json @@ -76,7 +76,6 @@ "core-js": "3.38.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", - "prettier": "npm:wp-prettier@3.0.3", "sass": "1.64.1", "sass-loader": "12.4.0", "webpack": "5.94.0", diff --git a/projects/plugins/boost/.eslintrc.cjs b/projects/plugins/boost/.eslintrc.cjs index 265c0d7bf8fdb..bf69875f3f9c0 100644 --- a/projects/plugins/boost/.eslintrc.cjs +++ b/projects/plugins/boost/.eslintrc.cjs @@ -46,7 +46,6 @@ module.exports = { 'import/no-unresolved': 0, 'import/order': 0, 'no-nested-ternary': 0, - 'prettier/prettier': 0, camelcase: 0, // Boost should just use our standard eslint rulesets, that already does this. diff --git a/projects/plugins/boost/changelog/update-cleanup-project-level-eslint-prettier b/projects/plugins/boost/changelog/update-cleanup-project-level-eslint-prettier new file mode 100644 index 0000000000000..76bd72d20ee0d --- /dev/null +++ b/projects/plugins/boost/changelog/update-cleanup-project-level-eslint-prettier @@ -0,0 +1,5 @@ +Significance: patch +Type: removed +Comment: Remove unused eslint and prettier scripts and dep from package.json. Also enable `prettier/prettier` eslint rule (which required no fixes). + + diff --git a/projects/plugins/boost/package.json b/projects/plugins/boost/package.json index 85b490052530c..76f9bfe0b118e 100644 --- a/projects/plugins/boost/package.json +++ b/projects/plugins/boost/package.json @@ -18,7 +18,6 @@ "clsx": "2.1.1", "copy-webpack-plugin": "11.0.0", "history": "5.3.0", - "prettier": "npm:wp-prettier@3.0.3", "react-router-dom": "6.21.0", "react-use-measure": "2.1.1", "use-debounce": "10.0.0", @@ -69,8 +68,6 @@ "test-coverage": "pnpm run test --coverage", "validate": "pnpm exec validate-es app/assets/dist", "watch": "pnpm run build && webpack watch", - "reformat-files": "../../../tools/js-tools/node_modules/.bin/prettier --ignore-path .eslintignore --write --plugin-search-dir=. ./**/*.{js,ts,json}", - "lint": "pnpm run reformat-files && echo 'Running eslint...' && pnpm eslint app/assets/src/js tests/e2e --fix && echo '✔ prettier and eslint ran successfully.'", "test-e2e:start": "pnpm --prefix tests/e2e run tunnel:up && pnpm --prefix tests/e2e run env:up", "test-e2e:run": "pnpm --prefix tests/e2e run test:run", "test-e2e:stop": "pnpm --prefix tests/e2e run tunnel:down && pnpm --prefix tests/e2e run env:down", diff --git a/projects/plugins/inspect/.eslintrc.cjs b/projects/plugins/inspect/.eslintrc.cjs index 30534d9e0cb5b..06cbcabf2ee85 100644 --- a/projects/plugins/inspect/.eslintrc.cjs +++ b/projects/plugins/inspect/.eslintrc.cjs @@ -45,7 +45,6 @@ module.exports = { 'react-hooks/rules-of-hooks': 0, 'no-nested-ternary': 0, - 'prettier/prettier': 0, camelcase: 0, }, }; diff --git a/projects/plugins/inspect/app-ui/src/Components/Tabs/Tab.svelte b/projects/plugins/inspect/app-ui/src/Components/Tabs/Tab.svelte index 984b8b0f0e7b1..c603c200fc6ed 100644 --- a/projects/plugins/inspect/app-ui/src/Components/Tabs/Tab.svelte +++ b/projects/plugins/inspect/app-ui/src/Components/Tabs/Tab.svelte @@ -1,14 +1,14 @@ - @@ -25,8 +25,8 @@ } .selected { - border-bottom: 2px solid var(--jetpack-green); - transform: translateY(2px); + border-bottom: 2px solid var( --jetpack-green ); + transform: translateY( 2px ); opacity: 1; } diff --git a/projects/plugins/inspect/app-ui/src/Components/Tabs/TabList.svelte b/projects/plugins/inspect/app-ui/src/Components/Tabs/TabList.svelte index ee6f520eaad8f..4b0c2605450bf 100644 --- a/projects/plugins/inspect/app-ui/src/Components/Tabs/TabList.svelte +++ b/projects/plugins/inspect/app-ui/src/Components/Tabs/TabList.svelte @@ -4,6 +4,6 @@ diff --git a/projects/plugins/inspect/app-ui/src/Components/Tabs/TabPanel.svelte b/projects/plugins/inspect/app-ui/src/Components/Tabs/TabPanel.svelte index c6a4d27bdff93..d36c25525f075 100644 --- a/projects/plugins/inspect/app-ui/src/Components/Tabs/TabPanel.svelte +++ b/projects/plugins/inspect/app-ui/src/Components/Tabs/TabPanel.svelte @@ -3,9 +3,9 @@ import { TABS } from './Tabs.svelte'; const panel = {}; - const { registerPanel, selectedPanel } = getContext(TABS); + const { registerPanel, selectedPanel } = getContext( TABS ); - registerPanel(panel); + registerPanel( panel ); {#if $selectedPanel === panel} diff --git a/projects/plugins/inspect/app-ui/src/Components/Tabs/Tabs.svelte b/projects/plugins/inspect/app-ui/src/Components/Tabs/Tabs.svelte index e0e65d1038a33..926727623f386 100644 --- a/projects/plugins/inspect/app-ui/src/Components/Tabs/Tabs.svelte +++ b/projects/plugins/inspect/app-ui/src/Components/Tabs/Tabs.svelte @@ -3,52 +3,52 @@
diff --git a/projects/plugins/inspect/app-ui/src/Components/Toggle.svelte b/projects/plugins/inspect/app-ui/src/Components/Toggle.svelte index ae1c6819eb157..a8589d7b2002d 100644 --- a/projects/plugins/inspect/app-ui/src/Components/Toggle.svelte +++ b/projects/plugins/inspect/app-ui/src/Components/Toggle.svelte @@ -13,13 +13,13 @@ @use 'sass:math'; $width: 50px; $height: 25px; - $border-radius: math.div($width, 2); + $border-radius: math.div( $width, 2 ); $switch_width: 15px; $switch_height: $switch_width; - $switch_border-radius: math.div($switch_width, 2); + $switch_border-radius: math.div( $switch_width, 2 ); $switch_margin: 5px; - $switch_movement: $width - $switch_width - $switch_margin * 2 - math.div($switch_margin, 2); + $switch_movement: $width - $switch_width - $switch_margin * 2 - math.div( $switch_margin, 2 ); .switch { position: relative; @@ -40,17 +40,17 @@ height: 100%; cursor: pointer; background: transparent; - border: 2px solid var(--jetpack_green_100); + border: 2px solid var( --jetpack_green_100 ); border-radius: $border-radius; transition: background-color 0.1s ease; } .switch .track:before { position: absolute; - content: ""; + content: ''; width: $switch_width; height: $switch_height; - background: var(--jetpack_green_100); + background: var( --jetpack_green_100 ); border-radius: 50%; left: $switch_margin; right: auto; @@ -58,17 +58,19 @@ bottom: 0; margin-top: auto; margin-bottom: auto; - transition: transform 0.3s ease, background-color 0.1s ease; + transition: + transform 0.3s ease, + background-color 0.1s ease; } .switch input:checked { + .track { - background: var(--jetpack-green); - border-color: var(--jetpack-green); + background: var( --jetpack-green ); + border-color: var( --jetpack-green ); &:before { - transform: translateX($switch_movement); - background-color: var(--jetpack_green_0); + transform: translateX( $switch_movement ); + background-color: var( --jetpack_green_0 ); } } } diff --git a/projects/plugins/inspect/app-ui/src/Dashboard/Form.svelte b/projects/plugins/inspect/app-ui/src/Dashboard/Form.svelte index 871f4e06c6f00..e2f186734575e 100644 --- a/projects/plugins/inspect/app-ui/src/Dashboard/Form.svelte +++ b/projects/plugins/inspect/app-ui/src/Dashboard/Form.svelte @@ -1,63 +1,60 @@
-
submit($data)}> + submit( $data )}>

New Request

@@ -86,12 +83,7 @@
-