Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
49 lines (48 loc) · 1.83 KB
/
Copy patheslint.config.js
File metadata and controls
49 lines (48 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
rules: {
'@typescript-eslint/no-explicit-any': 'off'
},
},
// Relaxed overrides for third-party /library code in src/lib
// This prevents the project's strict TS/ESLint rules from blocking imported OSS
// packages placed under `src/lib/*`. We intentionally turn off some type-aware
// rules here; keep the core recommended rules for the rest of the repo.
{
files: ['src/lib/**/*.{ts,tsx}'],
// Turn off a subset of rules that are commonly problematic for bundled OSS code
// or examples that are not authored to your project's strict standards.
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-misused-promises': 'off',
// Let TypeScript/IDE handle unused imports/vars in this folder if desired
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off'
}
},
])