users/ryan/modules/simple-bar/simple-bar-source/eslint.config.mjs
181f59e7219fa3cfed36c05773ac6a8dc40e5571
· 1.2 KB · 52 lines
raw
| 1 | // eslint.config.js |
| 2 | import js from "@eslint/js"; |
| 3 | import globals from "globals"; |
| 4 | import reactPlugin from "eslint-plugin-react"; |
| 5 | import reactHooks from "eslint-plugin-react-hooks"; |
| 6 | |
| 7 | export default [ |
| 8 | { |
| 9 | files: ["**/*.{js,jsx}"], |
| 10 | languageOptions: { |
| 11 | ecmaVersion: 12, |
| 12 | sourceType: "module", |
| 13 | globals: { |
| 14 | ...globals.browser, |
| 15 | }, |
| 16 | parserOptions: { |
| 17 | ecmaFeatures: { |
| 18 | jsx: true, |
| 19 | }, |
| 20 | }, |
| 21 | }, |
| 22 | plugins: { |
| 23 | react: reactPlugin, |
| 24 | "react-hooks": reactHooks, |
| 25 | }, |
| 26 | rules: { |
| 27 | // Base ESLint recommended rules |
| 28 | ...js.configs.recommended.rules, |
| 29 | |
| 30 | // React recommended rules |
| 31 | ...reactPlugin.configs.recommended.rules, |
| 32 | |
| 33 | // React hooks recommended rules |
| 34 | ...reactHooks.configs.recommended.rules, |
| 35 | |
| 36 | // Your custom rules |
| 37 | "no-console": "warn", |
| 38 | "react/prop-types": "off", |
| 39 | "react/react-in-jsx-scope": "off", |
| 40 | "react-hooks/rules-of-hooks": "error", |
| 41 | "react-hooks/exhaustive-deps": "warn", |
| 42 | "react-hooks/preserve-manual-memoization": "off", |
| 43 | "react-hooks/immutability": "off", |
| 44 | "react/no-unescaped-entities": "off", |
| 45 | }, |
| 46 | settings: { |
| 47 | react: { |
| 48 | version: "18.0", |
| 49 | }, |
| 50 | }, |
| 51 | }, |
| 52 | ]; |