2020-02-07 20:40:04 -05:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  "extends": ["@grafana/eslint-config"],
							 
						 
					
						
							
								
									
										
										
										
											2020-08-11 17:52:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  "root": true,
							 
						 
					
						
							
								
									
										
										
										
											2022-09-23 14:02:16 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  "plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
							 
						 
					
						
							
								
									
										
										
										
											2022-04-22 14:33:13 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  "settings": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "import/internal-regex": "^(app/)|(@grafana)",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "import/external-module-folders": ["node_modules", ".yarn"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  },
							 
						 
					
						
							
								
									
										
										
										
											2021-01-19 11:06:27 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  "rules": {
							 
						 
					
						
							
								
									
										
										
										
											2021-04-01 14:15:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "react/prop-types": "off",
							 
						 
					
						
							
								
									
										
										
										
											2022-11-02 12:05:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    // need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "react/no-unknown-property": ["error", { "ignore": ["css"] }],
							 
						 
					
						
							
								
									
										
										
										
											2021-04-21 08:38:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "@emotion/jsx-import": "error",
							 
						 
					
						
							
								
									
										
										
										
											2022-02-11 07:59:30 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "lodash/import-scope": [2, "member"],
							 
						 
					
						
							
								
									
										
										
										
											2022-04-22 14:33:13 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "jest/no-focused-tests": "error",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "import/order": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "error",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "groups": [["builtin", "external"], "internal", "parent", "sibling", "index"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "newlines-between": "always",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "alphabetize": { "order": "asc" }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 13:44:52 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ],
							 
						 
					
						
							
								
									
										
										
										
											2022-09-19 10:49:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "no-restricted-imports": [
							 
						 
					
						
							
								
									
										
										
										
											2022-10-07 11:46:28 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      "error",
							 
						 
					
						
							
								
									
										
										
										
											2022-09-19 10:49:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "paths": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "name": "react-redux",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "importNames": ["useDispatch", "useSelector"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "message": "Please import from app/types instead."
							 
						 
					
						
							
								
									
										
										
										
											2022-10-07 11:46:28 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "name": "react-i18next",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "importNames": ["Trans", "t"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "message": "Please import from app/core/internationalization instead"
							 
						 
					
						
							
								
									
										
										
										
											2022-09-19 10:49:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ],
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 13:44:52 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    // Use typescript's no-redeclare for compatibility with overrides
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "no-redeclare": "off",
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 16:59:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "@typescript-eslint/no-redeclare": ["error"]
							 
						 
					
						
							
								
									
										
										
										
											2021-01-19 11:06:27 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  },
							 
						 
					
						
							
								
									
										
										
										
											2020-08-11 17:52:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  "overrides": [
							 
						 
					
						
							
								
									
										
										
										
											2022-11-07 15:32:02 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "files": ["public/app/features/scenes/**/*.{ts,tsx}"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "rules": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    },
							 
						 
					
						
							
								
									
										
										
										
											2020-08-11 17:52:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    {
							 
						 
					
						
							
								
									
										
										
										
											2021-03-25 12:42:14 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      "files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
							 
						 
					
						
							
								
									
										
										
										
											2020-08-11 17:52:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      "rules": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "react-hooks/rules-of-hooks": "off",
							 
						 
					
						
							
								
									
										
										
										
											2021-01-19 11:06:27 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        "react-hooks/exhaustive-deps": "off"
							 
						 
					
						
							
								
									
										
										
										
											2020-08-11 17:52:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
									
										
										
										
											2021-04-08 13:00:58 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "files": ["packages/grafana-ui/src/components/ThemeDemos/**/*.{ts,tsx}"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "rules": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "@emotion/jsx-import": "off",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "react/jsx-uses-react": "off",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "react/react-in-jsx-scope": "off"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
									
										
										
										
											2022-08-05 13:44:52 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "files": ["public/dashboards/scripted*.js"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "rules": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "no-redeclare": "error",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "@typescript-eslint/no-redeclare": "off"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 16:59:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    {
							 
						 
					
						
							
								
									
										
										
										
											2022-10-14 11:02:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      "extends": ["plugin:jsx-a11y/recommended"],
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 16:59:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      "files": ["**/*"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      "rules": {
							 
						 
					
						
							
								
									
										
										
										
											2022-10-14 11:02:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        // rules marked "off" are those left in the recommended preset we need to fix
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // we should remove the corresponding line and fix them one by one
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // any marked "error" contain specific overrides we'll need to keep
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 16:59:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        "jsx-a11y/click-events-have-key-events": "off",
							 
						 
					
						
							
								
									
										
										
										
											2022-10-04 12:54:14 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        "jsx-a11y/no-autofocus": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          "error",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "ignoreNonDOM": true
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ],
							 
						 
					
						
							
								
									
										
										
										
											2022-11-24 18:21:33 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        "jsx-a11y/no-static-element-interactions": "off",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        "jsx-a11y/label-has-associated-control": [ "error", {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          "controlComponents": ["NumberInput"],
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          "depth": 2
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        }]
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 16:59:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
									
										
										
										
											2020-08-11 17:52:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ]
							 
						 
					
						
							
								
									
										
										
										
											2020-02-07 20:40:04 -05:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								}