How to disable JavaScript build error in Visual Studio 2017?

后端 未结 7 609
Happy的楠姐
Happy的楠姐 2021-01-30 04:31

I just updated Visual Studio 2017 from RC to final. I didn’t get the following error but recently I get this error. In building the project, I get the following error and it pre

7条回答
  •  -上瘾入骨i
    2021-01-30 05:16

    In Visual Studio 2017 (v 15.8.0):

    Option 1: Options > JS Errors

    1. Open Tools > Options
    2. Navigate to Text Editor > JavaScript/TypeScript > Code Validation
    3. Set Enable JavaScript errors to false
    4. or, set Enable JavaScript errors to true and Show errors as warnings to true

    I needed to restart Visual Studio for this to take effect.

    Option 2: Options > Linting

    There is another option below which will let you edit your global linting settings:

    Option 3: .eslint file

    You can also create a file named .eslintrc in the root of your project.

    Option 4: ESLint commands in-file

    See @user9153924's answer


    Resources

    • ESLint file syntax
    • ESLint Rules

提交回复
热议问题