0
1

More than 1 year has passed since last update.

ES Lintの導入

Last updated at Posted at 2023-01-19

本記事を読んでできること

  • ES Lintを導入できる

ES Lintとは

環境

  • Windows10 Pro 64bit
  • Node.js v16.17.1

手順

  1. Node.jsをインストールします。
    Nodejsのダウンロード

  2. ターミナルを開き、以下のコマンドを実行してESLintをグローバルにインストールします。

    npm install -g eslint
    
  3. プロジェクトのルートディレクトリに移動し、以下のコマンドを実行してプロジェクトにESLintをインストールします。

    npm install eslint --save-dev
    
  4. 以下のコマンドを実行して、ESLintの設定ファイルを作成します。

    eslint --init
    
  5. package.jsonに以下を追加

    "scripts": {
        "lint": "eslint ."
      },
    
  6. 設定が終わったら、以下のコマンドで実行

    npm run lint
    
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1