13 Commits

Author SHA1 Message Date
abb885c585 I18n: Move eslint rule to package (#105860) 2025-05-29 16:11:59 +02:00
7bfa78c6e6 I18n: Update eslint rule to catch some untranslated object properties (#105072) 2025-05-28 21:14:43 +01:00
c2ebb9cbbf i18n: Update lint rule suggested import location to @grafana/i18n (#105091) 2025-05-19 15:00:15 +01:00
8f17f607fa FEMT: Add no-restricted-img-srcs rule (#105006) 2025-05-12 10:34:17 +01:00
b56a4a5295 Border radius: Improve rule and fix remaining violations (#104569)
* improve rule and fix remaining borderRadius violations

* prettier

* Add test case for nested classes

* Fix unnecessary string wrapping

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-04-30 14:03:54 +01:00
8161e52061 i18n: Improve how ternary cases are captured as untranslated text (#104034) 2025-04-15 14:07:23 +01:00
eac312753f Internationalization: Update translation rule to catch ternary cases (#104027) 2025-04-15 12:25:41 +01:00
754c0e1534 Internationalisation: Check if strings are entirely non-alphanumeric before reporting as issues (#103900) 2025-04-14 13:24:47 +00:00
c83c486c9b Internationalisation: Lint rule improvement (#103788)
* improve autofix so it can fix foo={"bar"}

* apply fixes

* fix type checks + betterer

* tweak to make types happy
2025-04-10 16:22:52 +01:00
85a3ae2d07 Chore: Add heuristic approach to fixing untranslated text with eslint rule (#101561)
* Add heuristic approach to fixing untranslated text with eslint rule

* Update logic of how we track and report untranslated strings so we can prevent autofixes

* Update betterer to reflect different reporting of untranslated text

* Move logic for rule to utils and change to suggest instead of fix

* Update tests to cope with suggest instead of fix

* Remove commented out `only`

* Add config to allow force fixing

* Fix type errors and improve shouldFix logic
2025-03-13 13:17:05 +00:00
ac0fd38183 Chore: Add new no-translation-top-level eslint rule (#101550) 2025-03-04 15:42:37 +02:00
8c41137bcf Frontend: Update to Eslint 9 (#94823)
* chore(eslint): bump all eslint related packages to latest

* chore(eslint): update linting scripts work with v9

* chore(eslint): introduce flat config

* chore(eslint): delete legacy configs

* feat(grafana-eslint-rules): update rules to use eslint 9 APIs

* chore(eslint): migrate all nested eslintrc files over to root config

* chore(packages): bump eslint dependencies

* feat(betterer): make it work with eslint 9

* style(grafana-data): remove non-existant ban-types rule from disable declarations

* chore(wip): [wip] link eslint-config-grafana

* chore(packages): add @eslint/compat

* chore(eslint): add compat to testing library and fix alerting rules

* chore(eslint): bump grafana eslint-config to v8

* chore(explore): delete legacy eslint config

* chore: clean codeowners file, remove grafana/eslint-config from e2e plugins

* test(eslint-rules): fix no-border-radius-literal and no-aria-label-e2e-selectors rule tests

* Add .js to prettier checks so new eslint.config.js file isn't missed

* chore(eslint): move emotion/syntax-preference to grafana/defaults

* test(eslint): use core-js structured-clone

* revert(services): undo merge backend-format githook changes

* test(eslint-rules): remove structured-clone polyfill from tests

* chore(eslint): add back public/lib/monaco to ignore list, sort alphabetically

* chore(e2e-plugins): remove eslint config 7 from plugins package.json

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-11-07 16:31:06 +01:00
06d89e1929 Chore: add some basic validation tests for our eslint rules (#75284)
* add some basic validation tests for our eslint rules

* add 1 more valid case
2023-09-22 13:03:21 +01:00