Skip to content

Commit

Permalink
style: update eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsong77 committed May 20, 2024
1 parent d7ab8ed commit f762351
Show file tree
Hide file tree
Showing 3 changed files with 265 additions and 7 deletions.
14 changes: 12 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
plugins: ['simple-import-sort'],
plugins: [
'simple-import-sort',
// https://react.dev/learn/react-compiler#installing-eslint-plugin-react-compiler
'eslint-plugin-react-compiler',
],
extends: [
'next/core-web-vitals',
'plugin:tailwindcss/recommended',
Expand All @@ -11,6 +15,8 @@ module.exports = {
'simple-import-sort/exports': 'error',
'tailwindcss/no-custom-classname': 'off',
'tailwindcss/classnames-order': 'off',

'react-compiler/react-compiler': 'error',
},
settings: {
tailwindcss: {
Expand All @@ -22,7 +28,11 @@ module.exports = {
{
files: ['**/*.test.ts', '**/*.test.tsx'],
excludedFiles: ['e2e/**'],
extends: ['plugin:vitest/recommended', 'plugin:testing-library/react'],
extends: [
'plugin:vitest/recommended',
'plugin:jest-dom/recommended',
'plugin:testing-library/react',
],
},
{
files: ['e2e/**/*.spec.ts'],
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@
"eslint": "^8",
"eslint-config-next": "^14.2.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-playwright": "^1.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react-compiler": "0.0.0-experimental-c8b3f72-20240517",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-tailwindcss": "^3.15.1",
"eslint-plugin-testing-library": "^6.2.2",
Expand Down
Loading

0 comments on commit f762351

Please sign in to comment.