How sublimelinter/sublimelinter-eslint works
Main Components
• Sublime Text Environment – This is the client user interface where developers open their files.
• SublimeLinter Core – A plugin installed in Sublime Text that calls linter plugins.
• SublimeLinter-eslint Plugin (linter.py) – The heart of this project, written in Python, that bridges SublimeLinter with ESLint.
• ESLint (or eslint_d) – The external linting tool (run via Node.js) that performs static analysis on JavaScript (and other supported) files.
• Node.js Environment – The runtime environment needed to execute ESLint and its plug-ins.
• Configuration & Messaging Files – Including the README, messages directory (with versioned message texts and installation messages) and various config files (.flake8, mypy.ini, etc.), which help set project rules, style guidelines, and enable internationalization.
Depicting the Relationships and Interactions
• The Node.js Environment can be illustrated as a container or a module that runs ESLint. Label it accordingly.
• Optionally, display error handling or quick fix flows (e.g., the quick action mapping from SublimeLinter to ESLint fixes).
Architectural Patterns and Key Design Principles
• Clearly separate the concerns: the Sublime Text frontend (user interface) versus the linting engine (ESLint) with the plugin acting as the integration layer.
• That the plugin is “pluggable” and can automatically detect local ESLint plugins as per the README. This is crucial for showing dependency on runtime configuration (e.g., local versus global ESLint installations).
• That the system allows for fallbacks: for instance, if eslint_d is present, the plugin prefers that executable.