@siberiacancode/eslint 2.15.1 → 2.15.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,195 +1,203 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const antfu = require("@antfu/eslint-config");
4
- const pluginNext = require("@next/eslint-plugin-next");
5
- const pluginJsxA11y = require("eslint-plugin-jsx-a11y");
6
- const pluginReact = require("eslint-plugin-react");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) {
14
+ __defProp(to, key, {
15
+ get: ((k) => from[k]).bind(null, key),
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ }
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target, mod));
27
+
28
+ //#endregion
29
+ let _antfu_eslint_config = require("@antfu/eslint-config");
30
+ _antfu_eslint_config = __toESM(_antfu_eslint_config);
31
+ let eslint_plugin_jsx_a11y = require("eslint-plugin-jsx-a11y");
32
+ eslint_plugin_jsx_a11y = __toESM(eslint_plugin_jsx_a11y);
33
+ let eslint_plugin_react = require("eslint-plugin-react");
34
+ eslint_plugin_react = __toESM(eslint_plugin_react);
35
+
36
+ //#region src/index.ts
7
37
  const eslint = (inputOptions = {}, ...configs) => {
8
- const { jsxA11y = false, next = false, ...options } = inputOptions;
9
- const stylistic = options?.stylistic ?? false;
10
- if (next) {
11
- const nextRules = pluginNext.configs.recommended.rules ?? {};
12
- configs.unshift({
13
- name: "siberiacancode/next",
14
- plugins: {
15
- "siberiacancode-next": pluginNext
16
- },
17
- rules: {
18
- ...Object.entries(nextRules).reduce((acc, [key, value]) => {
19
- acc[key.replace("@next/next", "siberiacancode-next")] = value;
20
- return acc;
21
- }, {})
22
- }
23
- });
24
- }
25
- if (jsxA11y) {
26
- const jsxA11yRules = pluginJsxA11y.flatConfigs.recommended.rules;
27
- configs.unshift({
28
- name: "siberiacancode/jsx-a11y",
29
- plugins: {
30
- "siberiacancode-jsx-a11y": pluginJsxA11y
31
- },
32
- rules: {
33
- ...Object.entries(jsxA11yRules).reduce((acc, [key, value]) => {
34
- acc[key.replace("jsx-a11y", "siberiacancode-jsx-a11y")] = value;
35
- return acc;
36
- }, {})
37
- }
38
- });
39
- }
40
- if (options.react) {
41
- configs.unshift({
42
- name: "siberiacancode/react",
43
- plugins: {
44
- "siberiacancode-react": pluginReact
45
- },
46
- rules: {
47
- ...Object.entries(pluginReact.configs.recommended.rules).reduce(
48
- (acc, [key, value]) => {
49
- acc[key.replace("react", "siberiacancode-react")] = value;
50
- return acc;
51
- },
52
- {}
53
- ),
54
- "siberiacancode-react/function-component-definition": [
55
- "error",
56
- {
57
- namedComponents: ["arrow-function"],
58
- unnamedComponents: "arrow-function"
59
- }
60
- ],
61
- "siberiacancode-react/prop-types": "off",
62
- "siberiacancode-react/react-in-jsx-scope": "off"
63
- },
64
- settings: {
65
- react: {
66
- version: "detect"
67
- }
68
- }
69
- });
70
- }
71
- if (stylistic) {
72
- configs.unshift({
73
- name: "siberiacancode/formatter",
74
- rules: {
75
- "style/arrow-parens": ["error", "always"],
76
- "style/brace-style": "off",
77
- "style/comma-dangle": ["error", "never"],
78
- "style/indent": ["error", 2, { SwitchCase: 1 }],
79
- "style/jsx-curly-newline": "off",
80
- "style/jsx-one-expression-per-line": "off",
81
- "style/jsx-quotes": ["error", "prefer-single"],
82
- "style/linebreak-style": ["error", "unix"],
83
- "style/max-len": [
84
- "error",
85
- 100,
86
- 2,
87
- { ignoreComments: true, ignoreStrings: true, ignoreTemplateLiterals: true }
88
- ],
89
- "style/member-delimiter-style": "off",
90
- "style/multiline-ternary": "off",
91
- "style/no-tabs": "error",
92
- "style/operator-linebreak": "off",
93
- "style/quote-props": "off",
94
- "style/quotes": ["error", "single", { allowTemplateLiterals: true }],
95
- "style/semi": ["error", "always"]
96
- }
97
- });
98
- }
99
- return antfu(
100
- { ...options, stylistic },
101
- {
102
- name: "siberiacancode/rewrite",
103
- rules: {
104
- "antfu/curly": "off",
105
- "antfu/if-newline": "off",
106
- "antfu/top-level-function": "off",
107
- "no-console": "warn",
108
- "react-hooks/exhaustive-deps": "off",
109
- "test/prefer-lowercase-title": "off"
110
- }
111
- },
112
- {
113
- name: "siberiacancode/sort",
114
- rules: {
115
- "perfectionist/sort-array-includes": [
116
- "error",
117
- {
118
- order: "asc",
119
- type: "alphabetical"
120
- }
121
- ],
122
- "perfectionist/sort-imports": [
123
- "error",
124
- {
125
- groups: [
126
- "type-import",
127
- ["value-builtin", "value-external"],
128
- "type-internal",
129
- "value-internal",
130
- ["type-parent", "type-sibling", "type-index"],
131
- ["value-parent", "value-sibling", "value-index"],
132
- "side-effect",
133
- "side-effect-style",
134
- "unknown"
135
- ],
136
- internalPattern: ["^~/.*", "^@/.*"],
137
- newlinesBetween: 1,
138
- order: "asc",
139
- type: "natural"
140
- }
141
- ],
142
- "perfectionist/sort-interfaces": [
143
- "error",
144
- {
145
- groups: ["property", "member", "method", "index-signature"],
146
- order: "asc",
147
- type: "alphabetical"
148
- }
149
- ],
150
- "perfectionist/sort-jsx-props": [
151
- "error",
152
- {
153
- customGroups: [
154
- {
155
- groupName: "reserved",
156
- elementNamePattern: "^(key|ref)$"
157
- },
158
- {
159
- groupName: "callback",
160
- elementNamePattern: "^on[A-Z].*"
161
- }
162
- ],
163
- groups: ["shorthand", "reserved", "multiline", "unknown", "callback"],
164
- order: "asc",
165
- type: "alphabetical"
166
- }
167
- ],
168
- "perfectionist/sort-union-types": [
169
- "error",
170
- {
171
- groups: [
172
- "conditional",
173
- "function",
174
- "import",
175
- "intersection",
176
- "keyword",
177
- "literal",
178
- "named",
179
- "object",
180
- "operator",
181
- "tuple",
182
- "union",
183
- "nullish"
184
- ],
185
- order: "asc",
186
- specialCharacters: "keep",
187
- type: "alphabetical"
188
- }
189
- ]
190
- }
191
- },
192
- ...configs
193
- );
38
+ const { jsxA11y = false, ...options } = inputOptions;
39
+ const stylistic = options?.stylistic ?? false;
40
+ if (jsxA11y) {
41
+ const jsxA11yRules = eslint_plugin_jsx_a11y.default.flatConfigs.recommended.rules;
42
+ configs.unshift({
43
+ name: "siberiacancode/jsx-a11y",
44
+ plugins: { "siberiacancode-jsx-a11y": eslint_plugin_jsx_a11y.default },
45
+ rules: { ...Object.entries(jsxA11yRules).reduce((acc, [key, value]) => {
46
+ acc[key.replace("jsx-a11y", "siberiacancode-jsx-a11y")] = value;
47
+ return acc;
48
+ }, {}) }
49
+ });
50
+ }
51
+ if (options.react) configs.unshift({
52
+ name: "siberiacancode/react",
53
+ plugins: { "siberiacancode-react": eslint_plugin_react.default },
54
+ rules: {
55
+ ...Object.entries(eslint_plugin_react.default.configs.recommended.rules).reduce((acc, [key, value]) => {
56
+ acc[key.replace("react", "siberiacancode-react")] = value;
57
+ return acc;
58
+ }, {}),
59
+ "siberiacancode-react/function-component-definition": ["error", {
60
+ namedComponents: ["arrow-function"],
61
+ unnamedComponents: "arrow-function"
62
+ }],
63
+ "siberiacancode-react/prop-types": "off",
64
+ "siberiacancode-react/react-in-jsx-scope": "off"
65
+ },
66
+ settings: { react: { version: "detect" } }
67
+ });
68
+ if (stylistic) configs.unshift({
69
+ name: "siberiacancode/formatter",
70
+ rules: {
71
+ "style/arrow-parens": ["error", "always"],
72
+ "style/brace-style": "off",
73
+ "style/comma-dangle": ["error", "never"],
74
+ "style/indent": [
75
+ "error",
76
+ 2,
77
+ { SwitchCase: 1 }
78
+ ],
79
+ "style/jsx-curly-newline": "off",
80
+ "style/jsx-one-expression-per-line": "off",
81
+ "style/jsx-quotes": ["error", "prefer-single"],
82
+ "style/linebreak-style": ["error", "unix"],
83
+ "style/max-len": [
84
+ "error",
85
+ 100,
86
+ 2,
87
+ {
88
+ ignoreComments: true,
89
+ ignoreStrings: true,
90
+ ignoreTemplateLiterals: true
91
+ }
92
+ ],
93
+ "style/member-delimiter-style": "off",
94
+ "style/multiline-ternary": "off",
95
+ "style/no-tabs": "error",
96
+ "style/operator-linebreak": "off",
97
+ "style/quote-props": "off",
98
+ "style/quotes": [
99
+ "error",
100
+ "single",
101
+ { allowTemplateLiterals: true }
102
+ ],
103
+ "style/semi": ["error", "always"]
104
+ }
105
+ });
106
+ return (0, _antfu_eslint_config.default)({
107
+ ...options,
108
+ stylistic
109
+ }, {
110
+ name: "siberiacancode/rewrite",
111
+ rules: {
112
+ "antfu/curly": "off",
113
+ "antfu/if-newline": "off",
114
+ "antfu/top-level-function": "off",
115
+ "no-console": "warn",
116
+ "react-hooks/exhaustive-deps": "off",
117
+ "test/prefer-lowercase-title": "off"
118
+ }
119
+ }, {
120
+ name: "siberiacancode/sort",
121
+ rules: {
122
+ "perfectionist/sort-array-includes": ["error", {
123
+ order: "asc",
124
+ type: "alphabetical"
125
+ }],
126
+ "perfectionist/sort-imports": ["error", {
127
+ groups: [
128
+ "type-import",
129
+ ["value-builtin", "value-external"],
130
+ "type-internal",
131
+ "value-internal",
132
+ [
133
+ "type-parent",
134
+ "type-sibling",
135
+ "type-index"
136
+ ],
137
+ [
138
+ "value-parent",
139
+ "value-sibling",
140
+ "value-index"
141
+ ],
142
+ "side-effect",
143
+ "side-effect-style",
144
+ "unknown"
145
+ ],
146
+ internalPattern: ["^~/.*", "^@/.*"],
147
+ newlinesBetween: 1,
148
+ order: "asc",
149
+ type: "natural"
150
+ }],
151
+ "perfectionist/sort-interfaces": ["error", {
152
+ groups: [
153
+ "property",
154
+ "member",
155
+ "method",
156
+ "index-signature"
157
+ ],
158
+ order: "asc",
159
+ type: "alphabetical"
160
+ }],
161
+ "perfectionist/sort-jsx-props": ["error", {
162
+ customGroups: [{
163
+ groupName: "reserved",
164
+ elementNamePattern: "^(key|ref)$"
165
+ }, {
166
+ groupName: "callback",
167
+ elementNamePattern: "^on[A-Z].*"
168
+ }],
169
+ groups: [
170
+ "shorthand-prop",
171
+ "reserved",
172
+ "multiline-prop",
173
+ "unknown",
174
+ "callback"
175
+ ],
176
+ order: "asc",
177
+ type: "alphabetical"
178
+ }],
179
+ "perfectionist/sort-union-types": ["error", {
180
+ groups: [
181
+ "conditional",
182
+ "function",
183
+ "import",
184
+ "intersection",
185
+ "keyword",
186
+ "literal",
187
+ "named",
188
+ "object",
189
+ "operator",
190
+ "tuple",
191
+ "union",
192
+ "nullish"
193
+ ],
194
+ order: "asc",
195
+ specialCharacters: "keep",
196
+ type: "alphabetical"
197
+ }]
198
+ }
199
+ }, ...configs);
194
200
  };
195
- exports.eslint = eslint;
201
+
202
+ //#endregion
203
+ exports.eslint = eslint;
@@ -0,0 +1,12 @@
1
+ import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
2
+ import { Linter } from "eslint";
3
+ import { FlatConfigComposer } from "eslint-flat-config-utils";
4
+
5
+ //#region src/index.d.ts
6
+ type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
7
+ jsxA11y?: boolean;
8
+ };
9
+ type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
10
+ declare const eslint: Eslint;
11
+ //#endregion
12
+ export { Eslint, eslint };
@@ -0,0 +1,12 @@
1
+ import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
2
+ import { Linter } from "eslint";
3
+ import { FlatConfigComposer } from "eslint-flat-config-utils";
4
+
5
+ //#region src/index.d.ts
6
+ type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
7
+ jsxA11y?: boolean;
8
+ };
9
+ type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
10
+ declare const eslint: Eslint;
11
+ //#endregion
12
+ export { Eslint, eslint };
@@ -1,195 +1,172 @@
1
1
  import antfu from "@antfu/eslint-config";
2
- import pluginNext from "@next/eslint-plugin-next";
3
2
  import pluginJsxA11y from "eslint-plugin-jsx-a11y";
4
3
  import pluginReact from "eslint-plugin-react";
4
+
5
+ //#region src/index.ts
5
6
  const eslint = (inputOptions = {}, ...configs) => {
6
- const { jsxA11y = false, next = false, ...options } = inputOptions;
7
- const stylistic = options?.stylistic ?? false;
8
- if (next) {
9
- const nextRules = pluginNext.configs.recommended.rules ?? {};
10
- configs.unshift({
11
- name: "siberiacancode/next",
12
- plugins: {
13
- "siberiacancode-next": pluginNext
14
- },
15
- rules: {
16
- ...Object.entries(nextRules).reduce((acc, [key, value]) => {
17
- acc[key.replace("@next/next", "siberiacancode-next")] = value;
18
- return acc;
19
- }, {})
20
- }
21
- });
22
- }
23
- if (jsxA11y) {
24
- const jsxA11yRules = pluginJsxA11y.flatConfigs.recommended.rules;
25
- configs.unshift({
26
- name: "siberiacancode/jsx-a11y",
27
- plugins: {
28
- "siberiacancode-jsx-a11y": pluginJsxA11y
29
- },
30
- rules: {
31
- ...Object.entries(jsxA11yRules).reduce((acc, [key, value]) => {
32
- acc[key.replace("jsx-a11y", "siberiacancode-jsx-a11y")] = value;
33
- return acc;
34
- }, {})
35
- }
36
- });
37
- }
38
- if (options.react) {
39
- configs.unshift({
40
- name: "siberiacancode/react",
41
- plugins: {
42
- "siberiacancode-react": pluginReact
43
- },
44
- rules: {
45
- ...Object.entries(pluginReact.configs.recommended.rules).reduce(
46
- (acc, [key, value]) => {
47
- acc[key.replace("react", "siberiacancode-react")] = value;
48
- return acc;
49
- },
50
- {}
51
- ),
52
- "siberiacancode-react/function-component-definition": [
53
- "error",
54
- {
55
- namedComponents: ["arrow-function"],
56
- unnamedComponents: "arrow-function"
57
- }
58
- ],
59
- "siberiacancode-react/prop-types": "off",
60
- "siberiacancode-react/react-in-jsx-scope": "off"
61
- },
62
- settings: {
63
- react: {
64
- version: "detect"
65
- }
66
- }
67
- });
68
- }
69
- if (stylistic) {
70
- configs.unshift({
71
- name: "siberiacancode/formatter",
72
- rules: {
73
- "style/arrow-parens": ["error", "always"],
74
- "style/brace-style": "off",
75
- "style/comma-dangle": ["error", "never"],
76
- "style/indent": ["error", 2, { SwitchCase: 1 }],
77
- "style/jsx-curly-newline": "off",
78
- "style/jsx-one-expression-per-line": "off",
79
- "style/jsx-quotes": ["error", "prefer-single"],
80
- "style/linebreak-style": ["error", "unix"],
81
- "style/max-len": [
82
- "error",
83
- 100,
84
- 2,
85
- { ignoreComments: true, ignoreStrings: true, ignoreTemplateLiterals: true }
86
- ],
87
- "style/member-delimiter-style": "off",
88
- "style/multiline-ternary": "off",
89
- "style/no-tabs": "error",
90
- "style/operator-linebreak": "off",
91
- "style/quote-props": "off",
92
- "style/quotes": ["error", "single", { allowTemplateLiterals: true }],
93
- "style/semi": ["error", "always"]
94
- }
95
- });
96
- }
97
- return antfu(
98
- { ...options, stylistic },
99
- {
100
- name: "siberiacancode/rewrite",
101
- rules: {
102
- "antfu/curly": "off",
103
- "antfu/if-newline": "off",
104
- "antfu/top-level-function": "off",
105
- "no-console": "warn",
106
- "react-hooks/exhaustive-deps": "off",
107
- "test/prefer-lowercase-title": "off"
108
- }
109
- },
110
- {
111
- name: "siberiacancode/sort",
112
- rules: {
113
- "perfectionist/sort-array-includes": [
114
- "error",
115
- {
116
- order: "asc",
117
- type: "alphabetical"
118
- }
119
- ],
120
- "perfectionist/sort-imports": [
121
- "error",
122
- {
123
- groups: [
124
- "type-import",
125
- ["value-builtin", "value-external"],
126
- "type-internal",
127
- "value-internal",
128
- ["type-parent", "type-sibling", "type-index"],
129
- ["value-parent", "value-sibling", "value-index"],
130
- "side-effect",
131
- "side-effect-style",
132
- "unknown"
133
- ],
134
- internalPattern: ["^~/.*", "^@/.*"],
135
- newlinesBetween: 1,
136
- order: "asc",
137
- type: "natural"
138
- }
139
- ],
140
- "perfectionist/sort-interfaces": [
141
- "error",
142
- {
143
- groups: ["property", "member", "method", "index-signature"],
144
- order: "asc",
145
- type: "alphabetical"
146
- }
147
- ],
148
- "perfectionist/sort-jsx-props": [
149
- "error",
150
- {
151
- customGroups: [
152
- {
153
- groupName: "reserved",
154
- elementNamePattern: "^(key|ref)$"
155
- },
156
- {
157
- groupName: "callback",
158
- elementNamePattern: "^on[A-Z].*"
159
- }
160
- ],
161
- groups: ["shorthand", "reserved", "multiline", "unknown", "callback"],
162
- order: "asc",
163
- type: "alphabetical"
164
- }
165
- ],
166
- "perfectionist/sort-union-types": [
167
- "error",
168
- {
169
- groups: [
170
- "conditional",
171
- "function",
172
- "import",
173
- "intersection",
174
- "keyword",
175
- "literal",
176
- "named",
177
- "object",
178
- "operator",
179
- "tuple",
180
- "union",
181
- "nullish"
182
- ],
183
- order: "asc",
184
- specialCharacters: "keep",
185
- type: "alphabetical"
186
- }
187
- ]
188
- }
189
- },
190
- ...configs
191
- );
192
- };
193
- export {
194
- eslint
7
+ const { jsxA11y = false, ...options } = inputOptions;
8
+ const stylistic = options?.stylistic ?? false;
9
+ if (jsxA11y) {
10
+ const jsxA11yRules = pluginJsxA11y.flatConfigs.recommended.rules;
11
+ configs.unshift({
12
+ name: "siberiacancode/jsx-a11y",
13
+ plugins: { "siberiacancode-jsx-a11y": pluginJsxA11y },
14
+ rules: { ...Object.entries(jsxA11yRules).reduce((acc, [key, value]) => {
15
+ acc[key.replace("jsx-a11y", "siberiacancode-jsx-a11y")] = value;
16
+ return acc;
17
+ }, {}) }
18
+ });
19
+ }
20
+ if (options.react) configs.unshift({
21
+ name: "siberiacancode/react",
22
+ plugins: { "siberiacancode-react": pluginReact },
23
+ rules: {
24
+ ...Object.entries(pluginReact.configs.recommended.rules).reduce((acc, [key, value]) => {
25
+ acc[key.replace("react", "siberiacancode-react")] = value;
26
+ return acc;
27
+ }, {}),
28
+ "siberiacancode-react/function-component-definition": ["error", {
29
+ namedComponents: ["arrow-function"],
30
+ unnamedComponents: "arrow-function"
31
+ }],
32
+ "siberiacancode-react/prop-types": "off",
33
+ "siberiacancode-react/react-in-jsx-scope": "off"
34
+ },
35
+ settings: { react: { version: "detect" } }
36
+ });
37
+ if (stylistic) configs.unshift({
38
+ name: "siberiacancode/formatter",
39
+ rules: {
40
+ "style/arrow-parens": ["error", "always"],
41
+ "style/brace-style": "off",
42
+ "style/comma-dangle": ["error", "never"],
43
+ "style/indent": [
44
+ "error",
45
+ 2,
46
+ { SwitchCase: 1 }
47
+ ],
48
+ "style/jsx-curly-newline": "off",
49
+ "style/jsx-one-expression-per-line": "off",
50
+ "style/jsx-quotes": ["error", "prefer-single"],
51
+ "style/linebreak-style": ["error", "unix"],
52
+ "style/max-len": [
53
+ "error",
54
+ 100,
55
+ 2,
56
+ {
57
+ ignoreComments: true,
58
+ ignoreStrings: true,
59
+ ignoreTemplateLiterals: true
60
+ }
61
+ ],
62
+ "style/member-delimiter-style": "off",
63
+ "style/multiline-ternary": "off",
64
+ "style/no-tabs": "error",
65
+ "style/operator-linebreak": "off",
66
+ "style/quote-props": "off",
67
+ "style/quotes": [
68
+ "error",
69
+ "single",
70
+ { allowTemplateLiterals: true }
71
+ ],
72
+ "style/semi": ["error", "always"]
73
+ }
74
+ });
75
+ return antfu({
76
+ ...options,
77
+ stylistic
78
+ }, {
79
+ name: "siberiacancode/rewrite",
80
+ rules: {
81
+ "antfu/curly": "off",
82
+ "antfu/if-newline": "off",
83
+ "antfu/top-level-function": "off",
84
+ "no-console": "warn",
85
+ "react-hooks/exhaustive-deps": "off",
86
+ "test/prefer-lowercase-title": "off"
87
+ }
88
+ }, {
89
+ name: "siberiacancode/sort",
90
+ rules: {
91
+ "perfectionist/sort-array-includes": ["error", {
92
+ order: "asc",
93
+ type: "alphabetical"
94
+ }],
95
+ "perfectionist/sort-imports": ["error", {
96
+ groups: [
97
+ "type-import",
98
+ ["value-builtin", "value-external"],
99
+ "type-internal",
100
+ "value-internal",
101
+ [
102
+ "type-parent",
103
+ "type-sibling",
104
+ "type-index"
105
+ ],
106
+ [
107
+ "value-parent",
108
+ "value-sibling",
109
+ "value-index"
110
+ ],
111
+ "side-effect",
112
+ "side-effect-style",
113
+ "unknown"
114
+ ],
115
+ internalPattern: ["^~/.*", "^@/.*"],
116
+ newlinesBetween: 1,
117
+ order: "asc",
118
+ type: "natural"
119
+ }],
120
+ "perfectionist/sort-interfaces": ["error", {
121
+ groups: [
122
+ "property",
123
+ "member",
124
+ "method",
125
+ "index-signature"
126
+ ],
127
+ order: "asc",
128
+ type: "alphabetical"
129
+ }],
130
+ "perfectionist/sort-jsx-props": ["error", {
131
+ customGroups: [{
132
+ groupName: "reserved",
133
+ elementNamePattern: "^(key|ref)$"
134
+ }, {
135
+ groupName: "callback",
136
+ elementNamePattern: "^on[A-Z].*"
137
+ }],
138
+ groups: [
139
+ "shorthand-prop",
140
+ "reserved",
141
+ "multiline-prop",
142
+ "unknown",
143
+ "callback"
144
+ ],
145
+ order: "asc",
146
+ type: "alphabetical"
147
+ }],
148
+ "perfectionist/sort-union-types": ["error", {
149
+ groups: [
150
+ "conditional",
151
+ "function",
152
+ "import",
153
+ "intersection",
154
+ "keyword",
155
+ "literal",
156
+ "named",
157
+ "object",
158
+ "operator",
159
+ "tuple",
160
+ "union",
161
+ "nullish"
162
+ ],
163
+ order: "asc",
164
+ specialCharacters: "keep",
165
+ type: "alphabetical"
166
+ }]
167
+ }
168
+ }, ...configs);
195
169
  };
170
+
171
+ //#endregion
172
+ export { eslint };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@siberiacancode/eslint",
3
3
  "type": "module",
4
- "version": "2.15.1",
4
+ "version": "2.15.3",
5
5
  "description": "eslint configs",
6
6
  "author": {
7
7
  "name": "SIBERIA CAN CODE 🧊",
@@ -28,21 +28,25 @@
28
28
  },
29
29
  "exports": {
30
30
  ".": {
31
- "types": "./dist/types/index.d.ts",
32
- "import": "./dist/esm/index.mjs",
33
- "require": "./dist/cjs/index.cjs",
34
- "default": "./dist/cjs/index.cjs"
31
+ "import": {
32
+ "types": "./dist/esm/index.d.mts",
33
+ "default": "./dist/esm/index.mjs"
34
+ },
35
+ "require": {
36
+ "types": "./dist/cjs/index.d.cts",
37
+ "default": "./dist/cjs/index.cjs"
38
+ }
35
39
  }
36
40
  },
37
41
  "main": "dist/cjs/index.cjs",
38
42
  "module": "dist/esm/index.mjs",
39
- "types": "dist/types/index.d.ts",
43
+ "types": "dist/esm/index.d.mts",
40
44
  "files": [
41
- "dist/**/*"
45
+ "dist"
42
46
  ],
43
47
  "scripts": {
44
48
  "prepublishOnly": "yarn type && yarn build",
45
- "build": "shx rm -rf dist && vite build",
49
+ "build": "tsdown",
46
50
  "lint": "eslint . --fix",
47
51
  "lint-inspector": "npx @eslint/config-inspector",
48
52
  "type": "tsc --noEmit",
@@ -50,22 +54,20 @@
50
54
  "pretty": "yarn type && yarn lint && yarn format"
51
55
  },
52
56
  "dependencies": {
53
- "@antfu/eslint-config": "7.3.0",
54
- "@eslint-react/eslint-plugin": "2.12.2",
57
+ "@antfu/eslint-config": "7.6.1",
58
+ "@eslint-react/eslint-plugin": "2.13.0",
55
59
  "@next/eslint-plugin-next": "16.1.6",
56
60
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
57
- "@vue/compiler-sfc": "3.5.27",
58
- "eslint": "10.0.0",
61
+ "@vue/compiler-sfc": "3.5.29",
62
+ "eslint": "10.0.2",
59
63
  "eslint-flat-config-utils": "^3.0.1",
60
64
  "eslint-plugin-jsx-a11y": "6.10.2",
61
65
  "eslint-plugin-react": "7.37.5",
62
66
  "eslint-plugin-react-hooks": "7.0.1",
63
- "eslint-plugin-react-refresh": "0.5.0"
67
+ "eslint-plugin-react-refresh": "0.5.2"
64
68
  },
65
69
  "devDependencies": {
66
- "@siberiacancode/prettier": "*",
67
- "vite": "^7.3.1",
68
- "vite-plugin-dts": "^4.5.4"
70
+ "@siberiacancode/prettier": "*"
69
71
  },
70
72
  "lint-staged": {
71
73
  "*.{js,ts}": [
@@ -1,10 +0,0 @@
1
- import { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config';
2
- import { Linter } from 'eslint';
3
- import { FlatConfigComposer } from 'eslint-flat-config-utils';
4
- type EslintOptions = OptionsConfig & TypedFlatConfigItem & {
5
- jsxA11y?: boolean;
6
- next?: boolean;
7
- };
8
- export type Eslint = (options?: EslintOptions, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
9
- export declare const eslint: Eslint;
10
- export {};