browsertrix/frontend/package.json
Emma Segal-Grossman b15c5ccddd
ESLint & Typescript fixes (#1407)
Closes #1405

- Properly uses `typescript-eslint`: we were missing the preset from it,
so some of the default `eslint` rules (that don't properly work with
typescript) were being applied and causing false positives
- I also moved the `eslint` config into its own file, and enabled
`typescript-eslint`'s type-awareness, so that we can enable more
type-aware rules in the future if we like
- Adds `ts-lit-plugin` to the typescript config, which _hopefully_ will
allow us to catch issues during build (in CI)
- It looks like `ts-lit-plugin` is sort of abandonware at the moment,
and unfortunately _doesn't_ actually work for this purpose right now,
but the lit team is working on a replacement here:
https://www.npmjs.com/package/@lit-labs/analyzer
- Adds `fork-ts-checker-webpack-plugin`, which allows the typescript
checking process to be run on a separate forked thread in Webpack, which
can help speed up builds & checking
- Enables incremental type checking for better speed
- Fixes a whole bunch of `eslint`-auto-fixable issues (unused imports
and variables, some type issues, etc)
- Fixes a bunch of `lit-analyzer` issues (mostly attribute naming, some
type issues as well)
- Fixes various other type issues:
- Improves type safety in a bunch of places, notably anywhere `apiFetch`
and `APIPaginatedList` are used
  - Removes some `any`s
2023-11-24 12:32:53 -05:00

121 lines
3.6 KiB
JSON

{
"name": "browsertrix-frontend",
"version": "1.8.1",
"main": "index.ts",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@cheap-glitch/mi-cron": "^1.0.1",
"@lit/localize": "^0.11.4",
"@novnc/novnc": "^1.4.0-beta",
"@rollup/plugin-commonjs": "^18.0.0",
"@shoelace-style/shoelace": "^2.5.2",
"@types/color": "^3.0.2",
"@types/lodash": "^4.14.178",
"@types/sinon": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@wysimark/standalone": "2.2.15",
"@xstate/fsm": "^1.6.2",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4",
"@zxcvbn-ts/language-en": "^3.0.2",
"autoprefixer": "^10.4.2",
"axios": "^0.22.0",
"broadcastchannel-polyfill": "^1.0.1",
"color": "^4.0.1",
"copy-webpack-plugin": "^9.1.0",
"css-loader": "^6.3.0",
"del-cli": "^4.0.1",
"dotenv": "^10.0.0",
"dotenv-webpack": "^7.0.3",
"eslint": "^8.54.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-lit": "^1.10.1",
"eslint-plugin-wc": "^1.3.2",
"eslint-webpack-plugin": "^3.1.1",
"fuse.js": "^6.5.3",
"glob": "^8.1.0",
"highlight.js": "^11.8.0",
"html-loader": "^3.0.1",
"html-webpack-plugin": "^5.5.0",
"immutable": "^4.1.0",
"iso-639-1": "^2.1.15",
"lit": "2.7.5",
"lit-shared-state": "^0.2.1",
"lodash": "^4.17.21",
"micromark": "^3.1.0",
"node-fetch": "^3.1.0",
"postcss": "^8.4.5",
"postcss-loader": "^6.1.1",
"prettier": "^2.4.1",
"pretty-ms": "^7.0.1",
"query-string": "^8.1.0",
"regex-colorize": "^0.0.3",
"slugify": "^1.6.6",
"style-loader": "^3.3.0",
"tailwindcss": "^3.2.7",
"ts-loader": "^9.2.6",
"typescript": "^4.5.2",
"update-dotenv": "^1.1.1",
"url-pattern": "^1.0.3",
"webpack": "^5.88.0",
"webpack-cli": "^4.8.0",
"webpack-merge": "^5.8.0",
"yaml": "^2.0.0-11"
},
"scripts": {
"prepare": "cd .. && husky install frontend/.husky",
"postinstall": "del-cli ./node_modules/.cache/webpack",
"test": "web-test-runner \"src/**/*.test.{ts,js}\" --playwright --browsers chromium",
"prebuild": "del-cli ./dist",
"build": "webpack --config webpack.prod.js",
"build-dev": "webpack --mode development",
"start": "webpack serve --mode=development --config webpack.dev.js",
"serve": "node scripts/serve.js",
"lint": "eslint --fix \"src/**/*.{ts,js}\"",
"lint:lit-analyzer": "lit-analyzer",
"format": "prettier --write \"src/**/*.{ts,js,html,css,json}\"",
"localize:prepare": "yarn localize:extract && yarn localize:build",
"localize:extract": "lit-localize extract",
"localize:build": "lit-localize build"
},
"devDependencies": {
"@lit/localize-tools": "^0.6.9",
"@web/dev-server-esbuild": "^0.3.3",
"@web/dev-server-import-maps": "^0.0.6",
"@web/dev-server-rollup": "^0.3.21",
"fork-ts-checker-webpack-plugin": "^6.2.6",
"husky": "^8.0.3",
"lint-staged": "^13.1.0",
"sinon": "^12.0.1",
"ts-lit-plugin": "^2.0.1",
"webpack-dev-server": "^4.15.0"
},
"optionalDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
"@open-wc/testing": "^3.2.0",
"@playwright/test": "1.32.1",
"@web/test-runner": "^0.13.22",
"@web/test-runner-playwright": "^0.8.8",
"chromium": "^3.0.3"
},
"lint-staged": {
"*.{ts,js}": [
"prettier --write",
"eslint --fix --quiet"
],
"*.{html,css,json}": "prettier --write"
},
"husky": {
"hooks": {
"pre-commit": ".husky/pre-commit"
}
},
"engines": {
"node": ">=16"
},
"resolutions": {
"**/playwright": "1.32.1"
}
}