Skip to content

Latest commit

 

History

History
78 lines (49 loc) · 2.12 KB

File metadata and controls

78 lines (49 loc) · 2.12 KB

Installation

This guide provides detailed instructions for installing CodeSense. You can use CodeSense in several ways: as a VS Code extension, a command-line interface (CLI), or an ESLint plugin.

VS Code Extension

The VS Code extension is the recommended way to use CodeSense for most users. It provides the most integrated experience.

Prerequisites

Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
  3. In the search bar, type CodeSense.
  4. Find the "CodeSense - Baseline Web Compatibility" extension and click the Install button.

Command-Line Interface (CLI)

The CLI is ideal for integrating CodeSense into your build process or CI/CD pipeline.

Prerequisites

  • Node.js (which includes npm) version 16 or newer.

Global Installation

For most users, we recommend installing the CodeSense CLI globally. This allows you to run the CodeSense command from any directory.

npm install -g CodeSense

Local Installation

If you prefer to manage CodeSense as a project-specific dependency, you can install it locally.

npm install --save-dev CodeSense

When installed locally, you can run the CLI using npx:

npx CodeSense

ESLint Plugin

The ESLint plugin allows you to see CodeSense warnings directly in your editor as you code.

Prerequisites

Installation

  1. First, install the ESLint plugin:

    npm install --save-dev eslint-plugin-CodeSense
  2. Then, add the plugin to your ESLint configuration file (e.g., .eslintrc.js):

    module.exports = {
      // ... your other ESLint configuration
      plugins: ['CodeSense'],
      rules: {
        'CodeSense/baseline-compatibility': 'error'
      }
    };

For more information on configuring the ESLint plugin, see the Configuration documentation.