diff --git a/package.json b/package.json index bd96fb9..9ddae33 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "basic-frontend", + "name": "akatsuki-web", "version": "0.1.0", "private": true, "dependencies": { @@ -78,13 +78,142 @@ "start": "node scripts/start.js", "build": "node scripts/build.js", "test": "node scripts/test.js", - "lint-fix": "yarn eslint --fix src/" + "lint-fix": "yarn eslint --fix src/", + "preinstall": "npx only-allow yarn" }, "eslintConfig": { + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "settings": { + "react": { + "version": "detect" + } + }, "extends": [ "react-app", - "react-app/jest" - ] + "react-app/jest", + "prettier", + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:react-hooks/recommended", + "plugin:prettier/recommended", + "plugin:import/typescript", + "plugin:react/jsx-runtime" + ], + "plugins": [ + "check-file", + "simple-import-sort" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error", + "check-file/no-index": [ + "warn" + ], + "react/jsx-sort-props": [ + "error", + { + "callbacksLast": false, + "shorthandFirst": true, + "multiline": "ignore", + "ignoreCase": true, + "noSortAlphabetically": true, + "reservedFirst": true + } + ], + "import/no-default-export": "off", + "react/forbid-elements": [ + "error", + { + "forbid": [ + { + "element": "h1", + "message": "Use @materialui instead of

" + }, + { + "element": "h2", + "message": "Use @materialui instead of

" + }, + { + "element": "h3", + "message": "Use @materialui instead of

" + }, + { + "element": "h4", + "message": "Use @materialui instead of

" + }, + { + "element": "h5", + "message": "Use @materialui instead of
" + }, + { + "element": "h6", + "message": "Use @materialui instead of
" + }, + { + "element": "p", + "message": "Use @materialui instead of

" + }, + { + "element": "div", + "message": "Use @materialui instead of

" + }, + { + "element": "grid", + "message": "Use @materialui instead of " + }, + { + "element": "button", + "message": "Use @materialui - +