allegro / typescript-strict-plugin

Typescript plugin that allows turning on strict mode in specific files or directories.
MIT License
335 stars 29 forks source link

`update-strict-comments` not working. #24

Closed marcomoonpay closed 2 years ago

marcomoonpay commented 2 years ago

I'm running V2. I've followed the README guide for installation. I've run the command update-strict-comments. Here's the output:

🎯 Found 2131 strict files
🔧 Updated comments in 0 files

However my files are not strict at all!

Here's my tsconfig.json

  "compilerOptions": {
    "inlineSourceMap": true,
    "inlineSources": true,
    "noImplicitAny": false,
    "noUnusedLocals": true,
    "pretty": true,
    "lib": ["ES2020", "dom"],
    "module": "CommonJS",
    "moduleResolution": "node",
    "target": "ES2018",
    "declaration": true,
    "skipLibCheck": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "incremental": true,
    "esModuleInterop": true,
    "strict": false,
    "plugins": [
      {
        "name": "typescript-strict-plugin",
        "paths": ["./src"]
      }
    ]
  }
marcomoonpay commented 2 years ago

Hi! I have an update on this issue. If I remove "pretty": true

From the above tsconfig.json file, it works! This is weird, considering that the default value of this flag is true anyway.

https://www.typescriptlang.org/tsconfig#pretty

However it might be that typescript lang docs are old? If I put it to false explicitly it works.

KostkaBrukowa commented 2 years ago

Hmmm... that's weird. Honestly I think it's a bug in our plugin and I wouldn't put that flag inside the readme but I would just fix the issue itself. I'm marking it as a bug and we'll try to fix this. Thanks for reporting this!

marcomoonpay commented 2 years ago

No problem! For now we will start the integration in our codebase with pretty: false 👍