How can you set up ESLint to lint TypeScript files in a project?
- npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
- npm install --global eslint
- npm install --save-dev eslint
- npm install --save-dev eslint-plugin-typescript
To set up ESLint for TypeScript, you need to install eslint, @typescript-eslint/parser, and @typescript-eslint/eslint-plugin as dev dependencies. This combination allows ESLint to parse and analyze TypeScript code. The other options do not cover TypeScript-specific linting.
Loading...
Related Quiz
- How does parameterized query help in preventing SQL Injection attacks?
- You have to deploy a Node.js application, but the production environment does not allow internet access, preventing npm packages from being installed. How do you prepare and install the necessary npm packages in such an environment?
- When designing systems with Non-Blocking I/O, careful consideration must be given to avoid ________, where multiple asynchronous operations are competing for resources.
- In Mocha, to perform cleanup activities after all the test cases in a suite have run, the ______ hook is used.
- What would happen if you do not use the express.static middleware function for serving static files?