@@ -9,12 +9,7 @@ import globals from 'globals'
99
1010export  default  tseslint . config ( 
1111  { 
12-     ignores : [ 
13-       '**/dist/**' , 
14-       '**/playground-temp/**' , 
15-       '**/temp/**' , 
16-       'packages/plugin-rsc/**' , 
17-     ] , 
12+     ignores : [ '**/dist/**' ,  '**/playground-temp/**' ,  '**/temp/**' ] , 
1813  } , 
1914  eslint . configs . recommended , 
2015  ...tseslint . configs . recommended , 
@@ -168,4 +163,83 @@ export default tseslint.config(
168163      '@typescript-eslint/triple-slash-reference' : 'off' , 
169164    } , 
170165  } , 
166+   { 
167+     name : 'plugin-rsc/import-sorting-only' , 
168+     files : [ 'packages/plugin-rsc/**/*.?([cm])[jt]s?(x)' ] , 
169+     plugins : { 
170+       'import-x' : pluginImportX , 
171+     } , 
172+     rules : { 
173+       // Disable all existing rules from the main config 
174+       eqeqeq : 'off' , 
175+       'no-debugger' : 'off' , 
176+       'no-empty' : 'off' , 
177+       'no-empty-pattern' : 'off' , 
178+       'no-constant-condition' : 'off' , 
179+       'no-extra-boolean-cast' : 'off' , 
180+       'prefer-const' : 'off' , 
181+       'prefer-spread' : 'off' , 
182+ 
183+       // Disable Node.js plugin rules 
184+       'n/no-process-exit' : 'off' , 
185+       'n/no-deprecated-api' : 'off' , 
186+       'n/no-unpublished-import' : 'off' , 
187+       'n/no-unpublished-require' : 'off' , 
188+       'n/no-unsupported-features/es-syntax' : 'off' , 
189+       'n/no-unsupported-features/node-builtins' : 'off' , 
190+       'n/no-unsupported-features/es-builtins' : 'off' , 
191+       'n/no-missing-import' : 'off' , 
192+       'n/no-missing-require' : 'off' , 
193+       'n/no-extraneous-import' : 'off' , 
194+       'n/no-extraneous-require' : 'off' , 
195+ 
196+       // Disable TypeScript rules 
197+       '@typescript-eslint/explicit-module-boundary-types' : 'off' , 
198+       '@typescript-eslint/no-empty-function' : 'off' , 
199+       '@typescript-eslint/no-empty-interface' : 'off' , 
200+       '@typescript-eslint/no-explicit-any' : 'off' , 
201+       '@typescript-eslint/no-extra-semi' : 'off' , 
202+       '@typescript-eslint/no-inferrable-types' : 'off' , 
203+       '@typescript-eslint/no-unused-vars' : 'off' , 
204+       '@typescript-eslint/no-var-requires' : 'off' , 
205+       '@typescript-eslint/consistent-type-imports' : 'off' , 
206+       '@typescript-eslint/array-type' : 'off' , 
207+       '@typescript-eslint/consistent-type-definitions' : 'off' , 
208+       '@typescript-eslint/prefer-for-of' : 'off' , 
209+       '@typescript-eslint/prefer-function-type' : 'off' , 
210+       '@typescript-eslint/consistent-indexed-object-style' : 'off' , 
211+       '@typescript-eslint/triple-slash-reference' : 'off' , 
212+       '@typescript-eslint/ban-ts-comment' : 'off' , 
213+       '@typescript-eslint/no-unused-expressions' : 'off' , 
214+       '@typescript-eslint/no-unsafe-function-type' : 'off' , 
215+       '@typescript-eslint/no-namespace' : 'off' , 
216+ 
217+       // Disable regexp rules 
218+       'regexp/prefer-regexp-exec' : 'off' , 
219+       'regexp/prefer-regexp-test' : 'off' , 
220+       'regexp/use-ignore-case' : 'off' , 
221+       'regexp/no-super-linear-backtracking' : 'off' , 
222+       'regexp/no-unused-capturing-group' : 'off' , 
223+ 
224+       // Disable other import rules except the ones we want 
225+       'import-x/no-nodejs-modules' : 'off' , 
226+ 
227+       // Disable globals restriction 
228+       'no-restricted-globals' : 'off' , 
229+ 
230+       // Enable only import sorting related rules 
231+       'import-x/no-duplicates' : 'error' , 
232+       'import-x/order' : 'error' , 
233+       'sort-imports' : [ 
234+         'error' , 
235+         { 
236+           ignoreCase : false , 
237+           ignoreDeclarationSort : true , 
238+           ignoreMemberSort : false , 
239+           memberSyntaxSortOrder : [ 'none' ,  'all' ,  'multiple' ,  'single' ] , 
240+           allowSeparatedGroups : false , 
241+         } , 
242+       ] , 
243+     } , 
244+   } , 
171245) 
0 commit comments