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

Loop on TypeScript configuration override #50

Closed
arcticicestudio opened this issue Apr 8, 2021 · 0 comments · Fixed by #53
Closed

Loop on TypeScript configuration override #50

arcticicestudio opened this issue Apr 8, 2021 · 0 comments · Fixed by #53

Comments

@arcticicestudio
Copy link
Contributor

In #32 the @arcticicestudio/eslint-config-typescript package migrated to the latest plugin versions and added the override field to its index to simplify the usage for consumers by removing the need to explicitly define it per project. Unfortunately this results in a crash loop when doing so and also blocks users from overriding single rules based on the project needs.

To fix this problem, the override field will be removed again, leaving it up to the user to define and customize the ESLint configuration for TypeScript to fit the project needs.

@arcticicestudio arcticicestudio added this to the Next milestone Apr 8, 2021
arcticicestudio added a commit that referenced this issue Apr 8, 2021
In GH-32 [1] the `@arcticicestudio/eslint-config-typescript` package
migrated to the latest plugin versions and added the `override`
field [1] to its index to simplify the usage for consumers by removing
the need to explicitly define it per project. Unfortunately this
resulted in a crash loop when doing so and also blocks users from
overriding single rules based on the project needs.

To fix this problem, the `override` field has been removed again,
leaving it up to the user to define and customize the ESLint
configuration for TypeScript to fit the project needs.

[1]: #32
[2]: https://github.com/arcticicestudio/styleguide-javascript/blob/ab59f71f/packages/%40arcticicestudio/eslint-config-typescript/index.js#L31-L36

Co-authored-by: Sven Greb <development@svengreb.de>

GH-50
arcticicestudio added a commit that referenced this issue Apr 8, 2021
TypeScript uses triple-slash directives [1] (single-line comments
containing a single XML tag) to define compiler directives.
The `@arcticicestudio/eslint-config-base` configures the ESLint core
rule `spaced-comment` [2] and already defines exceptions and comment
markers for special use cases, but did not support triple-slash
directives. When running `eslint --fix` these comments in `*.d.ts` files
got malformed (`///` → `// /`) which resulted in invalid TypeScript
syntax.

To support triple-slash directives, the `/` marker has been added to the
`line` field.

[1]: https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html
[2]: https://eslint.org/docs/rules/spaced-comment

Co-authored-by: Sven Greb <development@svengreb.de>

GH-50
arcticicestudio added a commit that referenced this issue Apr 8, 2021
In GH-32 [1] the `@arcticicestudio/eslint-config-typescript` package
migrated to the latest plugin versions and added the `override`
field [1] to its index to simplify the usage for consumers by removing
the need to explicitly define it per project. Unfortunately this
resulted in a crash loop when doing so and also blocks users from
overriding single rules based on the project needs.

To fix this problem, the `override` field has been removed again,
leaving it up to the user to define and customize the ESLint
configuration for TypeScript to fit the project needs.

[1]: #32
[2]: https://github.com/arcticicestudio/styleguide-javascript/blob/ab59f71f/packages/%40arcticicestudio/eslint-config-typescript/index.js#L31-L36

Co-authored-by: Sven Greb <development@svengreb.de>

Closes GH-50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants