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

Chore: restructure files #11555

Merged
merged 4 commits into from May 22, 2019
Merged

Chore: restructure files #11555

merged 4 commits into from May 22, 2019

Conversation

mysticatea
Copy link
Member

@mysticatea mysticatea commented Mar 26, 2019

What is the purpose of this pull request? (put an "X" next to item)

[X] Other, please explain: moving files.

What changes did you make? (Give an overview)

This PR moves files to the new directory structure. The purpose of this PR is to make clear what functionality use which files. Especially, I wanted to reduce the many util files.

The new structure is:

  • lib/init ... The files are to implement --init functionality.
  • lib/cli-engine ... The files are to implement CLIEngine public API.
  • lib/linter ... The files are to implement Linter public API.
  • lib/source-code ... The files are to implement SourceCode public API.
  • lib/rule-tester ... The files are to implement RuleTester public API.
  • lib/rules ... The files are to implement core rules.
  • lib/shared ... The files are shared with multiple functionality.

dependency graph

Is there anything you'd like reviewers to focus on?

Is this move nice?

@mysticatea mysticatea added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion do not merge This pull request should not be merged yet chore This change is not user-facing labels Mar 26, 2019
@mysticatea mysticatea removed the do not merge This pull request should not be merged yet label May 10, 2019
@mysticatea
Copy link
Member Author

mysticatea commented May 10, 2019

Hi. I rebased this PR.

I'd like to discuss the direction.
This PR restructures files based on public API. The primary purpose is to reduce util files which are hard to track who is using it and to make our codebase more understandable.

  • Can we go for the restructure files?
  • Are there other ideas about the file structure?

# Conflicts:
#	Makefile.js
#	conf/eslint-recommended.js
#	lib/built-in-rules-index.js
#	tools/eslint-fuzzer.js
@mysticatea
Copy link
Member Author

What this PR does:

  • Moves many files.
  • Fixes require() paths for the move.
  • Updates architecture.md to explain the new directories.
  • Updates .eslintrc.js to prevent files to import the internal files of other directories. (Each directory except lib/shared exposes stuff that it intends other directories to use, with index.js.)

Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

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

good move! LGTM, but a few non-blocking questions. Thanks!

.eslintrc.js Show resolved Hide resolved
lib/linter/index.js Show resolved Hide resolved
# Conflicts:
#	tools/eslint-fuzzer.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants