Skip to content

Commit

Permalink
Merge pull request #6666 from guardian/ahe/knip-dev-deps
Browse files Browse the repository at this point in the history
Remove unused dev dependencies
  • Loading branch information
andrewHEguardian authored Jan 6, 2025
2 parents 1e2b83d + 5226f1c commit d0ecfea
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 550 deletions.
20 changes: 20 additions & 0 deletions support-frontend/knip.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ module.exports = {
entry: flattenedEntryPoints,
project: ['**/*.{js,jsx,ts,tsx,scss}!'],
ignoreExportsUsedInFile: true,
ignoreDependencies: [
// used in package.json
'@guardian/browserslist-config',
'lint-staged',
// used by scripts in package.json
'webpack-cli',
'webpack-dev-server',
// could be used to run Chromatic locally
'chromatic',
'concurrently', // used in devrun.sh
// used in webpack.common.js
'babel-loader',
'css-loader',
'fast-sass-loader',
'file-loader',
'postcss-loader',
'ts-loader',
'sass', // peer dependency of fast-sass-loader
'sass-mq', // imported from breakpoints.scss
],
webpack: {
entry: ['webpack.*.js'],
},
Expand Down
19 changes: 2 additions & 17 deletions support-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"devrun": "NODE_ENV=DEV npm-run-all clean webpack-dev-server",
"test": "NODE_ENV=test echo 'Running TS tests' && jest",
"test-watch": "NODE_ENV=test echo 'Running TS tests in watch mode' && jest --watch",
"knip": "knip --include files,exports,nsExports,types,nsTypes",
"knip": "knip --include files,exports,nsExports,types,nsTypes,dependencies",
"jest-update-snapshot": "echo 'Updating TS tests' && jest -u",
"paparazzi": "paparazzi && open ./paparazzi",
"prepare": "cd .. && husky install ./support-frontend/.husky",
Expand Down Expand Up @@ -121,45 +121,38 @@
"@babel/preset-env": "^7.22.7",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.26.0",
"@emotion/babel-plugin": "^11.11.0",
"@emotion/eslint-plugin": "^11.11.0",
"@guardian/browserslist-config": "^6.1.1",
"@guardian/eslint-config": "8.0.1",
"@guardian/eslint-config-typescript": "10.0.1",
"@guardian/paparazzi": "^0.3.1",
"@guardian/prettier": "^2.1.5",
"@storybook/addon-a11y": "^8.4.2",
"@storybook/addon-actions": "^8.4.2",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-interactions": "^8.4.2",
"@storybook/addon-links": "^8.4.2",
"@storybook/addon-storysource": "^8.4.2",
"@storybook/addon-viewport": "^8.4.2",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/preact": "^8.4.2",
"@storybook/preact-webpack5": "^8.4.2",
"@storybook/test": "^8.4.2",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^15.0.2",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.14",
"@types/jsdom": "^21.1.6",
"@types/lodash.debounce": "^4.0.9",
"@types/node": "^22.10.1",
"@types/react-dom": "^17.0.11",
"@types/react-router-dom": "^5.3.3",
"autoprefixer": "^10.4.16",
"babel-eslint": "^10.1.0",
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.3",
"babel-plugin-add-react-displayname": "^0.0.5",
"babel-plugin-dynamic-import-node": "^2.3.3",
"chromatic": "^10.9.6",
"concurrently": "^9.1.0",
"core-js": "^3.33.3",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.2.2",
"cssnano": "^6.0.1",
"dayjs": "^1.11.11",
"eslint": "^8.51.0",
"eslint-import-resolver-typescript": "^3.6.1",
Expand All @@ -169,7 +162,6 @@
"eslint-plugin-storybook": "^0.11.0",
"fast-sass-loader": "^2.0.1",
"file-loader": "^6.2.0",
"glob": "^10.3.12",
"husky": "^7.0.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Expand All @@ -183,10 +175,7 @@
"postcss-loader": "^8.1.1",
"postcss-pxtorem": "^6.1.0",
"preact": "^10.23.2",
"preact-render-to-string": "^6.5.10",
"prettier": "^2.8.8",
"prettier-eslint": "^16.3.0",
"pretty-format": "^29.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^6.0.1",
Expand All @@ -195,17 +184,13 @@
"search-in-file": "^3.5.2",
"storybook": "^8.4.5",
"ts-loader": "9.4.4",
"tsc-files": "^1.1.4",
"typescript": "5.1.6",
"web-vitals": "^2.0.0",
"webpack": "^5.94.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2",
"webpack-manifest-plugin": "^5.0.0",
"webpack-merge": "^5.9.0",
"webpack-stats-plugin": "^1.1.3",
"yargs": "^17.7.2"
"webpack-merge": "^5.9.0"
},
"lint-staged": {
"./assets/**/**/*.{js,jsx,ts,tsx}": "eslint"
Expand Down
Loading

0 comments on commit d0ecfea

Please sign in to comment.