-
Notifications
You must be signed in to change notification settings - Fork 6
/
flat.js
33 lines (31 loc) · 1.02 KB
/
flat.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
const jsdoc = require("eslint-plugin-jsdoc");
const reactHooksPlugin = require("eslint-plugin-react-hooks");
const reactPlugin = require("eslint-plugin-react");
const tsPlugin = require("@typescript-eslint/eslint-plugin");
const typescriptParser = require("@typescript-eslint/parser");
const prettierConfig = require("eslint-config-prettier");
const stylisticTs = require("@stylistic/eslint-plugin-ts");
const baseConfig = require("./base");
/**
* @type {Array<import('eslint').Linter.Config>}
*/
module.exports = {
name: "@grafana/eslint-config/flat",
...reactHooksPlugin.configs.recommended,
...reactPlugin.configs.flat.recommended,
...prettierConfig,
settings: baseConfig.settings,
plugins: {
jsdoc,
"@typescript-eslint": tsPlugin,
"react-hooks": reactHooksPlugin,
"@stylistic/ts": stylisticTs,
},
languageOptions: {
parser: typescriptParser,
ecmaVersion: baseConfig.ecmaVersion,
sourceType: baseConfig.sourceType,
parserOptions: baseConfig.parserOptions,
},
rules: baseConfig.rules,
};