title: IndexedDB giving error while creating the object store
body: <p>While creating the object store i am getting the linting error. How to rewrite the code to fix this errors</p>
  <p><strong>Code snippet</strong></p>
  <pre><code>    const self = this;
  
  const IDBConfig = {
    name: 'Cache_responses',
    version: 1,
    stores: [
      {
        name: 'request_api',
        Path: 'url'
      },
      {
        name: 'response_result',
        Path: 'url'
      }
    ]
  };
  
  const createIndexedDb = ({name, version, stores}) =&gt; {
  const request = self.indexedDB.open(name, version);
    return new Promise((resolve,reject) =&gt; {
      request.onupgradeneeded = e =&gt; {
        const db = e.target.result;
        
        stores.map(({name,Path}) =&gt; { //1.'name' is already declared in upper scope. 
        //2.expected to return a value in arrow function
  
          if(!db.objectStoreNames.contains(name)) {
            db.createObjectStore(name, {Path});
          }
        })
      }
     request.onsuccess = () =&gt; resolve(request.result);
     request.onerror = () =&gt; reject(request.error);
    })
  };
  </code></pre>
  <p>I am getting these two errors while mapping the name and path. I am not sure why it is showing? How to rewrite this part or simplify this part?</p>