Skip to content

Commit

Permalink
Update packages and eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
emrecancorapci committed May 14, 2024
1 parent 0a1de05 commit 8ec2a80
Show file tree
Hide file tree
Showing 3 changed files with 4,635 additions and 3,069 deletions.
127 changes: 61 additions & 66 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"env": {
"browser": true,
"es2022": true,
"node": true
"node": true,
"es2024": true
},
"settings": {
"import/parsers": {
Expand All @@ -12,109 +12,104 @@
]
},
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
},
"typescript": {}
"typescript": true,
"node": true
},
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": [
"**/*.test.ts",
"**/*.test.tsx"
],
"env": {
"jest": true
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": true,
"project": [
"./tsconfig.json",
"./tsconfig.node.json"
],
"tsconfigRootDir": "./"
},
"plugins": [
"@typescript-eslint",
"react",
"prettier",
"tailwindcss",
"react-hooks",
"jsx-a11y",
"promise",
"import",
"unicorn",
"testing-library",
"react-refresh"
"@typescript-eslint", // Ready for flat config
"import", // Not ready for flat config yet: https://github.com/import-js/eslint-plugin-import/issues/2948
"jsx-a11y", // Not ready for flat config yet: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/978
"react", // Not ready for flat config yet: https://github.com/jsx-eslint/eslint-plugin-react/issues/3699
"prettier", // Ready for flat config
"promise", // NOT ready for flat config yet: https://github.com/eslint-community/eslint-plugin-promise/issues/449
"react-hooks", // NOT ready for flat config yet: https://github.com/facebook/react/issues/28313
"react-hook-form", // NOT ready for flat config (and won't be for a while)
"react-refresh", // Ready for flat config
"react-perf", // NOT ready for flat config (and won't be for a while)
"regexp", // Ready for flat config
"simple-import-sort", // Ready for flat config
"tailwindcss", // NOT ready for flat config yet: https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/335
"unicorn" // Ready for flat config
],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:unicorn/recommended",
"plugin:react-hooks/recommended",
"plugin:security/recommended",
"plugin:promise/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended",
"plugin:n/recommended",
"plugin:promise/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:react-hook-form/recommended",
"plugin:react-perf/recommended",
"plugin:regexp/recommended",
"plugin:security/recommended-legacy",
"plugin:tailwindcss/recommended",
"plugin:unicorn/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-vars" : "off",
"@typescript-eslint/no-misused-promises": [2, {
"checksVoidReturn": {
"attributes": false
"@typescript-eslint/no-unused-vars": "off", // Because VSCode already does this
"@typescript-eslint/no-misused-promises": [
2,
{
"checksVoidReturn": {
"attributes": false
}
}
}],
"n/no-missing-import": "off",
"no-unused-vars": "off",
],
"n/no-missing-import": "off", // TypeScript already does this
"no-unused-vars": "off", // Because VSCode already does this
"no-unused-expressions": [
"error",
{
"allowTernary": true
}
],
"jsx-a11y/anchor-is-valid": "warn",
"jsx-a11y/media-has-caption": "warn",
"prettier/prettier": "warn",
"promise/catch-or-return": "error",
"promise/no-new-statics": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/avoid-new": "warn",
"promise/no-callback-in-promise": "warn",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-return-in-finally": "warn",
"promise/valid-params": "warn",
"promise/always-return": "off",
"promise/no-native": "off",
"react/prop-types": "off",
"promise/always-return": "off", // Bad for hooks
"react/prop-types": "off", // No one likes prop-types
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react-refresh/only-export-components": "warn",
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off",
"react-perf/jsx-no-new-function-as-prop": "warn",
"react-refresh/only-export-components": [
"warn",
{
"allowConstantExport": true
}
],
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"unicorn/expiring-todo-comments": "off",
"unicorn/filename-case": "off",
"unicorn/filename-case": [
"warn",
{
"case": "kebabCase"
}
],
"unicorn/no-useless-undefined": "warn",
"unicorn/prevent-abbreviations": "warn"
}
Expand Down
95 changes: 49 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,57 +13,60 @@
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-slot": "^1.0.2",
"@tanstack/react-query": "^4.29.25",
"@tanstack/react-query-devtools": "^4.29.25",
"axios": "^1.4.0",
"class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"@tanstack/react-query": "^5.36.0",
"@tanstack/react-query-devtools": "^5.36.0",
"axios": "^1.6.8",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"js-cookie": "^3.0.5",
"jwt-decode": "^3.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.1",
"react-intersection-observer": "^9.5.2",
"react-router-dom": "^6.14.1",
"tailwind-merge": "^1.13.2",
"tailwindcss-animate": "^1.0.6",
"zustand": "^4.3.9"
"jwt-decode": "^4.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.4",
"react-intersection-observer": "^9.10.2",
"react-router-dom": "^6.23.1",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zustand": "^4.5.2"
},
"devDependencies": {
"@nabla/vite-plugin-eslint": "^1.5.0",
"@tanstack/eslint-plugin-query": "^4.29.9",
"@types/js-cookie": "^3.0.3",
"@types/node": "^20.4.2",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.14",
"eslint": "^8.45.0",
"@nabla/vite-plugin-eslint": "^2.0.4",
"@tanstack/eslint-plugin-query": "^5.35.6",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.19",
"eslint": "8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-prettier": "^5.0.0-alpha.2",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-n": "^17.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-tailwindcss": "^3.13.0",
"eslint-plugin-testing-library": "^5.11.0",
"eslint-plugin-unicorn": "^48.0.0",
"postcss": "^8.4.26",
"prettier": "^3.0.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.4.3",
"vite-tsconfig-paths": "^4.2.0"
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hook-form": "^0.3.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-perf": "^3.3.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-regexp": "^2.5.0",
"eslint-plugin-security": "^3.0.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-tailwindcss": "^3.15.1",
"eslint-plugin-unicorn": "^53.0.0",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-tsconfig-paths": "^4.3.2"
}
}
}
Loading

0 comments on commit 8ec2a80

Please sign in to comment.