1
+ // @ts -check
1
2
const jsdoc = require ( "eslint-plugin-jsdoc" ) ;
2
3
const reactHooksPlugin = require ( "eslint-plugin-react-hooks" ) ;
3
4
const reactPlugin = require ( "eslint-plugin-react" ) ;
@@ -11,23 +12,24 @@ const baseConfig = require("./base");
11
12
/**
12
13
* @type {Array<import('eslint').Linter.Config> }
13
14
*/
14
- module . exports = {
15
- name : "@grafana/eslint-config/flat" ,
16
- ...reactHooksPlugin . configs . recommended ,
17
- ...reactPlugin . configs . flat . recommended ,
18
- ...prettierConfig ,
19
- settings : baseConfig . settings ,
20
- plugins : {
21
- jsdoc,
22
- "@typescript-eslint" : tsPlugin ,
23
- "react-hooks" : reactHooksPlugin ,
24
- "@stylistic/ts" : stylisticTs ,
15
+ module . exports = [
16
+ reactHooksPlugin . configs [ "recommended-latest" ] ,
17
+ reactPlugin . configs . flat . recommended ,
18
+ prettierConfig ,
19
+ {
20
+ name : "@grafana/eslint-config/flat" ,
21
+ settings : baseConfig . settings ,
22
+ plugins : {
23
+ jsdoc,
24
+ "@typescript-eslint" : tsPlugin ,
25
+ "@stylistic/ts" : stylisticTs ,
26
+ } ,
27
+ languageOptions : {
28
+ parser : typescriptParser ,
29
+ ecmaVersion : baseConfig . ecmaVersion ,
30
+ sourceType : baseConfig . sourceType ,
31
+ parserOptions : baseConfig . parserOptions ,
32
+ } ,
33
+ rules : baseConfig . rules ,
25
34
} ,
26
- languageOptions : {
27
- parser : typescriptParser ,
28
- ecmaVersion : baseConfig . ecmaVersion ,
29
- sourceType : baseConfig . sourceType ,
30
- parserOptions : baseConfig . parserOptions ,
31
- } ,
32
- rules : baseConfig . rules ,
33
- } ;
35
+ ] ;
0 commit comments