clasp icon indicating copy to clipboard operation
clasp copied to clipboard

Pushing TS files changes indentation and removes empty lines. Could this be configured?

Open kjaku opened this issue 4 years ago • 1 comments

Expected Behavior

Code style should look as is was locally in VSCode or it should be configurable.

Actual Behavior

After clasp push in editor there is // Compiled using ts2gas 3.6.5 (TypeScript 4.3.4) and all code is formatted into 4 spaces (or 2 tabs) indentation and all empty lines are removed.

Steps to Reproduce the Problem

  1. Rename Code.gs to Code.ts
  2. clasp push
  3. Check effect in online editor

tsconfig.json:

{
    "compilerOptions": {
        "experimentalDecorators": true,
        "target": "ES2019"
    }
}

.prettierrc:

{ 
  "singleQuote": false,
  "trailingComma": "es5",
  "tabWidth": 2,
  "useTabs": false,
  "endOfLine": "auto",
  "printWidth": 100
}

Specifications

  • Node version (node -v): 14.17.1
  • Version (clasp -v): 2.3.2
  • OS (Mac/Linux/Windows): Mac

kjaku avatar Oct 21 '21 04:10 kjaku

I noticed this too. I haven't found a workaround other than to ignore it, but it's a little frustrating. Would be cool to at least learn of a more compatible way to configure.

calebmisclevitz avatar Feb 23 '22 06:02 calebmisclevitz