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

LINT(INTEGRATION): Move rule-configs close to tests #35

Closed
2 tasks
Tracked by #34
azinit opened this issue Dec 11, 2021 · 2 comments · Fixed by #40
Closed
2 tasks
Tracked by #34

LINT(INTEGRATION): Move rule-configs close to tests #35

azinit opened this issue Dec 11, 2021 · 2 comments · Fixed by #40
Assignees
Labels
help wanted Extra attention is needed refactor
Milestone

Comments

@azinit
Copy link
Member

azinit commented Dec 11, 2021

Description

  • Group unit configs and tests
  • (If possible) Add base doc for each "rule-unit"
   // As variant
   // @see https://github.com/effector/eslint-plugin/tree/master/rules/no-getState
   📁 rules/
        📁 layers-slices/
              index.js          // config of boundaries
              fixtures.js       // test fixtures (if need)
              index.test.js     // unit test of boundaries
              index.md          // docs of boundaries (in future)
        📁 public-api/

Reference

https://github.com/effector/eslint-plugin/tree/master/rules/no-getState

@azinit azinit changed the title LINT(INTEGRATION): Move rule-configs close to tests// As variant// @see https://github.com/effector/eslint-plugin/tree/master/rules/no-getState📁 rules/ 📁 layers-slices-boundaries/ index.js // config of boundaries fixtures.js // test fixtures (if need) index.test.js // unit test of boundaries index.md // docs of boundaries (in future) 📁 public-api-boundaries/ LINT(INTEGRATION): Move rule-configs close to tests Dec 11, 2021
@azinit azinit added documentation Improvements or additions to documentation refactor help wanted Extra attention is needed and removed documentation Improvements or additions to documentation labels Dec 11, 2021
@Krakazybik Krakazybik self-assigned this Dec 11, 2021
@Krakazybik
Copy link
Member

Krakazybik commented Dec 11, 2021

@azinit будем разделять config / rules? или будем всё в одно складывать?

📁 src/
        📁 configs/
        📁 rules/
        📁 utils/

@azinit
Copy link
Member Author

azinit commented Dec 11, 2021

@Krakazybik

  1. Ну у них как раз все связанное с конкретным правилом - в rules/ и лежит)
  2. А если речь про то, что у них:
  • У них configs это набор пресетов для кастомизации (папочку создать можно, но заполнять ее будем скорее всего по
    Add customizing of config #6 - это конфиг над конфигами будет по идее)
    image
  • У них utils это общие утилиты, общие для нескольких правил (у нас такое тоже есть)
    image

Т.е. при возможности - было бы классно эти папочки дополнительные выделить. При этом тут главное по задаче - это хранить ресурсы конкретного правила вместе (тесты, фикстуры, конфиг, дока)

Вдохновился примером с FECrew так сказать))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants