Skip to content

How to remove the semicolon #27

Open

Description

@sschang

How to remove the semicolon ?

Activity

  1. afontcu commented on Aug 21, 2017

    @afontcu

    Hi,

    instead of removing semicolon I just set my VSC to autoFix linter issues on save:

    "eslint.autoFixOnSave": true,
     "eslint.validate": [
            {
                "language": "html",
                "autoFix": true
            },
            {
                "language": "vue",
                "autoFix": true
            },
            {
                "language": "javascript",
                "autoFix": true
            },
            {
                "language": "javascriptreact",
                "autoFix": true
            }
        ],

    this way, semicolons are left alone or removed depending on my project's eslint configuration.

    Hope it helps.

  2. xabikos commented on Sep 26, 2017

    @xabikos
    Owner

    @afontcu thanks for the nice suggestion. I consider this as a nice solution.

    As described in #16 I had to make a choice when created the snippets. At that point the majority of the people include the semicolons. Or at least this was my sense.

    Now I see that this changes. So I might remove all semicolons in a future release if more people ask for it.

  3. jmsv commented on Nov 21, 2018

    @jmsv

    I love this extension but found myself hitting End and Backspace after using any snippets since I use the StandardJS style which enforces not using semicolons - I have published a fork of this with semicolons removed ✨ GitHub || Extension

  4. antmdvs commented on Nov 21, 2018

    @antmdvs

    Hi All, you may want to upvote microsoft/vscode#63534

  5. wojjas commented on Dec 19, 2018

    @wojjas

    semi is the rule that governs semi colons be or not to be.
    Since you ask to remove then:

            "semi": [
                "error",
                "never"
            ]
    
  6. xabikos commented on Dec 24, 2018

    @xabikos
    Owner

    I even added a note on the readme about the fork extension that doesn't include the semicolon.

  7. franciscolourenco commented on Mar 28, 2019

    @franciscolourenco
  8. CTimmerman commented on Jan 10, 2020

    @CTimmerman

    Search VS Code settings or open ~/.config/Code/User/settings.json and set "javascript.format.semicolons": "remove",

    Then rightclick a JS file open in the editor and "Format Document With..." "TypeScript and JavaScript Language Features (default)" or simply press the assigned shortcut.

  9. AshakaE commented on Nov 12, 2021

    @AshakaE

    adding this "eslint.codeActionsOnSave.mode": "problems" to settings.json did it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions