Closed justYu2001 closed 2 months ago
import moment from "moment"; import utils from "@/utils" // ESLint say I should have a newline after this line const dataJson = require("./data.json"); // code...
{ "import/order":[ "error", { "newlines-between":"never", "alphabetize":{ "order":"asc", "caseInsensitive":true } } ], "import/newline-after-import":"error" }
You can't require and import in the same file.
require
import
Also, eslint 6 is very out of date; you should be on eslint 8.
Yeah, you are right. I should replace require() with import. Thanks for your help. π
require()
Example
My ESLint Setting
Package version
Screenshot