-
Notifications
You must be signed in to change notification settings - Fork 132
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
implemented a rule to forbid the export of symbols #1729
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,6 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A scary experiment, but we have #1045 and have to start somewhere...
@@ -0,0 +1,3 @@ | |||
const exampleSymbol = Symbol("example"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary reason I postponed doing this is that I remember there was an official template for eslint rule definitions, and I couldn't find it.
It required positive tests, negative tests and documentation, and also rules were implemented in TypeScript.
It's nice to have this error message in CI, but
a) we'll have to remove it
b) I also wonder whether it works with export const
, and can't easily see it in tests
Finding/making the rule template is considerably more important :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- updated to match the template
- added tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a bunch of JS files to me, which we cannot accept into this repo, sorry
Issue
I'm writing a description. I created an MR to show the error.
<!-
Чтобы понять почему получилось такое решение, давайте я опишу проблемы, которые мне не дали сделать через
TypeScript
eslint
и старый способ конфигурации, из-за этого нельзя подключать плагины как модулиJavaScript
. Из-за этого нужно соблюдать правила именования пакетов.workspaces
, но есть проблема. В проекте используетсяyarn
1 версии, и чтобы их начать использовать надо сделать проект приватным, но это не даст публиковать данный проект в npm репозиторий. Такжеyarn
данный версии не даст подключить проект изworkspaces
в главный проект через синтаксworkspace:^
workspaces
, то можно пользоваться только подключением черезfile:/path/to/folder
. Но это не симлинка, а копирование файлов из папки вnode_modules
во время установки пакетовTypeScript
-->
Closes #1695.
Checklist