Recently, I set up a new Vue 3 project with Quasar using the Quasar CLI.
In order to store my firebase configuration, I created a new file called src/firebase/config.ts
, which looks like this:
// Import necessary functions from SDKs
import { initializeApp } from 'firebase/app';
import { getFirestore, serverTimestamp } from 'firebase/firestore';
import { getAuth } from 'firebase/auth';
import { getStorage } from 'firebase/storage';
// Firebase configuration
const firebaseConfig = {
apiKey: 'REDACTED',
authDomain: 'REDACTED',
projectId: 'REDACTED',
storageBucket: 'REDACTED',
messagingSenderId: 'REDACTED',
appId: 'REDACTED',
measurementId: 'REDACTED',
};
// Initialize Firebase
const firebaseApp = initializeApp(firebaseConfig);
//Export modules
export const db = getFirestore(firebaseApp);
export const store = getStorage(firebaseApp);
export const auth = getAuth(firebaseApp);
export const timestamp = serverTimestamp();
The line
const firebaseApp = initializeApp(firebaseConfig);
is causing an eslint error - Unsafe assignment of an 'any' value. eslint@typescript-eslint/no-unsafe-assignment
.
Here is the .eslintrc.js
file generated by Quasar CLI during project setup:
(ESLint configuration file content)
I'm unsure why this error is occurring only with projects created using the Quasar CLI and not with the Vue CLI.
It seems that the difference in the configurations chosen by Quasar CLI and Vue CLI might be causing this issue.
Would merging certain parts from the Vue CLI's .eslintrc.js
file into the one generated by Quasar CLI help resolve these errors?
(Vue CLI ESLint configuration file content)