Hey all,
I'm getting a weird linting error. I converted a type to an enum and ESLint is saying All imports in the declaration are only used as types. Use 'import type'
The thing is, I am not importing a type, I'm importing an enum.
Code snippet:
--- Component.tsx ---
import { DeliveryMethods } from "~/enums/delivery";
<-- Some TSX -->
--- delivery.ts ---
export enum DeliveryMethods {
POST_IN_STORE = "post_in_store",
POST_REQUEST = "post_request",
POD = 'Pod'
}
--- .eslintrc.js. ---
/** @type {import('@types/eslint').Linter.BaseConfig} */
module.exports = {
extends: [
"@remix-run/eslint-config",
"@remix-run/eslint-config/node",
"@remix-run/eslint-config/jest-testing-library",
"prettier",
],
env: {
"cypress/globals": true,
},
plugins: ["cypress"],
settings: {
jest: {
version: 28,
},
},
ignorePatterns: ["node_modules", "server", "public/build"],
};