From e2ffc66a78b6f18e0692bc0c32d4b8863adba936 Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:12:18 +0330 Subject: [PATCH] Import project configuration: cshare-app/eslint.config.js Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- cshare-app/eslint.config.js | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cshare-app/eslint.config.js diff --git a/cshare-app/eslint.config.js b/cshare-app/eslint.config.js new file mode 100644 index 0000000..04102c9 --- /dev/null +++ b/cshare-app/eslint.config.js @@ -0,0 +1,44 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{js,jsx}'], + ignores: ['**/*.test.{js,jsx}'], + extends: [ + js.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + globals: globals.browser, + parserOptions: { ecmaFeatures: { jsx: true } }, + }, + }, + { + files: ['**/*.test.{js,jsx}', 'src/test/**/*.{js,jsx}'], + extends: [js.configs.recommended], + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + ...globals.es2021, + // Vitest globals (mirrors what vitest injects with globals: true) + describe: 'readonly', + it: 'readonly', + test: 'readonly', + expect: 'readonly', + vi: 'readonly', + beforeEach: 'readonly', + afterEach: 'readonly', + beforeAll: 'readonly', + afterAll: 'readonly', + }, + parserOptions: { ecmaFeatures: { jsx: true } }, + }, + }, +])