🧑‍💻 Migrate package.json prettier and eslint

Also updated the plugins and the config.
New rules should be respected from now-on
This commit is contained in:
ajnart
2023-06-11 17:51:29 +09:00
parent cb0e6532bf
commit 3b3f7f308f
13 changed files with 563 additions and 1448 deletions

View File

@@ -82,27 +82,24 @@
},
"devDependencies": {
"@next/bundle-analyzer": "^13.0.0",
"@next/eslint-plugin-next": "^13.0.0",
"@next/eslint-plugin-next": "^13.4.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/dockerode": "^3.3.9",
"@types/node": "18.16.17",
"@types/prismjs": "^1.26.0",
"@types/react": "17.0.61",
"@types/react": "^18.2.11",
"@types/uuid": "^9.0.0",
"@types/video.js": "^7.3.51",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.30.7",
"@vitest/coverage-c8": "^0.32.0",
"@vitest/ui": "^0.32.0",
"checkly": "latest",
"eslint": "^8.20.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-mantine": "^2.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1",
"eslint": "^8.0.1",
"eslint-config-next": "^13.4.5",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "latest",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-testing-library": "^5.5.1",
"eslint-plugin-unused-imports": "^2.0.0",
@@ -113,16 +110,12 @@
"sass": "^1.56.1",
"ts-node": "latest",
"turbo": "latest",
"typescript": "^5.0.4",
"typescript": "^5.1.0",
"video.js": "^8.0.3",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.32.0",
"vitest-fetch-mock": "^0.2.2"
},
"resolutions": {
"@types/react": "17.0.61",
"@types/react-dom": "17.0.20"
},
"packageManager": "yarn@3.6.0",
"nextBundleAnalysis": {
"budget": null,
@@ -148,5 +141,81 @@
"pin": {
"automerge": true
}
},
"prettier": {
"printWidth": 100,
"tabWidth": 2,
"parser": "typescript",
"singleQuote": true,
"trailingComma": "es5",
"useTabs": false,
"endOfLine": "lf",
"importOrder": [
"^@core/(.*)$",
"^@server/(.*)$",
"^@ui/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
},
"eslintConfig": {
"ignoreDuringBuilds": true,
"extends": [
"next",
"eslint:recommended",
"plugin:@next/next/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vitest/recommended"
],
"plugins": [
"testing-library",
"unused-imports",
"react",
"vitest"
],
"overrides": [
{
"files": [
"**/?(*.)+(spec|test).[jt]s?(x)"
],
"extends": [
"plugin:testing-library/react"
]
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"import/no-cycle": "off",
"react/react-in-jsx-scope": "off",
"react/no-children-prop": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-imports": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-continue": "off",
"linebreak-style": 0,
"import/extensions": "off",
"vitest/max-nested-describe": [
"error",
{
"max": 3
}
],
"testing-library/no-node-access": [
"error",
{
"allowContainerFirstChild": true
}
]
}
}
}