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

Ability to configure lint rules? #250

Closed
shadymoses opened this issue Aug 23, 2017 · 1 comment
Closed

Ability to configure lint rules? #250

shadymoses opened this issue Aug 23, 2017 · 1 comment

Comments

@shadymoses
Copy link

I don't use semicolons in javascript and I don't want to encourage their use in the app I'm building. I saw an open issue with ace itself where some solutions were mentioned, but I can't get either to work with react-ace.

I didn't see any options listed that would make sense for changing lint rules. Is there a way to do that via setOptions?

@shadymoses
Copy link
Author

shadymoses commented Aug 23, 2017

Ah, I was able to turn off the semi-colon rule as follows:

<AceEditor
  mode="javascript"
  theme="monokai"
  onLoad={ editor => {
    editor.session.$worker.send('changeOptions', [{ asi: true }])
  }}
/>

I'll close this since being able to edit linter rules is more of an ace issue than react-ace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant