testing javascript logo
    Loading

    Configure Prettier

    1. Prettier is a pretty opinionated tool, but it does allow for some customization. In this lesson we’ll check out the prettier playground and see what options we want to enable in our project’s .prettierrc file.
    2. After adding in our custom configuration, we’ll create a .prettierignore file so that you can avoid formatting any files generated within the project such as node_modules or a build folder.

    Transcript

    Configure Prettier

    module imageStatic Analysis Testing JavaScript Applications
    • 1.
      Intro to Static Analysis Testing JavaScript Applications
    • 2.
      Lint JavaScript by Configuring and Running ESLint
    • 3.
      Use the ESLint Extension for VSCode
    • 4.
      Use pre-built ESLint Configuration using extends
    • 5.
      Run ESLint with npm Scripts
    • 6.
      Format Code by Installing and Running Prettier
    • 7.
      Configure Prettier
    • 8.
      Use the Prettier Extension for VSCode
    • 9.
      Disable Unnecessary ESLint Stylistic Rules with eslint-config-prettier
    • 10.
      Validate All Files are Properly Formatted with Prettier
    • 11.
      Avoid Common Errors by Installing and Configuring TypeScript
    • 12.
      Make ESLint Support TypeScript Files
    • 13.
      Validate Code in a pre-commit git Hook with husky
    • 14.
      Auto-format All Files and Validate Relevant Files in a precommit Script with lint-staged
    • 15.
      Run Multiple npm Scripts in Parallel with npm-run-all