-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy patheslint.config.js
49 lines (47 loc) · 1.12 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// @ts-check
const grafanaConfig = require('@grafana/eslint-config/flat');
// If you edit this config consider running `npx -y @eslint/config-inspector@latest` first.
/**
* @type {Array<import('eslint').Linter.Config>}
*/
module.exports = [
{
name: 'plugin-tools/ignores',
ignores: [
'.github',
'.nx/**',
'**/.*', // dotfiles aren't ignored by default in FlatConfig,
'packages/**/dist/**',
'packages/create-plugin/templates/**',
],
},
{
name: 'plugin-tools/defaults',
files: ['**/*.{ts,tsx,js}'],
},
grafanaConfig,
{
name: 'plugin-e2e/overrides',
rules: {
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
name: 'create-plugin/overrides',
files: ['packages/create-plugin/src/migrations/scripts/**/*.ts'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['fs', 'fs:promises', 'node:fs', 'node:fs/promises'],
message: 'Use the Context passed to the migration script.',
},
],
},
],
},
},
];