Configs
The DXP publishes a small set of shared @tmedxp/* configuration packages so teams don’t recreate them per repo. They cover the build/format/lint toolchain you’ll wire up alongside the styleguide.
The browserslist config encodes the Browser support matrix — the others are conventions for the rest of the toolchain.
Browserslist
Section titled “Browserslist”@tmedxp/browserslist-config is the shared browserslist target list. It encodes the Browser support matrix, so your build transpiles and prefixes for every supported browser without you maintaining the matrix in two places.
npm install --save-dev @tmedxp/browserslist-configpnpm add --save-dev @tmedxp/browserslist-configimport browserslistTargets from '@tmedxp/browserslist-config/targets';
export default { presets: [['@babel/preset-env', { targets: browserslistTargets }]],};import postcssPresetEnv from 'postcss-preset-env';
export default { plugins: [postcssPresetEnv({ browsers: browserslistTargets })],};Source: dxp-rc-configs/browserslist-config
ESLint
Section titled “ESLint”@tmedxp/eslint-config is the shared flat-config ESLint preset.
npm install --save-dev @tmedxp/eslint-configpnpm add --save-dev @tmedxp/eslint-configimport dxpConfig from '@tmedxp/eslint-config';
export default [ ...dxpConfig, // { /* Add your own plugins and rules */ },];Source: dxp-rc-configs/eslint-config
Prettier
Section titled “Prettier”@tmedxp/prettier-config is the shared Prettier preset.
npm install --save-dev @tmedxp/prettier-configpnpm add --save-dev @tmedxp/prettier-config{ "prettier": "@tmedxp/prettier-config"}Source: dxp-rc-configs/prettier-config
TSConfig
Section titled “TSConfig”@tmedxp/tsconfig is the shared base TypeScript configuration.
npm install --save-dev @tmedxp/tsconfigpnpm add --save-dev @tmedxp/tsconfig{ "extends": "@tmedxp/tsconfig/base.json", "include": ["src/"]}Source: dxp-rc-configs/tsconfig