Conversation
| "build-dotcom-types": "tsc --project tsconfig.types.json", | ||
| "publish-dry-run": "pnpm publish --dry-run", | ||
| "publish": "pnpm publish", | ||
| "lint": "eslint 'src/**/*.{ts,tsx}'", |
There was a problem hiding this comment.
no need to specify the path here
| }, | ||
| "files": ["src/server/server.ts"], | ||
| "include": [], | ||
| "include": ["src"], |
There was a problem hiding this comment.
this fixes the "not found" errors, e.g.
Parsing error: /Users/tom_forbes/code/support-dotcom-components/src/shared/types/targeting/shared.ts was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject
| ...guardian.configs.recommended, | ||
| ...guardian.configs.jest, | ||
| { | ||
| ignores: ['eslint.config.mjs'], |
There was a problem hiding this comment.
it fails to parse this file because we have sourceType: 'commonjs'
| ...guardian.configs.jest, | ||
| { | ||
| ignores: ['eslint.config.mjs'], | ||
| languageOptions: { |
There was a problem hiding this comment.
this section heavily inspired by https://github.com/guardian/commercial/blob/main/eslint.config.mjs#L16
| // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs | ||
| // e.g. "@typescript-eslint/explicit-function-return-type": "off", | ||
| curly: 2, | ||
| '@typescript-eslint/no-inferrable-types': [ |
There was a problem hiding this comment.
this was causing an error, but I think it's no longer needed anyway
| ignoreRestSiblings: true, | ||
| }, | ||
| ], | ||
| // '@typescript-eslint/no-unused-vars': [ |
There was a problem hiding this comment.
we've temporarily added a more general "off" for this rule below
| @@ -1,4 +1,3 @@ | |||
| export { getEpicViewLog, logEpicView } from '../shared/lib/viewLog'; | |||
There was a problem hiding this comment.
we export all of shared/lib/viewLog further down
sookburt
left a comment
There was a problem hiding this comment.
Thanks Tom, I had realised that it must have something to do with the tsconfig but I need to improve my understanding around the configuration files. 🎉
fixes some issues with our eslint upgrade, see comments