diff --git a/.eslintignore b/.eslintignore index 02c27dbed1..93462fc507 100644 --- a/.eslintignore +++ b/.eslintignore @@ -13,5 +13,5 @@ yarn.lock **/node_modules **/LICENSE.md -# Prettier (which shares this config) totally messess up Storybook MDX files right now +# Prettier (which shares this config) has issues with Storybook MDX files *.mdx \ No newline at end of file diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index acfb000d33..0000000000 --- a/.prettierignore +++ /dev/null @@ -1,17 +0,0 @@ -# Root-level only -.git -.yarn -pages -yarn.lock - -# All packages -**/.angular -**/.DS_Store -**/.svelte-kit -**/dist -**/demo/bundle -**/node_modules -**/LICENSE.md - -# Prettier (which shares this config) totally messess up Storybook MDX files right now -*.mdx diff --git a/.vscode/settings.json b/.vscode/settings.json index 6dcfbfe842..6b32e9427a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "prettier.configPath": "prettier.config.mjs", - "prettier.ignorePath": ".prettierignore", - "prettier.prettierPath": "" + "prettier.ignorePath": ".eslintignore", + "editor.defaultFormatter": "esbenp.prettier-vscode" } \ No newline at end of file diff --git a/package.json b/package.json index 7d590594a1..6f32d79dd5 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@carbon/charts-monorepo", "private": true, "description": "Carbon Charts component libraries for JavaScript, Angular, React, Svelte and Vue", + "type": "module", "scripts": { "clean:root": "rm -rf node_modules yarn.lock .yarn/cache .yarn/install-state.gz", "clean:pages": "rm -rf pages && mkdir -p pages && touch pages/.nojekyll && echo 'charts.carbondesignsystem.com' > pages/CNAME", @@ -27,7 +28,7 @@ "packageManager": "yarn@4.0.2", "prettier": "./prettier.config.mjs", "devDependencies": { - "@nrwl/devkit": "^17.2.7", + "@nrwl/devkit": "^17.2.8", "@storybook/addon-essentials": "~7.6.6", "@storybook/addon-interactions": "~7.6.6", "@storybook/addon-links": "~7.6.6", @@ -42,7 +43,7 @@ "@storybook/vue3-vite": "~7.6.6", "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.16.0", - "@vue/eslint-config-prettier": "^8.0.0", + "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^12.0.0", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", @@ -65,7 +66,7 @@ "react-dom": "^18.2.0", "storybook": "~7.6.6", "vite": "^5.0.10", - "vue": "^3.3.13" + "vue": "^3.4.3" }, "husky": { "hooks": { diff --git a/packages/core/package.json b/packages/core/package.json index 3f350d5a3b..228ac017ea 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -116,14 +116,14 @@ "@types/d3": "^7.4.3", "@types/d3-cloud": "^1.2.9", "@types/d3-sankey": "^0.12.4", - "@types/dompurify": "^3", + "@types/dompurify": "^3.0.5", "@types/lodash-es": "^4.17.12", "@types/topojson": "^3.2.6", "concurrently": "^8.2.2", "downlevel-dts": "^0.11.0", "jsdom": "^23.0.1", "resize-observer-polyfill": "^1.5.1", - "sass": "^1.69.5", + "sass": "^1.69.6", "storybook": "~7.6.6", "typedoc": "^0.25.4", "typescript": "^5.3.3", diff --git a/packages/core/src/components/essentials/legend.ts b/packages/core/src/components/essentials/legend.ts index 81f75bc4c1..26c0fcee98 100644 --- a/packages/core/src/components/essentials/legend.ts +++ b/packages/core/src/components/essentials/legend.ts @@ -337,7 +337,10 @@ export class Legend extends Component { if (truncationType !== TruncationTypes.NONE) { addedLegendItemsText.html(function (d: any) { const _sanitizedLabel = sanitizeText(d.name) - if (_sanitizedLabel.length > truncationThreshold && _sanitizedLabel.length !== truncationNumCharacter) { + if ( + _sanitizedLabel.length > truncationThreshold && + _sanitizedLabel.length !== truncationNumCharacter + ) { return truncateLabel(_sanitizedLabel, truncationType, truncationNumCharacter) } else { return _sanitizedLabel diff --git a/packages/core/src/components/essentials/modal.ts b/packages/core/src/components/essentials/modal.ts index 92823d291f..6880bbd3c6 100644 --- a/packages/core/src/components/essentials/modal.ts +++ b/packages/core/src/components/essentials/modal.ts @@ -79,9 +79,9 @@ export class Modal extends Component {
Tabular representation
-${ - sanitizeText(options.title) - }
+${sanitizeText( + options.title + )}