How to disable eslint rule for next-env.d.ts file?
Unanswered
Morelet’s Crocodile posted this in #help-forum
Morelet’s CrocodileOP
i have implemented
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.
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
@Morelet’s Crocodile 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.
add
next-env.d.ts to .eslintignore (create that .eslintignore file if you don't have it yet)next-env.d.ts must not be edited (see the content of that file) so you shouldn't edit it