Skip to content

eslint fixes#1317

Merged
sookburt merged 6 commits intoskb/bump-libs-for-comp-typefrom
tf-lint-fixes
Mar 28, 2025
Merged

eslint fixes#1317
sookburt merged 6 commits intoskb/bump-libs-for-comp-typefrom
tf-lint-fixes

Conversation

@tomrf1
Copy link
Member

@tomrf1 tomrf1 commented Mar 28, 2025

fixes some issues with our eslint upgrade, see comments

"build-dotcom-types": "tsc --project tsconfig.types.json",
"publish-dry-run": "pnpm publish --dry-run",
"publish": "pnpm publish",
"lint": "eslint 'src/**/*.{ts,tsx}'",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to specify the path here

},
"files": ["src/server/server.ts"],
"include": [],
"include": ["src"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it fails to parse this file because we have sourceType: 'commonjs'

...guardian.configs.jest,
{
ignores: ['eslint.config.mjs'],
languageOptions: {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// 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': [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing an error, but I think it's no longer needed anyway

ignoreRestSiblings: true,
},
],
// '@typescript-eslint/no-unused-vars': [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've temporarily added a more general "off" for this rule below

@@ -1,4 +1,3 @@
export { getEpicViewLog, logEpicView } from '../shared/lib/viewLog';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we export all of shared/lib/viewLog further down

@tomrf1 tomrf1 changed the title Tf lint fixes eslint fixes Mar 28, 2025
@tomrf1 tomrf1 marked this pull request as ready for review March 28, 2025 09:22
@tomrf1 tomrf1 requested a review from a team as a code owner March 28, 2025 09:22
Copy link
Contributor

@sookburt sookburt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. 🎉

@sookburt sookburt merged commit 58c0aa2 into skb/bump-libs-for-comp-type Mar 28, 2025
2 checks passed
@sookburt sookburt deleted the tf-lint-fixes branch March 28, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants