Revision 414d536186e98b334d934875e518ff9ebda145a8 authored by Christopher Moyer on 11 October 2022, 20:31:20 UTC, committed by GitHub on 11 October 2022, 20:31:20 UTC
* refactors config panels and visualizations, corrects relrefs

* adds an alias

* Remove some old content

* moves visualizations topic to the root

* moves out panels and visualization topics to the root

* adds move and resize panel to add/organize panel; creates a create dashboard topic under build dashboards; adjusts context of add a panel to be from within an existing dashboard

* updates aliases

* creates search at root, moves dashboard preview to search, creates standalone search dashboard topic

* moves Set dashboard time range to use-dashboards, creates modify dashboard settings and adds moves Modify dashboard time settings to that topic

* moves existing query-options topic from working with panels to configure-panel-visualizations, moves panel time overrides and timeshift content to query options

* Moving things to better category, fixing links, improving ordering

* Move panel inspector to main panel topic

* completes partial fix of relrefs

* relref fixes con't

* restructures remaining panels topics

* more relref fixes

* Minor fix

* Minor tweak

* finishes fixing relrefs

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
1 parent f4a3400
Raw File
.eslintrc
{
  "extends": ["@grafana/eslint-config"],
  "root": true,
  "plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
  "settings": {
    "import/internal-regex": "^(app/)|(@grafana)",
    "import/external-module-folders": ["node_modules", ".yarn"]
  },
  "rules": {
    "react/prop-types": "off",
    "@emotion/jsx-import": "error",
    "lodash/import-scope": [2, "member"],
    "jest/no-focused-tests": "error",
    "import/order": [
      "error",
      {
        "groups": [["builtin", "external"], "internal", "parent", "sibling", "index"],
        "newlines-between": "always",
        "alphabetize": { "order": "asc" }
      }
    ],
    "no-restricted-imports": [
      "error",
      {
        "paths": [
          {
            "name": "react-redux",
            "importNames": ["useDispatch", "useSelector"],
            "message": "Please import from app/types instead."
          },
          {
            "name": "react-i18next",
            "importNames": ["Trans", "t"],
            "message": "Please import from app/core/internationalization instead"
          }
        ]
      }
    ],

    // Use typescript's no-redeclare for compatibility with overrides
    "no-redeclare": "off",
    "@typescript-eslint/no-redeclare": ["error"]
  },
  "overrides": [
    {
      "files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
      "rules": {
        "react-hooks/rules-of-hooks": "off",
        "react-hooks/exhaustive-deps": "off"
      }
    },
    {
      "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"
      }
    },
    {
      "files": ["public/dashboards/scripted*.js"],
      "rules": {
        "no-redeclare": "error",
        "@typescript-eslint/no-redeclare": "off"
      }
    },
    {
      "files": ["**/*"],
      "excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
      "rules": {
        // these are all the rules listed in the strict preset
        // we should fix them one by one and mark them as errors
        // once they're all fixed, we can remove them all and instead extend the strict preset
        // with "extends": ["plugin:jsx-a11y/strict"]
        "jsx-a11y/alt-text": "error",
        "jsx-a11y/anchor-has-content": "error",
        "jsx-a11y/anchor-is-valid": "off",
        "jsx-a11y/aria-activedescendant-has-tabindex": "error",
        "jsx-a11y/aria-props": "error",
        "jsx-a11y/aria-proptypes": "error",
        "jsx-a11y/aria-role": "error",
        "jsx-a11y/aria-unsupported-elements": "error",
        "jsx-a11y/autocomplete-valid": "error",
        "jsx-a11y/click-events-have-key-events": "off",
        "jsx-a11y/heading-has-content": "error",
        "jsx-a11y/html-has-lang": "error",
        "jsx-a11y/iframe-has-title": "error",
        "jsx-a11y/img-redundant-alt": "error",
        "jsx-a11y/interactive-supports-focus": [
          "off",
          {
            "tabbable": [
              "button",
              "checkbox",
              "link",
              "progressbar",
              "searchbox",
              "slider",
              "spinbutton",
              "switch",
              "textbox"
            ]
          }
        ],
        "jsx-a11y/label-has-associated-control": "off",
        "jsx-a11y/media-has-caption": "error",
        "jsx-a11y/mouse-events-have-key-events": "off",
        "jsx-a11y/no-access-key": "error",
        "jsx-a11y/no-autofocus": [
          "error",
          {
            "ignoreNonDOM": true
          }
        ],
        "jsx-a11y/no-distracting-elements": "error",
        "jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
        "jsx-a11y/no-noninteractive-element-interactions": [
          "off",
          {
            "body": ["onError", "onLoad"],
            "iframe": ["onError", "onLoad"],
            "img": ["onError", "onLoad"]
          }
        ],
        "jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
        "jsx-a11y/no-noninteractive-tabindex": "error",
        "jsx-a11y/no-redundant-roles": "error",
        "jsx-a11y/no-static-element-interactions": "off",
        "jsx-a11y/role-has-required-aria-props": "error",
        "jsx-a11y/role-supports-aria-props": "error",
        "jsx-a11y/scope": "error",
        "jsx-a11y/tabindex-no-positive": "error"
      }
    }
  ]
}
back to top