Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rudolfolah/emacs-flow-jsx
Emacs mode for handling JavaScript that uses Flow type annotations and has some React JSX syntax in it.
https://github.com/rudolfolah/emacs-flow-jsx
emacs emacs-lisp emacs-package flow jsx
Last synced: 3 days ago
JSON representation
Emacs mode for handling JavaScript that uses Flow type annotations and has some React JSX syntax in it.
- Host: GitHub
- URL: https://github.com/rudolfolah/emacs-flow-jsx
- Owner: rudolfolah
- License: gpl-3.0
- Created: 2021-09-02T14:39:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-16T02:33:28.000Z (over 1 year ago)
- Last Synced: 2024-11-09T04:07:57.973Z (about 2 months ago)
- Topics: emacs, emacs-lisp, emacs-package, flow, jsx
- Language: Emacs Lisp
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# emacs-flow-jsx
Emacs mode for handling JavaScript that uses Flow type annotations and
has some React JSX syntax in it.It is a *major* mode that is a replacement for js2-mode and js-mode.
# Installation and Setup
Load the emacs file:
(load-file "/path/to/emacs-flow-jsx/emacs-flow-jsx-mode.el")
Add a hook for javascript:
;; TODO
There are functions for checking whether a file uses the flow type annotations or the flow type checker and whether it uses the react JSX syntax.
## Testing
The provided tests for `emacs-flow-jsx-mode` are basic and only cover a small part of the mode's functionality.
To run the tests, follow the steps below:
### Running Tests within Emacs
1. Open Emacs.
2. Run the command `M-x ert`.
3. When prompted, enter `t` to run all tests.### Running Tests from the Command Line
1. Open a terminal.
2. Navigate to the package directory
3. Run the following command: `emacs -batch -l ert -l tests.el -f ert-run-tests-batch-and-exit`# License and Copyright
Licensed under the GNU GPL version 3 or later, see [LICENSE](./LICENSE)
Copyright (C) 2023 Rudolf Olah