GithubHelp home page GithubHelp logo

language-javascript-jsx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

language-javascript-jsx's Issues

JSX package doesn't work

Hi, i just installed language-favascript-jsx 0.3.7 on my latest verison of Atom, but it seems like there is no differences in highlighting.
screen shot 2018-04-15 at 8 41 12 am

thank you.

Option to disable special treatment of environment-specific class tokens

Stuff like event and document highlight as though they're special. When developing something for which these types are undefined or irrelevant (such as server-side node.js), it's annoying having these words commandeered with the assumption that we're in a browser-targeted environment.

Example:

image

Any chance of an option to stop environment-specific tokens from being given special treatment?

2 lines collapse into 1 with "cursor" prop

I noticed a line collapsing on top of another line. The behavior can be seen here:

cursor

The behavior went away when I disabled this package. I also strangely only see it when the prop is called cursor.

Not quite sure what is going on. I'll try digging in a bit when I have some time.

Most elements have the same class names

What's the purpose of having .syntax--variable.syntax--other.syntax--readwrite on most elements?

Also, I see a lot of syntax--entity.syntax--other.syntax--attribute-name as well as .syntax--meta.syntax--scope.syntax--inner, while some elements have .syntax--js, others have .syntax--es, and other others have .syntax--jsx.

Almost every element is styled to the same color, or doesn't make sense semantically (i.e. string quotations are colored different than the string contents themselves)

This package will disable autocomplete-modules

To reproduce the problem.

  1. Install autocomplete-modules

Enjoy autocomplete for require/import statements....

  1. Install this package, and restart atom.

autocomplete-modules won't work anymore.

hidden attribute disappears.

Hi,

I found a small bug on the latest version of the package. Whenever you write the hidden attribute on any component, with a value other than a string, i.e. hidden={value}, it automatically hides the attribute on the editor.

<Component hidden={true} />

becomes:

<Component />

It really doesn't matter the value of the hidden attribute, as long as the attribute is 'hidden'.

Atom locks up on certain key sequence

When writing a new react component method in ES6 class syntax, I came across this nasty bug.

Here is some context:

export default class BlahBlah extends Component {
  method() {
    return ()
  }
}

With the above code, all is fine.

The bug fires when I type <, then a d inside the parenthesis after the return. (Creating a DIV tag)

The atom editor completely locks up and I am forced to close the application...

Any ideas?

Curly brackets within string tags formatted as non-strings

Within a component, writing a property which contains curly braces inside a string produces formatting that does not suggest that the string will come out like it does.

image

The code <input id='CardNumber' pattern='[0-9]{13,16}' /> is valid syntax and is compiled naturally by Babel. As such, I think the formatting should reflect this.

Multi-line element opening tags not working

Splitting large opening tags such as this doesn't work:

  title={"Edit "+this.props.friend.fname+" "+this.props.friend.lname+"'s Account"}
  modal={false}
  open={this.state.editOpen}
  onRequestClose={this.editClose} >

It's not recognising it as a complete opening tag.

Package is messing with PHP formatting

I initially assumed this bug to be related to the PHP formatter built into Atom, but after some trial and error I tracked it down to this package instead.

See original issue I posted here.

This is one code example that triggers the issue (extracted from a .php file):

// Set address name if it wasn't entered
if (!$location->getAddressOne() && $location->getAddressTwo())
{
    $location->setAddressOne($location->getAddressTwo() ? ' ' . $location->getAddressTwo() : '');
}

$hasAddress = $location->getAddressOne() ? true : false;

Changing the first line of the code to remove the apostrophe corrects the problem:

// Set address name if it wasnt entered
if (!$location->getAddressOne() && $location->getAddressTwo())
{
    $location->setAddressOne($location->getAddressTwo() ? ' ' . $location->getAddressTwo() : '');
}

$hasAddress = $location->getAddressOne() ? true : false;

Autoformat

Any chance on implementing autoformat. Or creating another package for does autoformat for this language-javascript-jsx.

JSX

undetected close tag />

Remove name in Langauage status bar

I know this is pretty nitpicky, and people like credit, but seeing "Javascript by SubtleGradient" in my status bar is super annoying. Is it possible to change that to something more subtle like "Javascript+"? It also takes up a ton of space.

c77b5cc6-1c0f-11e5-9b91-857ae7b2123a

Some suggestions: Since you're covering all the bases (React, ES6/7, etc) how about JavaScriptNext? Or JavaScriptHarmony? Understandably both those terms seem a bit dated, but they do seem appropriate.

Source Upstream JavaScript to support features faster?

I find it hard to work with JSX in Atom Editor with this plugin since it skips a lot of ES6 features and also doesn't include the tons of JavaScript features upstream has, it would be nice if the gammers here all sourced upstream: "source.js" like so:

"patterns": [
  {
    "include": "source.js"
  }
]

Breaks language-todo Highlighting Support

Files of the type "Javascript with JSX" (and possibly others in the package) conflict with the native language-todo package's ability to highlight markers in comments like TODO, FIXME, etc. Not a huge issue but it makes them easier to spot in comments when they highlight properly.

How to turn off linter messages?

I turned off all my linters but there are still linter messages. Then I found it's from this package, how can I turn linting off? I cannot find an option in settings.

screen shot 2015-08-03 at 11 23 06 am

Problem when use static attributes

When i use static attributes the highlight broken

static propTypes = {
    children: PropTypes.node.isRequired,
    type: PropTypes.string
  }

without static
image

with:
image

static objects that invoke a function

So, I'm definitely only seeing this when I invoke a function, but it negates everything after that:

image

Not a big deal, but definitely looks worse when there are a lot of keys and this is early on.

How do I turn off certain keywords (`get` causes bad formatting)

Hi,

Sometimes we make use of lodash/get in our codebase. This causes the code following it to not be properly formatted:

screen recording 2017-05-08 at 04 01 pm

Likely due to this line, it looks like certain keywords trigger this kind of highlighting, which is undesirable. How do I either:

  • A) turn it off for the keyword get
  • B) turn it off completely for all cases (because frankly I don't like how it handles text after the static keyword is used)
  • C) is there a better/different syntax highlighter I can use instead of this one?

Syntax highlight on jsx attributes

First of all, thank you for this package, I haven't found any other package that adds syntax highlighting for jsx AND es6, so thanks..

There is probably only one thing that im missing currently and that is highlighting on attributes on jsx elements.

Currently it looks like this and it gets a little messy after a while.
screen shot 2014-11-29 at 11 19 38

JSX detected as JS

A file that contains JSX and has a .js extension is highlighted as normal Javascript (not with JSX). This has only started happening recently, and was working fine on these types of files until a few days ago.

Maybe something changed within my editor to cause this, but it seems like it is related to how file type/syntax is detected with language-javascript-jsx.

"let" keyword color scheme

The keyword "let" isn't considered as a keyword such as var, so the color scheme isn't the same as for "var"
capture

Highlighting issues

I am having strange highlighting issues with v0.3.7.

Most of the test appears read. Basically its the same happening with this package what happend once to the language-javascript package.

atom/language-javascript#258

Any tips how to fix this red syntax issue?

Treat 'let' as keyword

Currently the let keyword doesn't get tagged as a keyword and gets lost in the mix. Is this something you are able to fix? Thanks!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.