You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
Home > Project Editor > Can I change the way that the project editor parses my code?
Can I change the way that the project editor parses my code?
print icon

You betcha!  

 

By default, the project editor uses ESLint to detect syntax errors; but you can customize this by adding an .eslintrc.json file to your project.

 

To help, we’ve created an example of a custom .eslintrc.json file within a Glitch project. You can use this .eslintrc.json file as a template to make your own.

 

Here’s how:

  1. In your project, create a new file and name it .eslintrc.json

  2. Next, go to https://glitch.com/edit/#!/eslint-config and copy the code in the example .eslintrc.json file there

  3. Now, paste this code into the new .eslintrc.json file that you created in your project

  4. Update the rules to your liking

  5. Type refresh in the project terminal and the project editor will lint your code based on your custom configuration! You’ll need to do this step any time you edit .eslintrc.json so that the editor’s linter will stay up to date with your configuration.

 

 


 

Got more questions? Check out our Community Forum!
Open 24/7, the forum is where Glitch makers help each other and show off all the rad apps that they have created. It's the friendliest community of coders on the Web!
Feedback
0 out of 0 found this helpful

scroll to top icon