@kikiutils/eslint-config 5.0.4 → 6.0.0

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/dist/base.js CHANGED
@@ -6,183 +6,160 @@ const basePerfectionistSortOptions = {
6
6
  type: "natural"
7
7
  };
8
8
  function createBaseConfigs(environment = "node") {
9
- return [
10
- {
11
- files: ["**/*.{cjs,js,mjs,ts,tsx}"],
12
- rules: { "node/prefer-global/process": ["error", "always"] }
13
- },
14
- {
15
- files: ["**/*.{cjs,js,mjs,ts,tsx,vue}"],
16
- plugins: { promise },
17
- rules: {
18
- "antfu/consistent-list-newline": ["error", {
19
- ArrayExpression: false,
20
- ArrayPattern: false
21
- }],
22
- "antfu/curly": "off",
23
- "antfu/if-newline": "off",
24
- "antfu/no-top-level-await": "off",
25
- "curly": ["error", "multi-line"],
26
- "max-classes-per-file": ["error", 1],
27
- "no-promise-executor-return": ["error", { allowVoid: true }],
28
- "perfectionist/sort-array-includes": ["error", basePerfectionistSortOptions],
29
- "perfectionist/sort-enums": ["error", {
30
- ...basePerfectionistSortOptions,
31
- sortByValue: "never"
32
- }],
33
- "perfectionist/sort-heritage-clauses": ["error", {
34
- ignoreCase: false,
35
- type: "natural"
36
- }],
37
- "perfectionist/sort-imports": ["error", {
38
- environment,
39
- groups: [
40
- "side-effect",
41
- "side-effect-style",
42
- "style",
43
- ["value-builtin", "type-builtin"],
44
- ["value-external", "type-external"],
45
- ["value-internal", "type-internal"],
46
- ["value-parent", "type-parent"],
47
- ["value-sibling", "type-sibling"],
48
- ["value-index", "type-index"],
49
- "unknown"
50
- ],
51
- ignoreCase: false,
52
- internalPattern: [
53
- "^#.*",
54
- "^@/.*",
55
- "^~/.*"
56
- ],
57
- type: "natural"
58
- }],
59
- "perfectionist/sort-interfaces": ["error", basePerfectionistSortOptions],
60
- "perfectionist/sort-intersection-types": ["error", basePerfectionistSortOptions],
61
- "perfectionist/sort-maps": ["error", basePerfectionistSortOptions],
62
- "perfectionist/sort-modules": ["error", {
63
- ...basePerfectionistSortOptions,
64
- groups: [
65
- "declare-type",
66
- ["export-type", "type"],
67
- "declare-interface",
68
- ["export-interface", "interface"],
69
- "declare-enum",
70
- ["enum", "export-enum"],
71
- "declare-class",
72
- ["class", "export-class"],
73
- "declare-function",
74
- ["export-function", "function"]
75
- ]
76
- }],
77
- "perfectionist/sort-object-types": ["error", basePerfectionistSortOptions],
78
- "perfectionist/sort-objects": ["error", basePerfectionistSortOptions],
79
- "perfectionist/sort-sets": ["error", basePerfectionistSortOptions],
80
- "perfectionist/sort-switch-case": ["error", {
81
- ignoreCase: false,
82
- type: "natural"
83
- }],
84
- "perfectionist/sort-union-types": ["error", basePerfectionistSortOptions],
85
- "perfectionist/sort-variable-declarations": ["error", basePerfectionistSortOptions],
86
- "promise/no-multiple-resolved": "error",
87
- "promise/no-return-in-finally": "error",
88
- "promise/no-return-wrap": "error",
89
- "require-await": "error",
90
- "style/array-bracket-newline": ["error", { multiline: true }],
91
- "style/array-element-newline": ["error", {
92
- ArrayExpression: {
93
- consistent: true,
94
- minItems: 2
95
- },
96
- ArrayPattern: { minItems: 3 }
97
- }],
98
- "style/arrow-parens": ["error", "always"],
99
- "style/brace-style": [
100
- "error",
101
- "1tbs",
102
- { allowSingleLine: false }
103
- ],
104
- "style/function-call-spacing": ["error", "never"],
105
- "style/indent": ["error", 4],
106
- "style/max-len": ["warn", {
107
- code: 120,
108
- comments: 120
109
- }],
110
- "style/member-delimiter-style": ["error", { multiline: {
111
- delimiter: "semi",
112
- requireLast: true
113
- } }],
114
- "style/no-extra-parens": [
115
- "error",
116
- "all",
117
- { nestedBinaryExpressions: false }
9
+ return [{
10
+ files: ["**/*.{cjs,js,mjs,ts,tsx}"],
11
+ rules: { "node/prefer-global/process": ["error", "always"] }
12
+ }, {
13
+ files: ["**/*.{cjs,js,mjs,ts,tsx,vue}"],
14
+ plugins: { promise },
15
+ rules: {
16
+ "antfu/consistent-list-newline": ["error", {
17
+ ArrayExpression: false,
18
+ ArrayPattern: false
19
+ }],
20
+ "antfu/curly": "off",
21
+ "antfu/if-newline": "off",
22
+ "antfu/no-top-level-await": "off",
23
+ "curly": ["error", "multi-line"],
24
+ "max-classes-per-file": ["error", 1],
25
+ "no-promise-executor-return": ["error", { allowVoid: true }],
26
+ "perfectionist/sort-array-includes": ["error", basePerfectionistSortOptions],
27
+ "perfectionist/sort-enums": ["error", {
28
+ ...basePerfectionistSortOptions,
29
+ sortByValue: "never"
30
+ }],
31
+ "perfectionist/sort-heritage-clauses": ["error", {
32
+ ignoreCase: false,
33
+ type: "natural"
34
+ }],
35
+ "perfectionist/sort-imports": ["error", {
36
+ environment,
37
+ groups: [
38
+ "side-effect",
39
+ "side-effect-style",
40
+ "style",
41
+ ["value-builtin", "type-builtin"],
42
+ ["value-external", "type-external"],
43
+ ["value-internal", "type-internal"],
44
+ ["value-parent", "type-parent"],
45
+ ["value-sibling", "type-sibling"],
46
+ ["value-index", "type-index"],
47
+ "unknown"
118
48
  ],
119
- "style/no-extra-semi": "error",
120
- "style/object-curly-newline": ["error", {
121
- ExportDeclaration: {
122
- minProperties: 2,
123
- multiline: true
124
- },
125
- ImportDeclaration: {
126
- minProperties: 2,
127
- multiline: true
128
- },
129
- ObjectExpression: {
130
- minProperties: 2,
131
- multiline: true
132
- },
133
- ObjectPattern: {
134
- minProperties: 3,
135
- multiline: true
136
- }
137
- }],
138
- "style/operator-linebreak": [
139
- "error",
140
- "before",
141
- { overrides: { "=": "after" } }
49
+ ignoreCase: false,
50
+ internalPattern: [
51
+ "^#.*",
52
+ "^@/.*",
53
+ "^~/.*"
142
54
  ],
143
- "style/padding-line-between-statements": [
144
- "error",
145
- {
146
- blankLine: "always",
147
- next: [
148
- "class",
149
- "enum",
150
- "function"
151
- ],
152
- prev: "*"
153
- },
154
- {
155
- blankLine: "always",
156
- next: "*",
157
- prev: ["class", "function"]
158
- }
159
- ],
160
- "style/semi": ["error", "always"],
161
- "ts/consistent-generic-constructors": ["error", "constructor"],
162
- "ts/no-redeclare": "off"
163
- }
164
- },
165
- {
166
- files: ["**/.vscode/*.json"],
167
- rules: {
168
- "jsonc/sort-array-values": ["error", {
169
- order: {
170
- natural: true,
171
- type: "asc"
172
- },
173
- pathPattern: "^.*$"
174
- }],
175
- "jsonc/sort-keys": [
176
- "error",
177
- "asc",
178
- {
179
- caseSensitive: true,
180
- natural: true
181
- }
55
+ type: "natural"
56
+ }],
57
+ "perfectionist/sort-interfaces": ["error", basePerfectionistSortOptions],
58
+ "perfectionist/sort-intersection-types": ["error", basePerfectionistSortOptions],
59
+ "perfectionist/sort-maps": ["error", basePerfectionistSortOptions],
60
+ "perfectionist/sort-modules": ["error", {
61
+ ...basePerfectionistSortOptions,
62
+ groups: [
63
+ "declare-type",
64
+ ["export-type", "type"],
65
+ "declare-interface",
66
+ ["export-interface", "interface"],
67
+ "declare-enum",
68
+ ["enum", "export-enum"],
69
+ "declare-class",
70
+ ["class", "export-class"],
71
+ "declare-function",
72
+ ["export-function", "function"]
182
73
  ]
183
- }
74
+ }],
75
+ "perfectionist/sort-object-types": ["error", basePerfectionistSortOptions],
76
+ "perfectionist/sort-objects": ["error", basePerfectionistSortOptions],
77
+ "perfectionist/sort-sets": ["error", basePerfectionistSortOptions],
78
+ "perfectionist/sort-switch-case": ["error", {
79
+ ignoreCase: false,
80
+ type: "natural"
81
+ }],
82
+ "perfectionist/sort-union-types": ["error", basePerfectionistSortOptions],
83
+ "perfectionist/sort-variable-declarations": ["error", basePerfectionistSortOptions],
84
+ "promise/no-multiple-resolved": "error",
85
+ "promise/no-return-in-finally": "error",
86
+ "promise/no-return-wrap": "error",
87
+ "require-await": "error",
88
+ "style/array-bracket-newline": ["error", { multiline: true }],
89
+ "style/array-element-newline": ["error", {
90
+ ArrayExpression: {
91
+ consistent: true,
92
+ minItems: 2
93
+ },
94
+ ArrayPattern: { minItems: 3 }
95
+ }],
96
+ "style/arrow-parens": ["error", "always"],
97
+ "style/brace-style": [
98
+ "error",
99
+ "1tbs",
100
+ { allowSingleLine: false }
101
+ ],
102
+ "style/function-call-spacing": ["error", "never"],
103
+ "style/indent": ["error", 4],
104
+ "style/max-len": ["warn", {
105
+ code: 120,
106
+ comments: 120
107
+ }],
108
+ "style/member-delimiter-style": ["error", { multiline: {
109
+ delimiter: "semi",
110
+ requireLast: true
111
+ } }],
112
+ "style/no-extra-parens": [
113
+ "error",
114
+ "all",
115
+ { nestedBinaryExpressions: false }
116
+ ],
117
+ "style/no-extra-semi": "error",
118
+ "style/object-curly-newline": ["error", {
119
+ ExportDeclaration: {
120
+ minProperties: 2,
121
+ multiline: true
122
+ },
123
+ ImportDeclaration: {
124
+ minProperties: 2,
125
+ multiline: true
126
+ },
127
+ ObjectExpression: {
128
+ minProperties: 2,
129
+ multiline: true
130
+ },
131
+ ObjectPattern: {
132
+ minProperties: 3,
133
+ multiline: true
134
+ }
135
+ }],
136
+ "style/operator-linebreak": [
137
+ "error",
138
+ "before",
139
+ { overrides: { "=": "after" } }
140
+ ],
141
+ "style/padding-line-between-statements": [
142
+ "error",
143
+ {
144
+ blankLine: "always",
145
+ next: [
146
+ "class",
147
+ "enum",
148
+ "function"
149
+ ],
150
+ prev: "*"
151
+ },
152
+ {
153
+ blankLine: "always",
154
+ next: "*",
155
+ prev: ["class", "function"]
156
+ }
157
+ ],
158
+ "style/semi": ["error", "always"],
159
+ "ts/consistent-generic-constructors": ["error", "constructor"],
160
+ "ts/no-redeclare": "off"
184
161
  }
185
- ];
162
+ }];
186
163
  }
187
164
 
188
165
  //#endregion
package/dist/base.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","names":[],"sources":["../src/base.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport promise from 'eslint-plugin-promise';\n\nconst basePerfectionistSortOptions = {\n ignoreCase: false,\n type: 'natural',\n} as const;\n\nexport function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {\n return [\n {\n files: ['**/*.{cjs,js,mjs,ts,tsx}'],\n rules: {\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n },\n },\n {\n files: ['**/*.{cjs,js,mjs,ts,tsx,vue}'],\n plugins: { promise },\n rules: {\n 'antfu/consistent-list-newline': [\n 'error',\n {\n ArrayExpression: false,\n ArrayPattern: false,\n },\n ],\n 'antfu/curly': 'off',\n 'antfu/if-newline': 'off',\n 'antfu/no-top-level-await': 'off',\n 'curly': [\n 'error',\n 'multi-line',\n ],\n 'max-classes-per-file': [\n 'error',\n 1,\n ],\n 'no-promise-executor-return': [\n 'error',\n { allowVoid: true },\n ],\n 'perfectionist/sort-array-includes': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-enums': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n sortByValue: 'never',\n },\n ],\n 'perfectionist/sort-heritage-clauses': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-imports': [\n 'error',\n {\n environment,\n groups: [\n 'side-effect',\n 'side-effect-style',\n 'style',\n [\n 'value-builtin',\n 'type-builtin',\n ],\n [\n 'value-external',\n 'type-external',\n ],\n [\n 'value-internal',\n 'type-internal',\n ],\n [\n 'value-parent',\n 'type-parent',\n ],\n [\n 'value-sibling',\n 'type-sibling',\n ],\n [\n 'value-index',\n 'type-index',\n ],\n 'unknown',\n ],\n ignoreCase: false,\n internalPattern: [\n '^#.*',\n '^@/.*',\n '^~/.*',\n ],\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-intersection-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-maps': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-modules': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n groups: [\n 'declare-type',\n [\n 'export-type',\n 'type',\n ],\n 'declare-interface',\n [\n 'export-interface',\n 'interface',\n ],\n 'declare-enum',\n [\n 'enum',\n 'export-enum',\n ],\n 'declare-class',\n [\n 'class',\n 'export-class',\n ],\n 'declare-function',\n [\n 'export-function',\n 'function',\n ],\n ],\n },\n ],\n 'perfectionist/sort-object-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-objects': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-sets': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-switch-case': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-union-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-variable-declarations': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'require-await': 'error',\n 'style/array-bracket-newline': [\n 'error',\n { multiline: true },\n ],\n 'style/array-element-newline': [\n 'error',\n {\n ArrayExpression: {\n consistent: true,\n minItems: 2,\n },\n ArrayPattern: { minItems: 3 },\n },\n ],\n 'style/arrow-parens': [\n 'error',\n 'always',\n ],\n 'style/brace-style': [\n 'error',\n '1tbs',\n { allowSingleLine: false },\n ],\n 'style/function-call-spacing': [\n 'error',\n 'never',\n ],\n 'style/indent': [\n 'error',\n 4,\n ],\n 'style/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n },\n ],\n 'style/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true,\n },\n },\n ],\n 'style/no-extra-parens': [\n 'error',\n 'all',\n { nestedBinaryExpressions: false },\n ],\n 'style/no-extra-semi': 'error',\n 'style/object-curly-newline': [\n 'error',\n {\n ExportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ImportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ObjectExpression: {\n minProperties: 2,\n multiline: true,\n },\n ObjectPattern: {\n minProperties: 3,\n multiline: true,\n },\n },\n ],\n 'style/operator-linebreak': [\n 'error',\n 'before',\n { overrides: { '=': 'after' } },\n ],\n 'style/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: [\n 'class',\n 'enum',\n 'function',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n next: '*',\n prev: [\n 'class',\n 'function',\n ],\n },\n ],\n 'style/semi': [\n 'error',\n 'always',\n ],\n 'ts/consistent-generic-constructors': [\n 'error',\n 'constructor',\n ],\n 'ts/no-redeclare': 'off',\n },\n },\n {\n files: ['**/.vscode/*.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: {\n natural: true,\n type: 'asc',\n },\n pathPattern: '^.*$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: true,\n natural: true,\n },\n ],\n },\n },\n ];\n}\n"],"mappings":";;;AAIA,MAAM,+BAA+B;CACjC,YAAY;CACZ,MAAM;CACT;AAED,SAAgB,kBAAkB,cAA8B,QAA+B;AAC3F,QAAO;EACH;GACI,OAAO,CAAC,2BAA2B;GACnC,OAAO,EACH,8BAA8B,CAC1B,SACA,SACH,EACJ;GACJ;EACD;GACI,OAAO,CAAC,+BAA+B;GACvC,SAAS,EAAE,SAAS;GACpB,OAAO;IACH,iCAAiC,CAC7B,SACA;KACI,iBAAiB;KACjB,cAAc;KACjB,CACJ;IACD,eAAe;IACf,oBAAoB;IACpB,4BAA4B;IAC5B,SAAS,CACL,SACA,aACH;IACD,wBAAwB,CACpB,SACA,EACH;IACD,8BAA8B,CAC1B,SACA,EAAE,WAAW,MAAM,CACtB;IACD,qCAAqC,CACjC,SACA,6BACH;IACD,4BAA4B,CACxB,SACA;KACI,GAAG;KACH,aAAa;KAChB,CACJ;IACD,uCAAuC,CACnC,SACA;KACI,YAAY;KACZ,MAAM;KACT,CACJ;IACD,8BAA8B,CAC1B,SACA;KACI;KACA,QAAQ;MACJ;MACA;MACA;MACA,CACI,iBACA,eACH;MACD,CACI,kBACA,gBACH;MACD,CACI,kBACA,gBACH;MACD,CACI,gBACA,cACH;MACD,CACI,iBACA,eACH;MACD,CACI,eACA,aACH;MACD;MACH;KACD,YAAY;KACZ,iBAAiB;MACb;MACA;MACA;MACH;KACD,MAAM;KACT,CACJ;IACD,iCAAiC,CAC7B,SACA,6BACH;IACD,yCAAyC,CACrC,SACA,6BACH;IACD,2BAA2B,CACvB,SACA,6BACH;IACD,8BAA8B,CAC1B,SACA;KACI,GAAG;KACH,QAAQ;MACJ;MACA,CACI,eACA,OACH;MACD;MACA,CACI,oBACA,YACH;MACD;MACA,CACI,QACA,cACH;MACD;MACA,CACI,SACA,eACH;MACD;MACA,CACI,mBACA,WACH;MACJ;KACJ,CACJ;IACD,mCAAmC,CAC/B,SACA,6BACH;IACD,8BAA8B,CAC1B,SACA,6BACH;IACD,2BAA2B,CACvB,SACA,6BACH;IACD,kCAAkC,CAC9B,SACA;KACI,YAAY;KACZ,MAAM;KACT,CACJ;IACD,kCAAkC,CAC9B,SACA,6BACH;IACD,4CAA4C,CACxC,SACA,6BACH;IACD,gCAAgC;IAChC,gCAAgC;IAChC,0BAA0B;IAC1B,iBAAiB;IACjB,+BAA+B,CAC3B,SACA,EAAE,WAAW,MAAM,CACtB;IACD,+BAA+B,CAC3B,SACA;KACI,iBAAiB;MACb,YAAY;MACZ,UAAU;MACb;KACD,cAAc,EAAE,UAAU,GAAG;KAChC,CACJ;IACD,sBAAsB,CAClB,SACA,SACH;IACD,qBAAqB;KACjB;KACA;KACA,EAAE,iBAAiB,OAAO;KAC7B;IACD,+BAA+B,CAC3B,SACA,QACH;IACD,gBAAgB,CACZ,SACA,EACH;IACD,iBAAiB,CACb,QACA;KACI,MAAM;KACN,UAAU;KACb,CACJ;IACD,gCAAgC,CAC5B,SACA,EACI,WAAW;KACP,WAAW;KACX,aAAa;KAChB,EACJ,CACJ;IACD,yBAAyB;KACrB;KACA;KACA,EAAE,yBAAyB,OAAO;KACrC;IACD,uBAAuB;IACvB,8BAA8B,CAC1B,SACA;KACI,mBAAmB;MACf,eAAe;MACf,WAAW;MACd;KACD,mBAAmB;MACf,eAAe;MACf,WAAW;MACd;KACD,kBAAkB;MACd,eAAe;MACf,WAAW;MACd;KACD,eAAe;MACX,eAAe;MACf,WAAW;MACd;KACJ,CACJ;IACD,4BAA4B;KACxB;KACA;KACA,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE;KAClC;IACD,yCAAyC;KACrC;KACA;MACI,WAAW;MACX,MAAM;OACF;OACA;OACA;OACH;MACD,MAAM;MACT;KACD;MACI,WAAW;MACX,MAAM;MACN,MAAM,CACF,SACA,WACH;MACJ;KACJ;IACD,cAAc,CACV,SACA,SACH;IACD,sCAAsC,CAClC,SACA,cACH;IACD,mBAAmB;IACtB;GACJ;EACD;GACI,OAAO,CAAC,oBAAoB;GAC5B,OAAO;IACH,2BAA2B,CACvB,SACA;KACI,OAAO;MACH,SAAS;MACT,MAAM;MACT;KACD,aAAa;KAChB,CACJ;IACD,mBAAmB;KACf;KACA;KACA;MACI,eAAe;MACf,SAAS;MACZ;KACJ;IACJ;GACJ;EACJ"}
1
+ {"version":3,"file":"base.js","names":[],"sources":["../src/base.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport promise from 'eslint-plugin-promise';\n\nconst basePerfectionistSortOptions = {\n ignoreCase: false,\n type: 'natural',\n} as const;\n\nexport function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {\n return [\n {\n files: ['**/*.{cjs,js,mjs,ts,tsx}'],\n rules: {\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n },\n },\n {\n files: ['**/*.{cjs,js,mjs,ts,tsx,vue}'],\n plugins: { promise },\n rules: {\n 'antfu/consistent-list-newline': [\n 'error',\n {\n ArrayExpression: false,\n ArrayPattern: false,\n },\n ],\n 'antfu/curly': 'off',\n 'antfu/if-newline': 'off',\n 'antfu/no-top-level-await': 'off',\n 'curly': [\n 'error',\n 'multi-line',\n ],\n 'max-classes-per-file': [\n 'error',\n 1,\n ],\n 'no-promise-executor-return': [\n 'error',\n { allowVoid: true },\n ],\n 'perfectionist/sort-array-includes': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-enums': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n sortByValue: 'never',\n },\n ],\n 'perfectionist/sort-heritage-clauses': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-imports': [\n 'error',\n {\n environment,\n groups: [\n 'side-effect',\n 'side-effect-style',\n 'style',\n [\n 'value-builtin',\n 'type-builtin',\n ],\n [\n 'value-external',\n 'type-external',\n ],\n [\n 'value-internal',\n 'type-internal',\n ],\n [\n 'value-parent',\n 'type-parent',\n ],\n [\n 'value-sibling',\n 'type-sibling',\n ],\n [\n 'value-index',\n 'type-index',\n ],\n 'unknown',\n ],\n ignoreCase: false,\n internalPattern: [\n '^#.*',\n '^@/.*',\n '^~/.*',\n ],\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-intersection-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-maps': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-modules': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n groups: [\n 'declare-type',\n [\n 'export-type',\n 'type',\n ],\n 'declare-interface',\n [\n 'export-interface',\n 'interface',\n ],\n 'declare-enum',\n [\n 'enum',\n 'export-enum',\n ],\n 'declare-class',\n [\n 'class',\n 'export-class',\n ],\n 'declare-function',\n [\n 'export-function',\n 'function',\n ],\n ],\n },\n ],\n 'perfectionist/sort-object-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-objects': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-sets': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-switch-case': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-union-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-variable-declarations': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'require-await': 'error',\n 'style/array-bracket-newline': [\n 'error',\n { multiline: true },\n ],\n 'style/array-element-newline': [\n 'error',\n {\n ArrayExpression: {\n consistent: true,\n minItems: 2,\n },\n ArrayPattern: { minItems: 3 },\n },\n ],\n 'style/arrow-parens': [\n 'error',\n 'always',\n ],\n 'style/brace-style': [\n 'error',\n '1tbs',\n { allowSingleLine: false },\n ],\n 'style/function-call-spacing': [\n 'error',\n 'never',\n ],\n 'style/indent': [\n 'error',\n 4,\n ],\n 'style/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n },\n ],\n 'style/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true,\n },\n },\n ],\n 'style/no-extra-parens': [\n 'error',\n 'all',\n { nestedBinaryExpressions: false },\n ],\n 'style/no-extra-semi': 'error',\n 'style/object-curly-newline': [\n 'error',\n {\n ExportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ImportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ObjectExpression: {\n minProperties: 2,\n multiline: true,\n },\n ObjectPattern: {\n minProperties: 3,\n multiline: true,\n },\n },\n ],\n 'style/operator-linebreak': [\n 'error',\n 'before',\n { overrides: { '=': 'after' } },\n ],\n 'style/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: [\n 'class',\n 'enum',\n 'function',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n next: '*',\n prev: [\n 'class',\n 'function',\n ],\n },\n ],\n 'style/semi': [\n 'error',\n 'always',\n ],\n 'ts/consistent-generic-constructors': [\n 'error',\n 'constructor',\n ],\n 'ts/no-redeclare': 'off',\n },\n },\n ];\n}\n"],"mappings":";;;AAIA,MAAM,+BAA+B;CACjC,YAAY;CACZ,MAAM;CACT;AAED,SAAgB,kBAAkB,cAA8B,QAA+B;AAC3F,QAAO,CACH;EACI,OAAO,CAAC,2BAA2B;EACnC,OAAO,EACH,8BAA8B,CAC1B,SACA,SACH,EACJ;EACJ,EACD;EACI,OAAO,CAAC,+BAA+B;EACvC,SAAS,EAAE,SAAS;EACpB,OAAO;GACH,iCAAiC,CAC7B,SACA;IACI,iBAAiB;IACjB,cAAc;IACjB,CACJ;GACD,eAAe;GACf,oBAAoB;GACpB,4BAA4B;GAC5B,SAAS,CACL,SACA,aACH;GACD,wBAAwB,CACpB,SACA,EACH;GACD,8BAA8B,CAC1B,SACA,EAAE,WAAW,MAAM,CACtB;GACD,qCAAqC,CACjC,SACA,6BACH;GACD,4BAA4B,CACxB,SACA;IACI,GAAG;IACH,aAAa;IAChB,CACJ;GACD,uCAAuC,CACnC,SACA;IACI,YAAY;IACZ,MAAM;IACT,CACJ;GACD,8BAA8B,CAC1B,SACA;IACI;IACA,QAAQ;KACJ;KACA;KACA;KACA,CACI,iBACA,eACH;KACD,CACI,kBACA,gBACH;KACD,CACI,kBACA,gBACH;KACD,CACI,gBACA,cACH;KACD,CACI,iBACA,eACH;KACD,CACI,eACA,aACH;KACD;KACH;IACD,YAAY;IACZ,iBAAiB;KACb;KACA;KACA;KACH;IACD,MAAM;IACT,CACJ;GACD,iCAAiC,CAC7B,SACA,6BACH;GACD,yCAAyC,CACrC,SACA,6BACH;GACD,2BAA2B,CACvB,SACA,6BACH;GACD,8BAA8B,CAC1B,SACA;IACI,GAAG;IACH,QAAQ;KACJ;KACA,CACI,eACA,OACH;KACD;KACA,CACI,oBACA,YACH;KACD;KACA,CACI,QACA,cACH;KACD;KACA,CACI,SACA,eACH;KACD;KACA,CACI,mBACA,WACH;KACJ;IACJ,CACJ;GACD,mCAAmC,CAC/B,SACA,6BACH;GACD,8BAA8B,CAC1B,SACA,6BACH;GACD,2BAA2B,CACvB,SACA,6BACH;GACD,kCAAkC,CAC9B,SACA;IACI,YAAY;IACZ,MAAM;IACT,CACJ;GACD,kCAAkC,CAC9B,SACA,6BACH;GACD,4CAA4C,CACxC,SACA,6BACH;GACD,gCAAgC;GAChC,gCAAgC;GAChC,0BAA0B;GAC1B,iBAAiB;GACjB,+BAA+B,CAC3B,SACA,EAAE,WAAW,MAAM,CACtB;GACD,+BAA+B,CAC3B,SACA;IACI,iBAAiB;KACb,YAAY;KACZ,UAAU;KACb;IACD,cAAc,EAAE,UAAU,GAAG;IAChC,CACJ;GACD,sBAAsB,CAClB,SACA,SACH;GACD,qBAAqB;IACjB;IACA;IACA,EAAE,iBAAiB,OAAO;IAC7B;GACD,+BAA+B,CAC3B,SACA,QACH;GACD,gBAAgB,CACZ,SACA,EACH;GACD,iBAAiB,CACb,QACA;IACI,MAAM;IACN,UAAU;IACb,CACJ;GACD,gCAAgC,CAC5B,SACA,EACI,WAAW;IACP,WAAW;IACX,aAAa;IAChB,EACJ,CACJ;GACD,yBAAyB;IACrB;IACA;IACA,EAAE,yBAAyB,OAAO;IACrC;GACD,uBAAuB;GACvB,8BAA8B,CAC1B,SACA;IACI,mBAAmB;KACf,eAAe;KACf,WAAW;KACd;IACD,mBAAmB;KACf,eAAe;KACf,WAAW;KACd;IACD,kBAAkB;KACd,eAAe;KACf,WAAW;KACd;IACD,eAAe;KACX,eAAe;KACf,WAAW;KACd;IACJ,CACJ;GACD,4BAA4B;IACxB;IACA;IACA,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE;IAClC;GACD,yCAAyC;IACrC;IACA;KACI,WAAW;KACX,MAAM;MACF;MACA;MACA;MACH;KACD,MAAM;KACT;IACD;KACI,WAAW;KACX,MAAM;KACN,MAAM,CACF,SACA,WACH;KACJ;IACJ;GACD,cAAc,CACV,SACA,SACH;GACD,sCAAsC,CAClC,SACA,cACH;GACD,mBAAmB;GACtB;EACJ,CACJ"}
package/dist/json.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { TypedFlatConfigItem } from "@antfu/eslint-config";
2
+
3
+ //#region src/json.d.ts
4
+ declare function createVsCodeJsonConfigs(): TypedFlatConfigItem[];
5
+ //#endregion
6
+ export { createVsCodeJsonConfigs };
7
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","names":[],"sources":["../src/json.ts"],"mappings":";;;iBAEgB,uBAAA,CAAA,GAA2B,mBAAA"}
package/dist/json.js ADDED
@@ -0,0 +1,27 @@
1
+ //#region src/json.ts
2
+ function createVsCodeJsonConfigs() {
3
+ return [{
4
+ files: ["**/.vscode/*.json"],
5
+ rules: {
6
+ "jsonc/sort-array-values": ["error", {
7
+ order: {
8
+ natural: true,
9
+ type: "asc"
10
+ },
11
+ pathPattern: "^.*$"
12
+ }],
13
+ "jsonc/sort-keys": [
14
+ "error",
15
+ "asc",
16
+ {
17
+ caseSensitive: true,
18
+ natural: true
19
+ }
20
+ ]
21
+ }
22
+ }];
23
+ }
24
+
25
+ //#endregion
26
+ export { createVsCodeJsonConfigs };
27
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","names":[],"sources":["../src/json.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n\nexport function createVsCodeJsonConfigs(): TypedFlatConfigItem[] {\n return [\n {\n files: ['**/.vscode/*.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: {\n natural: true,\n type: 'asc',\n },\n pathPattern: '^.*$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: true,\n natural: true,\n },\n ],\n },\n },\n ];\n}\n"],"mappings":";AAEA,SAAgB,0BAAiD;AAC7D,QAAO,CACH;EACI,OAAO,CAAC,oBAAoB;EAC5B,OAAO;GACH,2BAA2B,CACvB,SACA;IACI,OAAO;KACH,SAAS;KACT,MAAM;KACT;IACD,aAAa;IAChB,CACJ;GACD,mBAAmB;IACf;IACA;IACA;KACI,eAAe;KACf,SAAS;KACZ;IACJ;GACJ;EACJ,CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"mappings":";;;iBAuBgB,uBAAA,CAAA,GAA2B,mBAAA"}
1
+ {"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"mappings":";;;iBAsBgB,uBAAA,CAAA,GAA2B,mBAAA"}
package/dist/style.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../src/style.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error Ignore this error.\nimport format from 'eslint-plugin-format';\n\nfunction createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {\n return {\n files: [`**/*.${parser}`],\n languageOptions: { parser: format.parserPlain },\n plugins: { format },\n rules: {\n 'format/prettier': [\n 'error',\n {\n parser,\n printWidth: 120,\n singleQuote: true,\n tabWidth: 4,\n },\n ],\n },\n };\n}\n\nexport function createStyleFilesConfigs(): TypedFlatConfigItem[] {\n return [\n createPrettierCssConfig('css'),\n createPrettierCssConfig('sass'),\n createPrettierCssConfig('scss'),\n ];\n}\n"],"mappings":";;;AAIA,SAAS,wBAAwB,QAAsD;AACnF,QAAO;EACH,OAAO,CAAC,QAAQ,SAAS;EACzB,iBAAiB,EAAE,QAAQ,OAAO,aAAa;EAC/C,SAAS,EAAE,QAAQ;EACnB,OAAO,EACH,mBAAmB,CACf,SACA;GACI;GACA,YAAY;GACZ,aAAa;GACb,UAAU;GACb,CACJ,EACJ;EACJ;;AAGL,SAAgB,0BAAiD;AAC7D,QAAO;EACH,wBAAwB,MAAM;EAC9B,wBAAwB,OAAO;EAC/B,wBAAwB,OAAO;EAClC"}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../src/style.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\nimport format from 'eslint-plugin-format';\n\nfunction createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {\n return {\n files: [`**/*.${parser}`],\n languageOptions: { parser: format.parserPlain },\n plugins: { format },\n rules: {\n 'format/prettier': [\n 'error',\n {\n parser,\n printWidth: 120,\n singleQuote: true,\n tabWidth: 4,\n },\n ],\n },\n };\n}\n\nexport function createStyleFilesConfigs(): TypedFlatConfigItem[] {\n return [\n createPrettierCssConfig('css'),\n createPrettierCssConfig('sass'),\n createPrettierCssConfig('scss'),\n ];\n}\n"],"mappings":";;;AAGA,SAAS,wBAAwB,QAAsD;AACnF,QAAO;EACH,OAAO,CAAC,QAAQ,SAAS;EACzB,iBAAiB,EAAE,QAAQ,OAAO,aAAa;EAC/C,SAAS,EAAE,QAAQ;EACnB,OAAO,EACH,mBAAmB,CACf,SACA;GACI;GACA,YAAY;GACZ,aAAa;GACb,UAAU;GACb,CACJ,EACJ;EACJ;;AAGL,SAAgB,0BAAiD;AAC7D,QAAO;EACH,wBAAwB,MAAM;EAC9B,wBAAwB,OAAO;EAC/B,wBAAwB,OAAO;EAClC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kikiutils/eslint-config",
3
3
  "type": "module",
4
- "version": "5.0.4",
4
+ "version": "6.0.0",
5
5
  "description": "Using antfu/eslint-config as a base for eslint-config, slightly modified the settings and added additional plugins, mainly for my own use.",
6
6
  "author": "kiki-kanri",
7
7
  "license": "MIT",
@@ -12,8 +12,8 @@
12
12
  "keywords": [],
13
13
  "sideEffects": false,
14
14
  "exports": {
15
- "./*": "./dist/*.js",
16
- "./package.json": "./package.json"
15
+ "./package.json": "./package.json",
16
+ "./*": "./dist/*.js"
17
17
  },
18
18
  "files": [
19
19
  "./dist",
@@ -38,9 +38,9 @@
38
38
  "peerDependencies": {
39
39
  "@kikiutils/eslint-plugin-tailwindcss": "^3.19.0",
40
40
  "@kikiutils/eslint-plugin-vue": "^10.2.2",
41
- "eslint": "^9.35.0 || ^10.0.0",
42
- "eslint-flat-config-utils": "^2.1.1 || ^3.0.1",
43
- "eslint-plugin-format": "^1.4.0",
41
+ "eslint": ">= 9.0.0",
42
+ "eslint-flat-config-utils": ">= 2.0.0",
43
+ "eslint-plugin-format": ">= 1.0.0",
44
44
  "eslint-plugin-tailwindcss": "^3.18.2"
45
45
  },
46
46
  "peerDependenciesMeta": {
@@ -61,21 +61,21 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@antfu/eslint-config": "^7.4.3",
64
+ "@antfu/eslint-config": "^7.6.1",
65
65
  "eslint-plugin-promise": "^7.2.1"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@kikiutils/eslint-plugin-tailwindcss": "^3.19.0",
69
69
  "@kikiutils/eslint-plugin-vue": "^10.2.2",
70
- "@kikiutils/tsconfigs": "^5.0.5",
71
- "@types/node": "^25.2.3",
70
+ "@kikiutils/tsconfigs": "^5.1.0",
71
+ "@types/node": "^25.3.3",
72
72
  "@vitest/coverage-v8": "^4.0.18",
73
73
  "changelogen": "^0.6.2",
74
74
  "depcheck": "^1.4.7",
75
75
  "eslint-flat-config-utils": "^3.0.1",
76
- "eslint-plugin-format": "^1.4.0",
76
+ "eslint-plugin-format": "^2.0.1",
77
77
  "eslint-plugin-tailwindcss": "^3.18.2",
78
- "publint": "^0.3.17",
78
+ "publint": "^0.3.18",
79
79
  "ts-unused-exports": "^11.0.1",
80
80
  "tsdown": "^0.20.3",
81
81
  "typescript": "^5.9.3",
package/src/base.ts CHANGED
@@ -291,28 +291,5 @@ export function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFl
291
291
  'ts/no-redeclare': 'off',
292
292
  },
293
293
  },
294
- {
295
- files: ['**/.vscode/*.json'],
296
- rules: {
297
- 'jsonc/sort-array-values': [
298
- 'error',
299
- {
300
- order: {
301
- natural: true,
302
- type: 'asc',
303
- },
304
- pathPattern: '^.*$',
305
- },
306
- ],
307
- 'jsonc/sort-keys': [
308
- 'error',
309
- 'asc',
310
- {
311
- caseSensitive: true,
312
- natural: true,
313
- },
314
- ],
315
- },
316
- },
317
294
  ];
318
295
  }
package/src/json.ts ADDED
@@ -0,0 +1,29 @@
1
+ import type { TypedFlatConfigItem } from '@antfu/eslint-config';
2
+
3
+ export function createVsCodeJsonConfigs(): TypedFlatConfigItem[] {
4
+ return [
5
+ {
6
+ files: ['**/.vscode/*.json'],
7
+ rules: {
8
+ 'jsonc/sort-array-values': [
9
+ 'error',
10
+ {
11
+ order: {
12
+ natural: true,
13
+ type: 'asc',
14
+ },
15
+ pathPattern: '^.*$',
16
+ },
17
+ ],
18
+ 'jsonc/sort-keys': [
19
+ 'error',
20
+ 'asc',
21
+ {
22
+ caseSensitive: true,
23
+ natural: true,
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ ];
29
+ }
package/src/style.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { TypedFlatConfigItem } from '@antfu/eslint-config';
2
- // @ts-expect-error Ignore this error.
3
2
  import format from 'eslint-plugin-format';
4
3
 
5
4
  function createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {