version: 2
jobs:
  build:
    docker:
      - image: node:latest
    steps:
      - checkout
      - run:
          name: Install ESLint
          command: npm install --global eslint
      - run:
          name: System information
          command: uname -a
      - run:
          name: Node.js version
          command: node --version
      - run:
          name: Run ESLint
          command: eslint ./*.js

version: 2
jobs:
  build:
    docker:
      - image: node:latest
    steps:
      - restore_cache:
          key: eslint-application
      - run:
          name: Install ESLint
          command: npm install --global eslint
      - save_cache:
          paths:
            - /usr/local/bin/eslint
            - /usr/local/lib/node_modules
          key: eslint-application-{{ checksum "/usr/local/lib/node_modules/eslint/package.json" }}
      - checkout
      - run:
          name: System information
          command: uname -a
      - run:
          name: Node.js version
          command: node --version
      - run:
          name: Run ESLint
          command: eslint ./*.js

Use cache to install ESLint
Use cache to install ESLint
