-
Notifications
You must be signed in to change notification settings - Fork 5
/
eslint.config.mjs
42 lines (39 loc) · 1.14 KB
/
eslint.config.mjs
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
import eslint from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
import tseslint from 'typescript-eslint'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import panda from '@pandacss/eslint-plugin'
const compat = new FlatCompat()
export default tseslint.config({
files: ['**/*.ts', '**/*.tsx'],
ignores: [
'**/*.d.ts',
'styled-system',
// Ignore panda errors cause that's what we're here for
// 'src/App.tsx',
],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...compat.config(reactHooks.configs.recommended),
],
plugins: {
'@pandacss': panda,
'react-refresh': reactRefresh,
},
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
},
},
rules: {
...panda.configs.recommended.rules,
'@pandacss/no-margin-properties': 'warn',
'@pandacss/no-physical-properties': 'error',
'@pandacss/no-hardcoded-color': ['error', { noOpacity: true }],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
})