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

Flow #7156

Open
trusktr opened this issue Dec 13, 2024 · 0 comments
Open

Flow #7156

trusktr opened this issue Dec 13, 2024 · 0 comments
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist

Comments

@trusktr
Copy link

trusktr commented Dec 13, 2024

Language name

Flow

URL of example repository

Flow's website code has some example .js files (bad file name extension, I know, but maybe with more support like in this feature request, they might be more inclined to add a unique extension) that use Flow syntax:

https://github.com/facebook/flow/blob/d41d9956a6de8a1ab5fce696d67f23158b1e87c9/website/src/js/parser-playground.js

Most popular extensions

IDE extensions? Here's the extension for VS Code:

https://marketplace.visualstudio.com/items?itemName=flowtype.flow-for-vscode

Detected language

Not sure. Here's sample of code:

class A {
    foo: {...} | null = {any: 'thing'}

    someMethod(options: ?{[string]: mixed}): A {
        return new A
    }
}

URL of syntax highlighting grammar

Here's one:

https://github.com/facebook/flow/blob/main/website/src/try-flow/flow-grammar.json

The Flow playground shows the AST for the previous example.

Here's the same example on AST Explorer, under "JavaScript" which admittedly is a little odd because it isn't JavaScript. I hope they can consider a new default file extension and migrate away from .js because the downsides are notable.

@trusktr trusktr added Add Language Good First Issue This is a great opportunity to start contributing to Linguist labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist
Projects
None yet
Development

No branches or pull requests

1 participant