|
| 1 | +import js from "@eslint/js"; |
| 2 | +import tseslint from "@typescript-eslint/eslint-plugin"; |
| 3 | +import tsParser from "@typescript-eslint/parser"; |
| 4 | +import prettierPlugin from "eslint-plugin-prettier"; |
| 5 | +import reactPlugin from "eslint-plugin-react"; |
| 6 | +import reactHooksPlugin from "eslint-plugin-react-hooks"; |
| 7 | +import storybookPlugin from "eslint-plugin-storybook"; |
| 8 | + |
| 9 | +import globals from "globals"; |
| 10 | + |
| 11 | +export default [ |
| 12 | + { |
| 13 | + languageOptions: { |
| 14 | + parser: tsParser, |
| 15 | + globals: { |
| 16 | + ...globals.browser, |
| 17 | + ...globals.node, |
| 18 | + ...globals.jest, |
| 19 | + }, |
| 20 | + }, |
| 21 | + |
| 22 | + plugins: { |
| 23 | + "@typescript-eslint": tseslint, |
| 24 | + react: reactPlugin, |
| 25 | + "react-hooks": reactHooksPlugin, |
| 26 | + storybook: storybookPlugin, |
| 27 | + prettier: prettierPlugin, |
| 28 | + }, |
| 29 | + |
| 30 | + rules: { |
| 31 | + ...js.configs.recommended.rules, |
| 32 | + ...reactPlugin.configs.recommended.rules, |
| 33 | + ...tseslint.configs.recommended.rules, |
| 34 | + ...tseslint.configs["eslint-recommended"].rules, |
| 35 | + ...prettierPlugin.configs.recommended.rules, |
| 36 | + ...reactHooksPlugin.configs.recommended.rules, |
| 37 | + ...storybookPlugin.configs.recommended.rules, |
| 38 | + "react/react-in-jsx-scope": "off", |
| 39 | + }, |
| 40 | + }, |
| 41 | +]; |
0 commit comments