Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include recommended ts-eslint rules for gts #2107

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

patricklx
Copy link
Contributor

@patricklx patricklx commented Mar 11, 2024

typescript recommended rules turn off eslint rules that do not work for ts/gts

but they only to that for known extensions, therefore we need to reapply them in our recommended config
see issue typescript-eslint/typescript-eslint#8607

fixes #2106

…or ts/gts

but they only to that for known extensions, therefore we need to reapply them in our
recommended config
see issue typescript-eslint/typescript-eslint#8607
@patricklx
Copy link
Contributor Author

i changed it to just copy the rules instead

@@ -1,4 +1,29 @@
const base = require('./base');
const gtsRules = require('../recommended-rules-gts');

module.exports = [...base, { rules: gtsRules }];
// see https://github.com/typescript-eslint/typescript-eslint/issues/8607
// https://github.com/typescript-eslint/typescript-eslint/blob/v7.4.0/packages/eslint-plugin/src/configs/eslint-recommended-raw.ts
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't we use this config? because we can't force v7?
and we don't want a peer requirement? (I think that's what we ended up deciding on elsewhere, yeah?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That cannot be used directly. It's a utility function. Eslint needs an object as default export

@NullVoxPopuli NullVoxPopuli merged commit f5a5c01 into ember-cli:master Apr 2, 2024
8 checks passed
@patricklx patricklx deleted the add-ts-recommended-to-gts branch April 2, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@typescript-eslint/eslint-recommended not applicable to *.gts files
3 participants