@kikiutils/eslint-config 5.0.2 → 5.0.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","names":[],"sources":["../src/base.ts"],"sourcesContent":[],"mappings":";;;iBASgB,iBAAA,gCAAyD"}
1
+ {"version":3,"file":"base.d.ts","names":[],"sources":["../src/base.ts"],"mappings":";;;iBASgB,iBAAA,CAAkB,WAAA,oBAAuC,mBAAA"}
package/dist/base.js CHANGED
@@ -6,177 +6,183 @@ const basePerfectionistSortOptions = {
6
6
  type: "natural"
7
7
  };
8
8
  function createBaseConfigs(environment = "node") {
9
- return [{
10
- files: ["**/*.{cjs,js,mjs,ts,tsx,vue}"],
11
- plugins: { promise },
12
- rules: {
13
- "antfu/consistent-list-newline": ["error", {
14
- ArrayExpression: false,
15
- ArrayPattern: false
16
- }],
17
- "antfu/curly": "off",
18
- "antfu/if-newline": "off",
19
- "antfu/no-top-level-await": "off",
20
- "curly": ["error", "multi-line"],
21
- "max-classes-per-file": ["error", 1],
22
- "no-promise-executor-return": ["error", { allowVoid: true }],
23
- "node/prefer-global/process": ["error", "always"],
24
- "perfectionist/sort-array-includes": ["error", basePerfectionistSortOptions],
25
- "perfectionist/sort-enums": ["error", {
26
- ...basePerfectionistSortOptions,
27
- sortByValue: "never"
28
- }],
29
- "perfectionist/sort-heritage-clauses": ["error", {
30
- ignoreCase: false,
31
- type: "natural"
32
- }],
33
- "perfectionist/sort-imports": ["error", {
34
- environment,
35
- groups: [
36
- "side-effect",
37
- "side-effect-style",
38
- "style",
39
- ["value-builtin", "type-builtin"],
40
- ["value-external", "type-external"],
41
- ["value-internal", "type-internal"],
42
- ["value-parent", "type-parent"],
43
- ["value-sibling", "type-sibling"],
44
- ["value-index", "type-index"],
45
- "unknown"
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 }
46
118
  ],
47
- ignoreCase: false,
48
- internalPattern: [
49
- "^#.*",
50
- "^@/.*",
51
- "^~/.*"
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" } }
52
142
  ],
53
- type: "natural"
54
- }],
55
- "perfectionist/sort-interfaces": ["error", basePerfectionistSortOptions],
56
- "perfectionist/sort-intersection-types": ["error", basePerfectionistSortOptions],
57
- "perfectionist/sort-maps": ["error", basePerfectionistSortOptions],
58
- "perfectionist/sort-modules": ["error", {
59
- ...basePerfectionistSortOptions,
60
- groups: [
61
- "declare-type",
62
- ["export-type", "type"],
63
- "declare-interface",
64
- ["export-interface", "interface"],
65
- "declare-enum",
66
- ["enum", "export-enum"],
67
- "declare-class",
68
- ["class", "export-class"],
69
- "declare-function",
70
- ["export-function", "function"]
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
+ }
71
182
  ]
72
- }],
73
- "perfectionist/sort-object-types": ["error", basePerfectionistSortOptions],
74
- "perfectionist/sort-objects": ["error", basePerfectionistSortOptions],
75
- "perfectionist/sort-sets": ["error", basePerfectionistSortOptions],
76
- "perfectionist/sort-switch-case": ["error", {
77
- ignoreCase: false,
78
- type: "natural"
79
- }],
80
- "perfectionist/sort-union-types": ["error", basePerfectionistSortOptions],
81
- "perfectionist/sort-variable-declarations": ["error", basePerfectionistSortOptions],
82
- "promise/no-multiple-resolved": "error",
83
- "promise/no-return-in-finally": "error",
84
- "promise/no-return-wrap": "error",
85
- "require-await": "error",
86
- "style/array-bracket-newline": ["error", { multiline: true }],
87
- "style/array-element-newline": ["error", {
88
- ArrayExpression: {
89
- consistent: true,
90
- minItems: 2
91
- },
92
- ArrayPattern: { minItems: 3 }
93
- }],
94
- "style/arrow-parens": ["error", "always"],
95
- "style/brace-style": [
96
- "error",
97
- "1tbs",
98
- { allowSingleLine: false }
99
- ],
100
- "style/function-call-spacing": ["error", "never"],
101
- "style/indent": ["error", 4],
102
- "style/max-len": ["warn", {
103
- code: 120,
104
- comments: 120
105
- }],
106
- "style/member-delimiter-style": ["error", { multiline: {
107
- delimiter: "semi",
108
- requireLast: true
109
- } }],
110
- "style/no-extra-parens": [
111
- "error",
112
- "all",
113
- { nestedBinaryExpressions: false }
114
- ],
115
- "style/no-extra-semi": "error",
116
- "style/object-curly-newline": ["error", {
117
- ExportDeclaration: {
118
- minProperties: 2,
119
- multiline: true
120
- },
121
- ImportDeclaration: {
122
- minProperties: 2,
123
- multiline: true
124
- },
125
- ObjectExpression: {
126
- minProperties: 2,
127
- multiline: true
128
- },
129
- ObjectPattern: {
130
- minProperties: 3,
131
- multiline: true
132
- }
133
- }],
134
- "style/operator-linebreak": [
135
- "error",
136
- "before",
137
- { overrides: { "=": "after" } }
138
- ],
139
- "style/padding-line-between-statements": [
140
- "error",
141
- {
142
- blankLine: "always",
143
- next: [
144
- "class",
145
- "enum",
146
- "function"
147
- ],
148
- prev: "*"
149
- },
150
- {
151
- blankLine: "always",
152
- next: "*",
153
- prev: ["class", "function"]
154
- }
155
- ],
156
- "style/semi": ["error", "always"],
157
- "ts/consistent-generic-constructors": ["error", "constructor"],
158
- "ts/no-redeclare": "off"
159
- }
160
- }, {
161
- files: ["**/.vscode/*.json"],
162
- rules: {
163
- "jsonc/sort-array-values": ["error", {
164
- order: {
165
- natural: true,
166
- type: "asc"
167
- },
168
- pathPattern: "^.*$"
169
- }],
170
- "jsonc/sort-keys": [
171
- "error",
172
- "asc",
173
- {
174
- caseSensitive: true,
175
- natural: true
176
- }
177
- ]
183
+ }
178
184
  }
179
- }];
185
+ ];
180
186
  }
181
187
 
182
188
  //#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,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 'node/prefer-global/process': [\n 'error',\n 'always',\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,CACH;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,8BAA8B,CAC1B,SACA,SACH;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,EACD;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
+ {"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 +1 @@
1
- {"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"sourcesContent":[],"mappings":";;;iBAuBgB,uBAAA,CAAA,GAA2B"}
1
+ {"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"mappings":";;;iBAuBgB,uBAAA,CAAA,GAA2B,mBAAA"}
package/dist/vue.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vue.d.ts","names":[],"sources":["../src/vue.ts"],"sourcesContent":[],"mappings":";;;iBAQgB,eAAA,CAAA,GAAmB"}
1
+ {"version":3,"file":"vue.d.ts","names":[],"sources":["../src/vue.ts"],"mappings":";;;iBAQgB,eAAA,CAAA,GAAmB,mBAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kikiutils/eslint-config",
3
3
  "type": "module",
4
- "version": "5.0.2",
4
+ "version": "5.0.3",
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",
@@ -61,26 +61,26 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@antfu/eslint-config": "^7.0.0",
64
+ "@antfu/eslint-config": "^7.4.3",
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
70
  "@kikiutils/tsconfigs": "^5.0.5",
71
- "@types/node": "^25.0.8",
72
- "@vitest/coverage-v8": "^4.0.17",
71
+ "@types/node": "^25.2.3",
72
+ "@vitest/coverage-v8": "^4.0.18",
73
73
  "changelogen": "^0.6.2",
74
74
  "depcheck": "^1.4.7",
75
- "eslint-flat-config-utils": "^2.1.4",
76
- "eslint-plugin-format": "^1.3.1",
75
+ "eslint-flat-config-utils": "^3.0.1",
76
+ "eslint-plugin-format": "^1.4.0",
77
77
  "eslint-plugin-tailwindcss": "^3.18.2",
78
- "publint": "^0.3.16",
78
+ "publint": "^0.3.17",
79
79
  "ts-unused-exports": "^11.0.1",
80
- "tsdown": "^0.19.0",
80
+ "tsdown": "^0.20.3",
81
81
  "typescript": "^5.9.3",
82
- "unplugin-unused": "^0.5.6",
83
- "vitest": "^4.0.17"
82
+ "unplugin-unused": "^0.5.7",
83
+ "vitest": "^4.0.18"
84
84
  },
85
85
  "pnpm": {
86
86
  "onlyBuiltDependencies": [
package/src/base.ts CHANGED
@@ -9,6 +9,15 @@ const basePerfectionistSortOptions = {
9
9
 
10
10
  export function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {
11
11
  return [
12
+ {
13
+ files: ['**/*.{cjs,js,mjs,ts,tsx}'],
14
+ rules: {
15
+ 'node/prefer-global/process': [
16
+ 'error',
17
+ 'always',
18
+ ],
19
+ },
20
+ },
12
21
  {
13
22
  files: ['**/*.{cjs,js,mjs,ts,tsx,vue}'],
14
23
  plugins: { promise },
@@ -35,10 +44,6 @@ export function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFl
35
44
  'error',
36
45
  { allowVoid: true },
37
46
  ],
38
- 'node/prefer-global/process': [
39
- 'error',
40
- 'always',
41
- ],
42
47
  'perfectionist/sort-array-includes': [
43
48
  'error',
44
49
  basePerfectionistSortOptions,