Developers write readable code that conforms to a style.
Developers write code that is poorly formatted.
clasp? (Do we need .rc files to specify style?) NoAdding my two cents to the discussion.
I'm using prettier personally with some of my AppsScripts projects and it works really great, especially for some things that appsscript considers errors such as semicolons. I make a npm package, and have the clasp-specific stuff all under a src directory. Prettier is configured through my package.json file.
I think it'd be frustrating, though, if using clasp meant I had to adopt a specific style. I could see myself disagreeing with the defaults that are picked--i.e. single vs double quotes, line-length, spaces around brackets.
If the behavior was able to be overridden, or if it only did the steps necessary for a sucessful push (adding semicolons, changing arrow functions to normal function definitions, changing const/let to var) I would really like this feature.
I agree. I don't think clasp should pick a style at all, there's lots of tools to do that. Apps Script is different than Go.
I removed: _"Should we enforce a certain style like Go?"_
But I think we should tell people how to use some of the existing tools.
Formatting should be done in clasp.
Most helpful comment
Adding my two cents to the discussion.
I'm using prettier personally with some of my AppsScripts projects and it works really great, especially for some things that appsscript considers errors such as semicolons. I make a npm package, and have the clasp-specific stuff all under a
srcdirectory. Prettier is configured through mypackage.jsonfile.I think it'd be frustrating, though, if using clasp meant I had to adopt a specific style. I could see myself disagreeing with the defaults that are picked--i.e. single vs double quotes, line-length, spaces around brackets.
If the behavior was able to be overridden, or if it only did the steps necessary for a sucessful push (adding semicolons, changing arrow functions to normal function definitions, changing const/let to var) I would really like this feature.