Skip to content

Commit

Permalink
Add lint checks to scan for un-imported files and unused packages (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Feb 4, 2025
1 parent fdf44a4 commit 879c583
Show file tree
Hide file tree
Showing 4 changed files with 1,285 additions and 57 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ jobs:

- name: Run lint
run: npm run lint -- --quiet

- name: Run unimported
run: npm run unimported
54 changes: 54 additions & 0 deletions .unimportedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"ignorePatterns": [
"node_modules/**",
"**/*.d.ts"
],
"ignoreUnimported": [
"src/Locale/update_locale.js",
"src/PluginRegistry.ts",
"src/pluginTypes.ts",
"src/service-worker.ts"
],
"ignoreUnused": [
"@fontsource/figtree",
"@originjs/vite-plugin-federation",
"@vitejs/plugin-react",
"browserslist-useragent-regexp",
"cross-env",
"postcss-loader"
],
"ignoreUnresolved": [
[
"./pluginMap",
[
"src/pluginTypes.ts"
]
],
[
"@/supportedBrowsers",
[
"src/components/ErrorPages/BrowserWarning.tsx"
]
],
[
"tsx/cjs",
[
"node_modules/find-cypress-specs/src/index.js"
]
],
[
"virtual:pwa-register",
[
"src/index.tsx"
]
]
],
"respectGitignore": true,
"entry": [
"src/index.tsx",
"vite.config.mts",
"tailwind.config.js",
"cypress.config.ts",
"scripts/**"
]
}
Loading

0 comments on commit 879c583

Please sign in to comment.