* Add eslint-plugin-jsx-a11y dependency * Add jsx-a11y lint * Add eslint-plugin-react-hooks dependency * Add react hooks lints * Ignore new react hooks lint in tests * Add eslint-plugin-testing-library dependency * Add testing-library lint * Fix yarn lint to use all files recursively
		
			
				
	
	
		
			64 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
{
 | 
						|
    "parser": "@typescript-eslint/parser",
 | 
						|
    "parserOptions": {
 | 
						|
      "project": "./tsconfig.json"
 | 
						|
    },
 | 
						|
    "plugins": [
 | 
						|
      "css-modules",
 | 
						|
      "jest",
 | 
						|
      "jsx-a11y",
 | 
						|
      "react",
 | 
						|
      "react-hooks",
 | 
						|
      "suggest-no-throw",
 | 
						|
      "testing-library",
 | 
						|
      "@typescript-eslint"
 | 
						|
    ],
 | 
						|
    "extends": [
 | 
						|
      "plugin:css-modules/recommended",
 | 
						|
      "plugin:jsx-a11y/recommended",
 | 
						|
      "plugin:react-hooks/recommended"
 | 
						|
    ],
 | 
						|
    "rules": {
 | 
						|
      "@typescript-eslint/no-floating-promises": "error",
 | 
						|
      "@typescript-eslint/no-misused-promises": "error",
 | 
						|
      "jsx-a11y/click-events-have-key-events": "off",
 | 
						|
      "jsx-a11y/no-autofocus": "off",
 | 
						|
      "jsx-a11y/no-noninteractive-element-interactions": "off",
 | 
						|
      "no-restricted-globals": [
 | 
						|
        "error",
 | 
						|
        {
 | 
						|
          "name": "isNaN",
 | 
						|
          "message": "Use Number.isNaN() instead."
 | 
						|
        }
 | 
						|
      ],
 | 
						|
      "semi": [
 | 
						|
        "error",
 | 
						|
        "never"
 | 
						|
      ],
 | 
						|
      "react-hooks/exhaustive-deps": "off",
 | 
						|
      "suggest-no-throw/suggest-no-throw": "warn",
 | 
						|
    },
 | 
						|
    "overrides": [
 | 
						|
      {
 | 
						|
        "files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
 | 
						|
        "extends": [
 | 
						|
          "plugin:testing-library/react"
 | 
						|
        ],
 | 
						|
        "rules": {
 | 
						|
          "suggest-no-throw/suggest-no-throw": "off",
 | 
						|
          "testing-library/prefer-screen-queries": "off",
 | 
						|
          "jest/valid-expect": "off"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      {
 | 
						|
        "files": ["src/**/*.test.ts"],
 | 
						|
        "extends": [
 | 
						|
          "plugin:testing-library/react"
 | 
						|
        ],
 | 
						|
        "rules": {
 | 
						|
          "suggest-no-throw/suggest-no-throw": "off",
 | 
						|
        }
 | 
						|
      }
 | 
						|
    ]
 | 
						|
}
 |