Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
90 lines (89 loc) · 2.32 KB
/
Copy patheslint.config.mjs
File metadata and controls
90 lines (89 loc) · 2.32 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import devupUi from '@devup-ui/eslint-plugin'
import devup from 'eslint-plugin-devup'
import eslintPlugin from 'eslint-plugin-eslint-plugin'
import jsonc from 'eslint-plugin-jsonc'
import globals from 'globals'
export default [
{
ignores: [
'benchmark/next-panda-css/styled-system',
'bindings/devup-ui-wasm/pkg',
'test-results',
'release-results.json',
'release-package-build.json',
],
},
// eslint-plugin-devup
...devup.configs.recommended.filter(
(config) => !('plugins' in config && '@devup-ui' in config.plugins),
),
// eslint-plugin-jsonc
...jsonc.configs['flat/recommended-with-json'],
...jsonc.configs['flat/recommended-with-jsonc'],
// globals (node, browser, builtin)
{
files: ['**/*.{js,mjs,cjs}'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.builtin,
},
},
rules: {
// js require import allowed
'@typescript-eslint/no-require-imports': 'off',
},
},
// benchmark no console rules
{
files: ['benchmark.js'],
rules: {
'no-console': [
'error',
{
allow: ['info', 'debug', 'warn', 'error', 'profile', 'profileEnd'],
},
],
},
},
// create-style-context.mjs no children prop
{
files: ['**/*.mjs'],
rules: {
'@eslint-react/jsx-no-children-prop': 'off',
},
},
// eslint-plugin rule
{
...eslintPlugin.configs.recommended,
files: ['packages/eslint-plugin/**/*.{js,jsx,ts,tsx}'],
},
{
ignores: ['**/*.md'],
},
...devupUi.configs.recommended,
// Published APIs and React 18 fixtures must not migrate to React 19-only APIs.
// https://eslint-react.xyz/docs/configuration/configure-analyzer#version
{
files: [
'packages/react/**',
'packages/components/**',
'apps/react-18/**',
// These examples document supported input for the dual-major library.
'apps/landing/src/app/(detail)/docs/migration/styled-components/page.mdx/**',
],
settings: {
'react-x': {
version: '18.0.0',
},
},
},
// the snippets of this page are .css.ts stylesheets, which the build runs as they are
{
files: ['apps/landing/src/app/(detail)/docs/migration/vanilla-extract/**'],
rules: {
'@devup-ui/css-utils-literal-only': 'off',
},
},
]