|
1 | | -import js from '@eslint/js' |
2 | | -import globals from 'globals' |
3 | | -import reactHooks from 'eslint-plugin-react-hooks' |
4 | | -import reactRefresh from 'eslint-plugin-react-refresh' |
5 | | -import { defineConfig, globalIgnores } from 'eslint/config' |
| 1 | +import js from "@eslint/js"; |
| 2 | +import globals from "globals"; |
| 3 | +import { defineConfig, globalIgnores } from "eslint/config"; |
| 4 | +import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; |
| 5 | +// Future scope for additional plugins |
| 6 | +// import reactHooks from "eslint-plugin-react-hooks"; |
| 7 | +// import reactRefresh from "eslint-plugin-react-refresh"; |
6 | 8 |
|
7 | 9 | export default defineConfig([ |
8 | | - globalIgnores(['dist']), |
| 10 | + globalIgnores(["dist"]), |
9 | 11 | { |
10 | | - files: ['**/*.{js,jsx}'], |
| 12 | + files: ["**/*.{js,jsx}"], |
11 | 13 | extends: [ |
12 | 14 | js.configs.recommended, |
13 | | - reactHooks.configs['recommended-latest'], |
14 | | - reactRefresh.configs.vite, |
| 15 | + eslintPluginPrettierRecommended, |
| 16 | + // reactHooks.configs["recommended-latest"], |
| 17 | + // reactRefresh.configs.vite, |
15 | 18 | ], |
16 | 19 | languageOptions: { |
17 | 20 | ecmaVersion: 2020, |
18 | | - globals: globals.browser, |
| 21 | + globals: { |
| 22 | + ...globals.browser, |
| 23 | + ...globals.node, |
| 24 | + myCustomGlobal: "readonly", |
| 25 | + }, |
19 | 26 | parserOptions: { |
20 | | - ecmaVersion: 'latest', |
| 27 | + ecmaVersion: "latest", |
21 | 28 | ecmaFeatures: { jsx: true }, |
22 | | - sourceType: 'module', |
| 29 | + sourceType: "module", |
23 | 30 | }, |
24 | 31 | }, |
25 | 32 | rules: { |
26 | | - 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], |
| 33 | + "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], |
27 | 34 | }, |
28 | 35 | }, |
29 | | -]) |
| 36 | +]); |
0 commit comments