-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
101 lines (101 loc) · 2.32 KB
/
.eslintrc.cjs
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
91
92
93
94
95
96
97
98
99
100
101
/** @type {import('@types/eslint').Linter.Config} */
module.exports = {
root: true,
env: { browser: true, es2020: true, node: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:@pandacss/recommended",
"plugin:perfectionist/recommended-natural",
"prettier",
],
ignorePatterns: [
"dist",
".eslintrc.cjs",
"styled-system",
"node_modules",
"!**/*.{js,jsx,cjs,mjs,ts,tsx}",
],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh", "react", "perfectionist"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"react/display-name": "off",
"perfectionist/sort-imports": [
"error",
{
type: "natural",
order: "asc",
groups: [
"side-effect",
["builtin-type", "builtin"],
["external-type", "external"],
["internal-type", "internal"],
["parent-type", "parent"],
["sibling-type", "sibling"],
["index-type", "index"],
"object",
"unknown",
],
"internal-pattern": ["@modules/**", "@styled-system/**", "~/**"],
"newlines-between": "always",
},
],
"perfectionist/sort-exports": [
"error",
{
type: "natural",
order: "asc",
},
],
"perfectionist/sort-named-exports": [
"error",
{
type: "natural",
order: "asc",
"group-kind": "types-first",
},
],
"perfectionist/sort-named-imports": [
"error",
{
type: "natural",
order: "asc",
"group-kind": "types-first",
},
],
"perfectionist/sort-jsx-props": [
"error",
{
type: "natural",
order: "asc",
},
],
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json", "./tsconfig.node.json"],
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: "detect",
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: true,
},
},
};