Skip to content

Commit e7bb4ba

Browse files
committed
fix: migrate ESLint config to v9 flat config format
update lint script to use --config flag. move ignore patterns from .eslintignore to eslint.config.mjs. remove deprecated CLI options.
1 parent ef9ff52 commit e7bb4ba

File tree

3 files changed

+19
-39
lines changed

3 files changed

+19
-39
lines changed

.config/eslint.config.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ import { defineConfig } from 'eslint/config';
99
import grafanaConfig from '@grafana/eslint-config/flat.js';
1010

1111
export default defineConfig([
12+
{
13+
ignores: [
14+
'node_modules/**',
15+
'dist/**',
16+
'build/**',
17+
'*.tsbuildinfo',
18+
'coverage/**',
19+
'.nyc_output/**',
20+
'**/*.min.js',
21+
'**/*.min.css',
22+
'*.zip',
23+
'*.tar.gz',
24+
'*.log',
25+
'logs/**',
26+
'.cache/**',
27+
'.eslintcache',
28+
],
29+
},
1230
...grafanaConfig,
1331
{
1432
rules: {

.eslintignore

Lines changed: 0 additions & 38 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:ci": "jest --passWithNoTests --maxWorkers 4",
1010
"typecheck": "tsc --noEmit",
1111
"scope-bootstrap": "node scripts/scope-bootstrap.js",
12-
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
12+
"lint": "eslint --config .config/eslint.config.mjs --cache .",
1313
"lint:fix": "npm run lint -- --fix",
1414
"e2e": "npm exec cypress install && npm exec grafana-e2e run",
1515
"e2e:update": "npm exec cypress install && npm exec grafana-e2e run --update-screenshots",

0 commit comments

Comments
 (0)