Next.js Discord

Discord Forum

How to disable eslint rule for next-env.d.ts file?

Unanswered
Morelet’s Crocodile posted this in #help-forum
Open in Discord
Morelet’s CrocodileOP
i have implemented
simple-import-sort/imports
rule in eslint config file but this file
next-env.d.ts
gives me error to implement this rule.

~Eslint rule is

"simple-import-sort/imports": [
        "error",
        {
          "groups": [
            // React imports come first.
            ["^react"],
            // Third-party imports (Formik and Modal).
            ["^formik", "^Modal", "^@?\\w"],
            // Component imports.
            ["^@/components", "^@/"],
            // Utility imports.
            ["^@/utils", "^@/data"],
            // CSS imports.
            ["^.+\\.?(css)$"]
          ]
        }
      ] ,


Order is
-First, the React imports.
-Second, the third-party imports (in this case, the Formik library and Modal component).
-Third, the component imports.
-Fourth, the utility imports.
-Finally, the CSS import.

2 Replies