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

Support TypeScript triple-slash directives #54

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

arcticicestudio
Copy link
Contributor

Resolves #51

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 <[email protected]>

GH-50
@arcticicestudio arcticicestudio merged commit aba4587 into main Apr 8, 2021
@arcticicestudio arcticicestudio deleted the improvement/gh-51-ts-triple-slash-directives branch April 8, 2021 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support TypeScript triple-slash directives
2 participants