mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 11:44:26 -06:00
3c6e0e8ef8
* Add and configure eslint-plugin-import * Fix the lint:ts npm command * Autofix + prettier all the files * Manually fix remaining files * Move jquery code in jest-setup to external file to safely reorder imports * Resolve issue caused by circular dependencies within Prometheus * Update .betterer.results * Fix missing // @ts-ignore * ignore iconBundle.ts * Fix missing // @ts-ignore
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
{
|
|
"extends": ["@grafana/eslint-config"],
|
|
"root": true,
|
|
"plugins": ["@emotion", "lodash", "jest", "import"],
|
|
"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" }
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
}
|