サクッとviteでアプリを作るときに、なんだかんだ欲しいなと思ったりするも「どうやるんだっけ...」となるため、備忘録として残しておこうと思います。
yarn add -D eslint-plugin-import eslint-import-resolver-typescript
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
+ "plugin:import/recommended",
+ "plugin:import/typescript",
"plugin:prettier/recommended",
],
rules: {
+ "import/order": [
+ "error",
+ {
+ alphabetize: {
+ order: "asc",
+ },
+ "newlines-between": "always",
+ },
+ ],
},
};