|
| 1 | +// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format |
| 2 | +import storybook from "eslint-plugin-storybook"; |
| 3 | + |
1 | 4 | import js from "@eslint/js"; |
2 | 5 | import globals from "globals"; |
3 | 6 | import reactHooks from "eslint-plugin-react-hooks"; |
4 | 7 | import reactRefresh from "eslint-plugin-react-refresh"; |
5 | 8 |
|
6 | | -export default [ |
7 | | - { ignores: ["dist", "build"] }, |
8 | | - { |
9 | | - files: ["**/*.{js,jsx}"], |
10 | | - languageOptions: { |
11 | | - ecmaVersion: 2020, |
12 | | - globals: globals.browser, |
13 | | - parserOptions: { |
14 | | - ecmaVersion: "latest", |
15 | | - ecmaFeatures: { jsx: true }, |
16 | | - sourceType: "module", |
17 | | - }, |
18 | | - }, |
19 | | - plugins: { |
20 | | - "react-hooks": reactHooks, |
21 | | - "react-refresh": reactRefresh, |
22 | | - }, |
23 | | - rules: { |
24 | | - ...js.configs.recommended.rules, |
25 | | - ...reactHooks.configs.recommended.rules, |
26 | | - "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], |
27 | | - "react-refresh/only-export-components": [ |
28 | | - "warn", |
29 | | - { allowConstantExport: true }, |
30 | | - ], |
| 9 | +export default [{ ignores: ["dist", "build"] }, { |
| 10 | + files: ["**/*.{js,jsx}"], |
| 11 | + languageOptions: { |
| 12 | + ecmaVersion: 2020, |
| 13 | + globals: globals.browser, |
| 14 | + parserOptions: { |
| 15 | + ecmaVersion: "latest", |
| 16 | + ecmaFeatures: { jsx: true }, |
| 17 | + sourceType: "module", |
31 | 18 | }, |
32 | 19 | }, |
33 | | -]; |
| 20 | + plugins: { |
| 21 | + "react-hooks": reactHooks, |
| 22 | + "react-refresh": reactRefresh, |
| 23 | + }, |
| 24 | + rules: { |
| 25 | + ...js.configs.recommended.rules, |
| 26 | + ...reactHooks.configs.recommended.rules, |
| 27 | + "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], |
| 28 | + "react-refresh/only-export-components": [ |
| 29 | + "warn", |
| 30 | + { allowConstantExport: true }, |
| 31 | + ], |
| 32 | + }, |
| 33 | +}, ...storybook.configs["flat/recommended"]]; |
0 commit comments