File tree Expand file tree Collapse file tree 7 files changed +3398
-895
lines changed
Expand file tree Collapse file tree 7 files changed +3398
-895
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " nuxt-eslint-docs" ,
3- "packageManager" : " pnpm@10.12.4 " ,
3+ "packageManager" : " pnpm@10.13.1 " ,
44 "private" : true ,
55 "scripts" : {
66 "docs:dev" : " nuxi dev" ,
Original file line number Diff line number Diff line change 11{
22 "private" : true ,
33 "type" : " module" ,
4- "packageManager" : " pnpm@10.12.4 " ,
4+ "packageManager" : " pnpm@10.13.1 " ,
55 "version" : " 1.5.2" ,
66 "scripts" : {
77 "build" : " pnpm run -r build" ,
Original file line number Diff line number Diff line change 3636 },
3737 "peerDependencies" : {
3838 "eslint" : " ^9.0.0" ,
39- "eslint-plugin-format" : " *" ,
40- "eslint-plugin-import-x" : " *"
39+ "eslint-plugin-format" : " *"
4140 },
4241 "peerDependenciesMeta" : {
4342 "eslint-plugin-format" : {
4443 "optional" : true
45- },
46- "eslint-plugin-import-x" : {
47- "optional" : true
4844 }
4945 },
5046 "dependencies" : {
5955 "eslint-flat-config-utils" : " catalog:prod" ,
6056 "eslint-merge-processors" : " catalog:prod" ,
6157 "eslint-plugin-import-lite" : " catalog:prod" ,
58+ "eslint-plugin-import-x" : " catalog:prod" ,
6259 "eslint-plugin-jsdoc" : " catalog:prod" ,
6360 "eslint-plugin-regexp" : " catalog:prod" ,
6461 "eslint-plugin-unicorn" : " catalog:prod" ,
Original file line number Diff line number Diff line change 1- import pluginImportLite from 'eslint-plugin-import-lite'
21import type { Linter } from 'eslint'
32import type { NuxtESLintConfigOptions } from '../types'
43import { resolveOptions } from '../utils'
@@ -15,9 +14,9 @@ export default async function imports(options: NuxtESLintConfigOptions): Promise
1514 : resolved . features . import || { }
1615
1716 // eslint-disable-next-line @typescript-eslint/no-explicit-any
18- const plugin : any = importOptions . package === 'eslint-plugin-import-x '
19- ? ( await import ( 'eslint-plugin-import-x ' ) ) . default
20- : pluginImportLite
17+ const plugin : any = importOptions . package === 'eslint-plugin-import-lite '
18+ ? ( await import ( 'eslint-plugin-import-lite ' ) ) . default
19+ : ( await import ( 'eslint-plugin-import-x' ) ) . default
2120
2221 return [
2322 {
@@ -26,7 +25,11 @@ export default async function imports(options: NuxtESLintConfigOptions): Promise
2625 import : plugin ,
2726 } ,
2827 rules : {
29- 'import/consistent-type-specifier-style' : [ 'error' , 'top-level' ] ,
28+ ...( importOptions . package === 'eslint-plugin-import-lite'
29+ ? {
30+ 'import/consistent-type-specifier-style' : [ 'error' , 'top-level' ] ,
31+ }
32+ : { } ) ,
3033 'import/first' : 'error' ,
3134 'import/no-duplicates' : 'error' ,
3235 'import/no-mutable-exports' : 'error' ,
Original file line number Diff line number Diff line change @@ -102,10 +102,7 @@ export interface ImportPluginOptions {
102102 /**
103103 * The import plugin to use
104104 *
105- * We did not ship `eslint-plugin-import-x` as dependency,
106- * if you want to use it, you need to install it manually.
107- *
108- * @default 'eslint-plugin-import-lite'
105+ * @default 'eslint-plugin-import-x'
109106 */
110107 package ?: 'eslint-plugin-import-lite' | 'eslint-plugin-import-x'
111108}
You can’t perform that action at this time.
0 commit comments