From 754fce648ccde134056038e2ca7d5f706f31e3c1 Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Tue, 26 Nov 2024 11:09:27 +0100 Subject: [PATCH] Chore: Make Eslint work with enterprise (#96539) chore(eslint): make it work with enterprise --- eslint.config.js | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 450fba7f66d..9cfc8059249 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -78,6 +78,10 @@ module.exports = [ settings: { 'import/internal-regex': '^(app/)|(@grafana)', 'import/external-module-folders': ['node_modules', '.yarn'], + // Silences a warning when linting enterprise code + react: { + version: 'detect', + }, }, rules: { diff --git a/package.json b/package.json index 7625759e554..d8363e8e870 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "test:coverage:changes": "jest --coverage --changedSince=origin/main", "test:accessibility-report": "./scripts/generate-a11y-report.sh", "lint": "yarn run lint:ts && yarn run lint:sass", - "lint:ts": "eslint . --cache", + "lint:ts": "eslint ./ ./public/app/extensions/ --cache --no-error-on-unmatched-pattern", "lint:sass": "yarn stylelint '{public/sass,packages}/**/*.scss' --cache", "test:ci": "mkdir -p reports/junit && JEST_JUNIT_OUTPUT_DIR=reports/junit jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}", "lint:fix": "yarn lint:ts --fix",