Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Point ESLint at all
tsconfig.json
s (#636)
Otherwise it can't lint everything. This is solved with the [`projectService` option][1] in [`@typescript-eslint/parser` v8][2]. However, we're stuck firmly on v5 for now. [1]: https://github.com/typescript-eslint/typescript-eslint/pull/8031/files?short_path=f55b3fe#diff-f55b3fe275ea73e5e0cbfaf72c238d8fa863819992fe17e23668d1f0376a18b4 [2]: typescript-eslint/typescript-eslint@b9796c1 ### Before ```sh $ pnpm exec eslint packages/react/src/Uploader.tsx /Users/peeja/clients/storacha/w3ui/packages/react/src/Uploader.tsx 0:0 error Parsing error: ESLint was configured to run on `<tsconfigRootDir>/packages/react/src/Uploader.tsx` using `parserOptions.project`: /users/peeja/clients/storacha/w3ui/tsconfig.json However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file ✖ 1 problem (1 error, 0 warnings) ``` ### After ```sh pnpm exec eslint packages/react/src/Uploader.tsx /Users/peeja/clients/storacha/w3ui/packages/react/src/Uploader.tsx 188:23 warning Do not nest ternary expressions no-nested-ternary 190:16 warning Do not nest ternary expressions no-nested-ternary 230:9 warning React Hook useMemo has missing dependencies: 'files', 'storedDAGShards', 'uploadAsCAR', 'uploadProgress', and 'wrapInDirectory'. Either include them or remove the dependency array react-hooks/exhaustive-deps 294:5 warning React Hook useCallback has a missing dependency: 'setWrapInDirectory'. Either include it or remove the dependency array react-hooks/exhaustive-deps ✖ 4 problems (0 errors, 4 warnings) ``` (Which, y'know, still not ideal, but at least it's _running_.)
- Loading branch information