@devapoo-dev/eslint-config 1.1.22 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +56 -50
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -122,67 +122,73 @@ export function createConfig(options, ...userConfigs) {
|
|
|
122
122
|
],
|
|
123
123
|
|
|
124
124
|
// react
|
|
125
|
-
...(options?.react
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
...(options?.react
|
|
126
|
+
? {
|
|
127
|
+
'perfectionist/sort-jsx-props': 'error',
|
|
128
|
+
'react/no-array-index-key': 'off', // Off to enable composable keys
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
130
|
+
// check-file
|
|
131
|
+
'check-file/filename-naming-convention': [
|
|
132
|
+
'error',
|
|
133
|
+
{ [JS_GLOB]: 'KEBAB_CASE', [TS_GLOB]: 'KEBAB_CASE' },
|
|
134
|
+
{ ignoreMiddleExtensions: true },
|
|
135
|
+
],
|
|
136
|
+
'check-file/folder-naming-convention': [
|
|
137
|
+
'error',
|
|
138
|
+
{ [JS_GLOB]: 'KEBAB_CASE', [TS_GLOB]: 'KEBAB_CASE' },
|
|
139
|
+
{ ignoreMiddleExtensions: true },
|
|
140
|
+
],
|
|
141
|
+
}
|
|
142
|
+
: {}),
|
|
141
143
|
|
|
142
|
-
...options?.rules,
|
|
144
|
+
...(options?.rules || {}),
|
|
143
145
|
},
|
|
144
146
|
},
|
|
145
147
|
/**
|
|
146
148
|
* React Routter 7 | Remix.run rules
|
|
147
149
|
*/
|
|
148
150
|
{
|
|
149
|
-
...(options?.remix
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
151
|
+
...(options?.remix
|
|
152
|
+
? {
|
|
153
|
+
plugins: {
|
|
154
|
+
'react-refresh': reactRefresh,
|
|
155
|
+
},
|
|
156
|
+
rules: {
|
|
157
|
+
// preconfigured rules from eslint-plugin-react-refresh https://github.com/ArnaudBarre/eslint-plugin-react-refresh/tree/main/src
|
|
158
|
+
'react-refresh/only-export-components': [
|
|
159
|
+
'error',
|
|
160
|
+
{
|
|
161
|
+
allowExportNames: [
|
|
162
|
+
'meta',
|
|
163
|
+
'links',
|
|
164
|
+
'headers',
|
|
165
|
+
'loader',
|
|
166
|
+
'action',
|
|
167
|
+
'clientLoader',
|
|
168
|
+
'clientAction',
|
|
169
|
+
'handle',
|
|
170
|
+
'middleware',
|
|
171
|
+
'shouldRevalidate',
|
|
172
|
+
],
|
|
173
|
+
},
|
|
169
174
|
],
|
|
170
175
|
},
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
}),
|
|
176
|
+
}
|
|
177
|
+
: {}),
|
|
174
178
|
},
|
|
175
179
|
{
|
|
176
|
-
...(options?.remix
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
...(options?.remix
|
|
181
|
+
? {
|
|
182
|
+
files: [
|
|
183
|
+
'**/root.tsx',
|
|
184
|
+
'**/routes/**/*.{ts,tsx}',
|
|
185
|
+
'**/middlewares/**/*.{ts,tsx}',
|
|
186
|
+
],
|
|
187
|
+
rules: {
|
|
188
|
+
'react-naming-convention/context-name': 'off',
|
|
189
|
+
},
|
|
190
|
+
}
|
|
191
|
+
: {}),
|
|
186
192
|
},
|
|
187
193
|
/**
|
|
188
194
|
* Tailwind CSS
|
|
@@ -253,6 +259,6 @@ export function createConfig(options, ...userConfigs) {
|
|
|
253
259
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
254
260
|
},
|
|
255
261
|
},
|
|
256
|
-
...userConfigs,
|
|
262
|
+
...(userConfigs || []),
|
|
257
263
|
);
|
|
258
264
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devapoo-dev/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.24",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"peerDependencies": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"eslint": "^9",
|
|
22
22
|
"typescript": "^5",
|
|
23
|
-
"@devapoo-dev/prettier-config": "0.0.
|
|
24
|
-
"@devapoo-dev/tsconfig": "0.0.
|
|
23
|
+
"@devapoo-dev/prettier-config": "0.0.15",
|
|
24
|
+
"@devapoo-dev/tsconfig": "0.0.20"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"lint": "eslint .",
|