@xylabs/eslint-config-flat 3.9.1 → 3.10.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/neutral/import/index.d.cts +28 -0
- package/dist/neutral/import/index.d.cts.map +1 -0
- package/dist/neutral/import/index.d.mts +28 -0
- package/dist/neutral/import/index.d.mts.map +1 -0
- package/dist/neutral/import/index.d.ts +28 -0
- package/dist/neutral/import/index.d.ts.map +1 -0
- package/dist/neutral/index.cjs +298 -0
- package/dist/neutral/index.cjs.map +1 -0
- package/dist/neutral/index.d.cts +2 -0
- package/dist/neutral/index.d.cts.map +1 -0
- package/dist/neutral/index.d.mts +2 -0
- package/dist/neutral/index.d.mts.map +1 -0
- package/dist/neutral/index.d.ts +2 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.js +265 -0
- package/dist/neutral/index.js.map +1 -0
- package/dist/neutral/json/index.d.cts +1121 -0
- package/dist/neutral/json/index.d.cts.map +1 -0
- package/dist/neutral/json/index.d.mts +1121 -0
- package/dist/neutral/json/index.d.mts.map +1 -0
- package/dist/neutral/json/index.d.ts +1121 -0
- package/dist/neutral/json/index.d.ts.map +1 -0
- package/dist/neutral/markdown/index.d.cts +3 -0
- package/dist/neutral/markdown/index.d.cts.map +1 -0
- package/dist/neutral/markdown/index.d.mts +3 -0
- package/dist/neutral/markdown/index.d.mts.map +1 -0
- package/dist/neutral/markdown/index.d.ts +3 -0
- package/dist/neutral/markdown/index.d.ts.map +1 -0
- package/dist/neutral/prettier/index.d.cts +19 -0
- package/dist/neutral/prettier/index.d.cts.map +1 -0
- package/dist/neutral/prettier/index.d.mts +19 -0
- package/dist/neutral/prettier/index.d.mts.map +1 -0
- package/dist/neutral/prettier/index.d.ts +19 -0
- package/dist/neutral/prettier/index.d.ts.map +1 -0
- package/dist/neutral/rules/index.d.cts +3 -0
- package/dist/neutral/rules/index.d.cts.map +1 -0
- package/dist/neutral/rules/index.d.mts +3 -0
- package/dist/neutral/rules/index.d.mts.map +1 -0
- package/dist/neutral/rules/index.d.ts +3 -0
- package/dist/neutral/rules/index.d.ts.map +1 -0
- package/dist/neutral/typescript/index.d.cts +2 -0
- package/dist/neutral/typescript/index.d.cts.map +1 -0
- package/dist/neutral/typescript/index.d.mts +2 -0
- package/dist/neutral/typescript/index.d.mts.map +1 -0
- package/dist/neutral/typescript/index.d.ts +2 -0
- package/dist/neutral/typescript/index.d.ts.map +1 -0
- package/dist/neutral/unicorn/index.d.cts +22 -0
- package/dist/neutral/unicorn/index.d.cts.map +1 -0
- package/dist/neutral/unicorn/index.d.mts +22 -0
- package/dist/neutral/unicorn/index.d.mts.map +1 -0
- package/dist/neutral/unicorn/index.d.ts +22 -0
- package/dist/neutral/unicorn/index.d.ts.map +1 -0
- package/dist/neutral/workspaces/index.d.cts +3 -0
- package/dist/neutral/workspaces/index.d.cts.map +1 -0
- package/dist/neutral/workspaces/index.d.mts +3 -0
- package/dist/neutral/workspaces/index.d.mts.map +1 -0
- package/dist/neutral/workspaces/index.d.ts +3 -0
- package/dist/neutral/workspaces/index.d.ts.map +1 -0
- package/dist/node/import/index.d.cts +27 -2
- package/dist/node/import/index.d.cts.map +1 -1
- package/dist/node/import/index.d.mts +27 -2
- package/dist/node/import/index.d.mts.map +1 -1
- package/dist/node/import/index.d.ts +27 -2
- package/dist/node/import/index.d.ts.map +1 -1
- package/dist/node/index.cjs +303 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +1 -3
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +1 -3
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +1 -3
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +229 -313
- package/dist/node/index.js.map +1 -1
- package/dist/node/json/index.d.cts +1120 -2
- package/dist/node/json/index.d.cts.map +1 -1
- package/dist/node/json/index.d.mts +1120 -2
- package/dist/node/json/index.d.mts.map +1 -1
- package/dist/node/json/index.d.ts +1120 -2
- package/dist/node/json/index.d.ts.map +1 -1
- package/dist/node/prettier/index.d.cts +18 -2
- package/dist/node/prettier/index.d.cts.map +1 -1
- package/dist/node/prettier/index.d.mts +18 -2
- package/dist/node/prettier/index.d.mts.map +1 -1
- package/dist/node/prettier/index.d.ts +18 -2
- package/dist/node/prettier/index.d.ts.map +1 -1
- package/dist/node/typescript/index.d.cts +1 -2
- package/dist/node/typescript/index.d.cts.map +1 -1
- package/dist/node/typescript/index.d.mts +1 -2
- package/dist/node/typescript/index.d.mts.map +1 -1
- package/dist/node/typescript/index.d.ts +1 -2
- package/dist/node/typescript/index.d.ts.map +1 -1
- package/dist/node/unicorn/index.d.cts +21 -2
- package/dist/node/unicorn/index.d.cts.map +1 -1
- package/dist/node/unicorn/index.d.mts +21 -2
- package/dist/node/unicorn/index.d.mts.map +1 -1
- package/dist/node/unicorn/index.d.ts +21 -2
- package/dist/node/unicorn/index.d.ts.map +1 -1
- package/package.json +20 -21
- package/src/import/index.ts +29 -34
- package/src/index.ts +17 -76
- package/src/json/index.ts +52 -10
- package/src/prettier/index.ts +4 -5
- package/src/types.d.ts +7 -0
- package/src/typescript/index.ts +115 -108
- package/src/unicorn/index.ts +5 -7
- package/tsconfig.json +4 -0
- package/dist/node/index.mjs +0 -319
- package/dist/node/index.mjs.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference path="../../../src/types.d.ts" />
|
|
2
|
+
import importPlugin from 'eslint-plugin-import';
|
|
3
|
+
export declare const importConfig: {
|
|
4
|
+
plugins: {
|
|
5
|
+
'simple-import-sort': import("eslint").ESLint.Plugin;
|
|
6
|
+
import: typeof importPlugin;
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
'import/default': string[];
|
|
10
|
+
'import/named': string[];
|
|
11
|
+
'import/namespace': string[];
|
|
12
|
+
'import/no-absolute-path': string[];
|
|
13
|
+
'import/no-cycle': (string | {
|
|
14
|
+
maxDepth: number;
|
|
15
|
+
})[];
|
|
16
|
+
'import/no-default-export': string[];
|
|
17
|
+
'import/no-deprecated': string[];
|
|
18
|
+
'import/no-internal-modules': string[];
|
|
19
|
+
'import/no-named-as-default': string[];
|
|
20
|
+
'import/no-named-as-default-member': string[];
|
|
21
|
+
'import/no-restricted-paths': string[];
|
|
22
|
+
'import/no-self-import': string[];
|
|
23
|
+
'import/no-useless-path-segments': string[];
|
|
24
|
+
'simple-import-sort/exports': string[];
|
|
25
|
+
'simple-import-sort/imports': string[];
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/import/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;GA0BxB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference path="../../../src/types.d.ts" />
|
|
2
|
+
import importPlugin from 'eslint-plugin-import';
|
|
3
|
+
export declare const importConfig: {
|
|
4
|
+
plugins: {
|
|
5
|
+
'simple-import-sort': import("eslint").ESLint.Plugin;
|
|
6
|
+
import: typeof importPlugin;
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
'import/default': string[];
|
|
10
|
+
'import/named': string[];
|
|
11
|
+
'import/namespace': string[];
|
|
12
|
+
'import/no-absolute-path': string[];
|
|
13
|
+
'import/no-cycle': (string | {
|
|
14
|
+
maxDepth: number;
|
|
15
|
+
})[];
|
|
16
|
+
'import/no-default-export': string[];
|
|
17
|
+
'import/no-deprecated': string[];
|
|
18
|
+
'import/no-internal-modules': string[];
|
|
19
|
+
'import/no-named-as-default': string[];
|
|
20
|
+
'import/no-named-as-default-member': string[];
|
|
21
|
+
'import/no-restricted-paths': string[];
|
|
22
|
+
'import/no-self-import': string[];
|
|
23
|
+
'import/no-useless-path-segments': string[];
|
|
24
|
+
'simple-import-sort/exports': string[];
|
|
25
|
+
'simple-import-sort/imports': string[];
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/import/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;GA0BxB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference path="../../../src/types.d.ts" />
|
|
2
|
+
import importPlugin from 'eslint-plugin-import';
|
|
3
|
+
export declare const importConfig: {
|
|
4
|
+
plugins: {
|
|
5
|
+
'simple-import-sort': import("eslint").ESLint.Plugin;
|
|
6
|
+
import: typeof importPlugin;
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
'import/default': string[];
|
|
10
|
+
'import/named': string[];
|
|
11
|
+
'import/namespace': string[];
|
|
12
|
+
'import/no-absolute-path': string[];
|
|
13
|
+
'import/no-cycle': (string | {
|
|
14
|
+
maxDepth: number;
|
|
15
|
+
})[];
|
|
16
|
+
'import/no-default-export': string[];
|
|
17
|
+
'import/no-deprecated': string[];
|
|
18
|
+
'import/no-internal-modules': string[];
|
|
19
|
+
'import/no-named-as-default': string[];
|
|
20
|
+
'import/no-named-as-default-member': string[];
|
|
21
|
+
'import/no-restricted-paths': string[];
|
|
22
|
+
'import/no-self-import': string[];
|
|
23
|
+
'import/no-useless-path-segments': string[];
|
|
24
|
+
'simple-import-sort/exports': string[];
|
|
25
|
+
'simple-import-sort/imports': string[];
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/import/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;GA0BxB,CAAA"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
config: () => config
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
|
|
37
|
+
// src/import/index.ts
|
|
38
|
+
var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"), 1);
|
|
39
|
+
var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
|
|
40
|
+
var importConfig = [
|
|
41
|
+
{
|
|
42
|
+
plugins: { "simple-import-sort": import_eslint_plugin_simple_import_sort.default, import: import_eslint_plugin_import.default },
|
|
43
|
+
rules: {
|
|
44
|
+
"import/default": ["off"],
|
|
45
|
+
"import/named": ["off"],
|
|
46
|
+
"import/namespace": ["off"],
|
|
47
|
+
"import/no-absolute-path": ["warn"],
|
|
48
|
+
"import/no-cycle": [
|
|
49
|
+
"warn",
|
|
50
|
+
{
|
|
51
|
+
maxDepth: 2
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"import/no-default-export": ["warn"],
|
|
55
|
+
"import/no-deprecated": ["warn"],
|
|
56
|
+
"import/no-internal-modules": ["warn"],
|
|
57
|
+
"import/no-named-as-default": ["warn"],
|
|
58
|
+
"import/no-named-as-default-member": ["off"],
|
|
59
|
+
"import/no-restricted-paths": ["warn"],
|
|
60
|
+
"import/no-self-import": ["warn"],
|
|
61
|
+
"import/no-useless-path-segments": ["warn"],
|
|
62
|
+
"simple-import-sort/exports": ["warn"],
|
|
63
|
+
"simple-import-sort/imports": ["warn"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// src/json/index.ts
|
|
69
|
+
var import_eslint_plugin_jsonc = __toESM(require("eslint-plugin-jsonc"), 1);
|
|
70
|
+
var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
|
|
71
|
+
var jsonConfig = [
|
|
72
|
+
{
|
|
73
|
+
files: ["**/*.json", "**/*.jsonc", "**/*.json5"],
|
|
74
|
+
plugins: {
|
|
75
|
+
jsonc: import_eslint_plugin_jsonc.default
|
|
76
|
+
},
|
|
77
|
+
languageOptions: {
|
|
78
|
+
parser: import_jsonc_eslint_parser.default,
|
|
79
|
+
parserOptions: {
|
|
80
|
+
extraFileExtensions: [".json"]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
rules: {
|
|
84
|
+
...import_eslint_plugin_jsonc.default.configs["all"].rules,
|
|
85
|
+
/// jsonc and json5 can have comments
|
|
86
|
+
"jsonc/no-comments": "off",
|
|
87
|
+
"jsonc/auto": "off",
|
|
88
|
+
/// Indent with 2 spaces
|
|
89
|
+
"jsonc/indent": ["error", 2, {}],
|
|
90
|
+
/// Support arrays with and without new lines but they can't mix
|
|
91
|
+
"jsonc/array-element-newline": ["error", "consistent"],
|
|
92
|
+
/// Don't sort keys. We want to keep the order of keys as they are:
|
|
93
|
+
/// especially in arrays.
|
|
94
|
+
"jsonc/sort-keys": "off",
|
|
95
|
+
/// Not all keys are camelCase
|
|
96
|
+
"jsonc/key-name-casing": "off",
|
|
97
|
+
/// see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html
|
|
98
|
+
"jsonc/comma-dangle": ["error", "only-multiline"]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
files: ["**/*.json"],
|
|
103
|
+
plugins: {
|
|
104
|
+
jsonc: import_eslint_plugin_jsonc.default
|
|
105
|
+
},
|
|
106
|
+
languageOptions: {
|
|
107
|
+
parser: import_eslint_plugin_jsonc.default,
|
|
108
|
+
parserOptions: {
|
|
109
|
+
extraFileExtensions: [".json"]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
rules: {
|
|
113
|
+
/// Overrides the above configuration object.
|
|
114
|
+
/// No matter how much it would be cool to have comments in json files,
|
|
115
|
+
/// it's not supported by the json spec. We get errors tools like jq and
|
|
116
|
+
/// node.
|
|
117
|
+
"jsonc/no-comments": "error"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
|
|
122
|
+
// src/prettier/index.ts
|
|
123
|
+
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
124
|
+
var prettierConfig = [{
|
|
125
|
+
plugins: { prettier: import_eslint_plugin_prettier.default },
|
|
126
|
+
rules: {
|
|
127
|
+
"prettier/prettier": [
|
|
128
|
+
"warn",
|
|
129
|
+
{
|
|
130
|
+
bracketSpacing: true,
|
|
131
|
+
endOfLine: "lf",
|
|
132
|
+
experimentalTernaries: true,
|
|
133
|
+
printWidth: 150,
|
|
134
|
+
semi: false,
|
|
135
|
+
singleQuote: true,
|
|
136
|
+
tabWidth: 2,
|
|
137
|
+
trailingComma: "all",
|
|
138
|
+
useTabs: false
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}, import_eslint_plugin_prettier.default.configs?.recommended];
|
|
143
|
+
|
|
144
|
+
// src/typescript/index.ts
|
|
145
|
+
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
146
|
+
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
147
|
+
var typescriptConfig = [
|
|
148
|
+
{
|
|
149
|
+
files: ["*.ts", "*.d.ts", "*.tsx", "*.d.tsx", "*.js", "*.d.js", "*.jsx", "*.d.jsx"],
|
|
150
|
+
languageOptions: {
|
|
151
|
+
parser: import_parser.default,
|
|
152
|
+
parserOptions: {
|
|
153
|
+
ecmaFeatures: { modules: true },
|
|
154
|
+
ecmaVersion: "latest",
|
|
155
|
+
project: "./tsconfig.json"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
plugins: {
|
|
159
|
+
"@typescript-eslint": import_eslint_plugin.default,
|
|
160
|
+
ts: import_eslint_plugin.default
|
|
161
|
+
},
|
|
162
|
+
rules: {
|
|
163
|
+
"@typescript-eslint/explicit-member-accessibility": ["warn", { accessibility: "no-public" }],
|
|
164
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
165
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
166
|
+
"error",
|
|
167
|
+
{
|
|
168
|
+
multiline: {
|
|
169
|
+
delimiter: "none",
|
|
170
|
+
requireLast: true
|
|
171
|
+
},
|
|
172
|
+
singleline: {
|
|
173
|
+
delimiter: "semi",
|
|
174
|
+
requireLast: false
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"@typescript-eslint/member-ordering": [
|
|
179
|
+
"warn",
|
|
180
|
+
{
|
|
181
|
+
default: {
|
|
182
|
+
memberTypes: [
|
|
183
|
+
"signature",
|
|
184
|
+
"call-signature",
|
|
185
|
+
"public-static-field",
|
|
186
|
+
"protected-static-field",
|
|
187
|
+
"private-static-field",
|
|
188
|
+
"public-decorated-field",
|
|
189
|
+
"protected-decorated-field",
|
|
190
|
+
"private-decorated-field",
|
|
191
|
+
"public-instance-field",
|
|
192
|
+
"protected-instance-field",
|
|
193
|
+
"private-instance-field",
|
|
194
|
+
"public-abstract-field",
|
|
195
|
+
"protected-abstract-field",
|
|
196
|
+
"public-field",
|
|
197
|
+
"protected-field",
|
|
198
|
+
"private-field",
|
|
199
|
+
"static-field",
|
|
200
|
+
"instance-field",
|
|
201
|
+
"abstract-field",
|
|
202
|
+
"decorated-field",
|
|
203
|
+
"field",
|
|
204
|
+
"public-constructor",
|
|
205
|
+
"protected-constructor",
|
|
206
|
+
"private-constructor",
|
|
207
|
+
"constructor",
|
|
208
|
+
["public-static-get", "public-static-set"],
|
|
209
|
+
["protected-static-get", "protected-static-set"],
|
|
210
|
+
["private-static-get", "private-static-set"],
|
|
211
|
+
["public-decorated-get", "public-decorated-set"],
|
|
212
|
+
["protected-decorated-get", "protected-decorated-set"],
|
|
213
|
+
["private-decorated-get", "private-decorated-set"],
|
|
214
|
+
["public-instance-get", "public-instance-set"],
|
|
215
|
+
["protected-instance-get", "protected-instance-set"],
|
|
216
|
+
["private-instance-get", "private-instance-set"],
|
|
217
|
+
["public-abstract-get", "public-abstract-set"],
|
|
218
|
+
["protected-abstract-get", "protected-abstract-set"],
|
|
219
|
+
["public-get", "public-set"],
|
|
220
|
+
["protected-get", "protected-set"],
|
|
221
|
+
["private-get", "private-set"],
|
|
222
|
+
["static-get", "static-set"],
|
|
223
|
+
["instance-get", "instance-set"],
|
|
224
|
+
["abstract-get", "abstract-set"],
|
|
225
|
+
["decorated-get", "decorated-set"],
|
|
226
|
+
"get",
|
|
227
|
+
"set",
|
|
228
|
+
"public-static-method",
|
|
229
|
+
"protected-static-method",
|
|
230
|
+
"private-static-method",
|
|
231
|
+
"public-decorated-method",
|
|
232
|
+
"protected-decorated-method",
|
|
233
|
+
"private-decorated-method",
|
|
234
|
+
"public-instance-method",
|
|
235
|
+
"protected-instance-method",
|
|
236
|
+
"private-instance-method",
|
|
237
|
+
"public-abstract-method",
|
|
238
|
+
"protected-abstract-method",
|
|
239
|
+
"public-method",
|
|
240
|
+
"protected-method",
|
|
241
|
+
"private-method",
|
|
242
|
+
"static-method",
|
|
243
|
+
"instance-method",
|
|
244
|
+
"abstract-method",
|
|
245
|
+
"decorated-method",
|
|
246
|
+
"method"
|
|
247
|
+
],
|
|
248
|
+
order: "alphabetically"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
253
|
+
"@typescript-eslint/no-misused-promises": "error",
|
|
254
|
+
"@typescript-eslint/no-unused-vars": [
|
|
255
|
+
"warn",
|
|
256
|
+
{
|
|
257
|
+
argsIgnorePattern: "^_"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"@typescript-eslint/semi": ["warn", "never"]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
];
|
|
264
|
+
|
|
265
|
+
// src/unicorn/index.ts
|
|
266
|
+
var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
|
|
267
|
+
var unicornConfig = [
|
|
268
|
+
{
|
|
269
|
+
plugins: { unicorn: import_eslint_plugin_unicorn.default },
|
|
270
|
+
rules: {
|
|
271
|
+
"unicorn/catch-error-name": ["off"],
|
|
272
|
+
"unicorn/consistent-function-scoping": ["off"],
|
|
273
|
+
"unicorn/filename-case": ["off"],
|
|
274
|
+
"unicorn/new-for-builtins": ["off"],
|
|
275
|
+
"unicorn/no-array-callback-reference": ["off"],
|
|
276
|
+
"unicorn/no-await-expression-member": ["off"],
|
|
277
|
+
"unicorn/no-nested-ternary": ["off"],
|
|
278
|
+
"unicorn/no-null": ["off"],
|
|
279
|
+
"unicorn/number-literal-case": ["off"],
|
|
280
|
+
"unicorn/prefer-module": ["off"],
|
|
281
|
+
"unicorn/prefer-top-level-await": ["off"],
|
|
282
|
+
"unicorn/prevent-abbreviations": ["off"]
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
];
|
|
286
|
+
|
|
287
|
+
// src/index.ts
|
|
288
|
+
var config = [
|
|
289
|
+
...importConfig,
|
|
290
|
+
...jsonConfig,
|
|
291
|
+
...typescriptConfig,
|
|
292
|
+
//workspacesConfig,
|
|
293
|
+
//rulesConfig,
|
|
294
|
+
...importConfig,
|
|
295
|
+
...prettierConfig,
|
|
296
|
+
...unicornConfig
|
|
297
|
+
];
|
|
298
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/import/index.ts","../../src/json/index.ts","../../src/prettier/index.ts","../../src/typescript/index.ts","../../src/unicorn/index.ts"],"sourcesContent":["import { ESLint } from 'eslint'\n// eslint-disable-next-line import/no-internal-modules\n\nimport { importConfig } from './import/index.js'\nimport { jsonConfig } from './json/index.js'\n//import { markdownConfig } from './markdown'\nimport { prettierConfig } from './prettier/index.js'\nimport { rulesConfig } from './rules/index.js'\nimport { typescriptConfig } from './typescript/index.js'\nimport { unicornConfig } from './unicorn/index.js'\nimport { workspacesConfig } from './workspaces/index.js'\n\nexport const config = [\n ...importConfig,\n ...jsonConfig,\n ...typescriptConfig,\n //workspacesConfig,\n //rulesConfig,\n ...importConfig,\n ...prettierConfig,\n ...unicornConfig,\n]\n\n","import simpleImportSort from 'eslint-plugin-simple-import-sort'\nimport importPlugin from 'eslint-plugin-import'\n\nexport const importConfig = [\n {\n plugins: {'simple-import-sort': simpleImportSort, import: importPlugin},\n rules: {\n 'import/default': ['off'],\n 'import/named': ['off'],\n 'import/namespace': ['off'],\n 'import/no-absolute-path': ['warn'],\n 'import/no-cycle': [\n 'warn',\n {\n maxDepth: 2,\n },\n ],\n 'import/no-default-export': ['warn'],\n 'import/no-deprecated': ['warn'],\n 'import/no-internal-modules': ['warn'],\n 'import/no-named-as-default': ['warn'],\n 'import/no-named-as-default-member': ['off'],\n 'import/no-restricted-paths': ['warn'],\n 'import/no-self-import': ['warn'],\n 'import/no-useless-path-segments': ['warn'],\n 'simple-import-sort/exports': ['warn'],\n 'simple-import-sort/imports': ['warn'],\n }\n }\n]\n","import jsonc from 'eslint-plugin-jsonc'\nimport jsoncParser from 'jsonc-eslint-parser'\n\nexport const jsonConfig = [\n {\n files: ['**/*.json', '**/*.jsonc', '**/*.json5'],\n plugins: {\n jsonc,\n },\n languageOptions: {\n parser: jsoncParser,\n parserOptions: {\n extraFileExtensions: ['.json'],\n }\n },\n rules: {\n ...jsonc.configs['all'].rules,\n /// jsonc and json5 can have comments\n 'jsonc/no-comments': 'off',\n 'jsonc/auto': 'off',\n /// Indent with 2 spaces\n 'jsonc/indent': ['error', 2, {}],\n /// Support arrays with and without new lines but they can't mix\n 'jsonc/array-element-newline': ['error', 'consistent'],\n /// Don't sort keys. We want to keep the order of keys as they are:\n /// especially in arrays.\n 'jsonc/sort-keys': 'off',\n /// Not all keys are camelCase\n 'jsonc/key-name-casing': 'off',\n /// see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html\n 'jsonc/comma-dangle': ['error', 'only-multiline'],\n },\n },\n {\n files: ['**/*.json'],\n plugins: {\n jsonc,\n },\n languageOptions: {\n parser: jsonc,\n parserOptions: {\n extraFileExtensions: ['.json'],\n }\n },\n rules: {\n /// Overrides the above configuration object.\n /// No matter how much it would be cool to have comments in json files,\n /// it's not supported by the json spec. We get errors tools like jq and\n /// node.\n 'jsonc/no-comments': 'error'\n },\n }\n]\n","import prettier from 'eslint-plugin-prettier'\n\nexport const prettierConfig= [{\n plugins: {prettier},\n rules: {\n 'prettier/prettier': [\n 'warn',\n {\n bracketSpacing: true,\n endOfLine: 'lf',\n experimentalTernaries: true,\n printWidth: 150,\n semi: false,\n singleQuote: true,\n tabWidth: 2,\n trailingComma: 'all',\n useTabs: false,\n },\n ],\n },\n}, prettier.configs?.recommended]\n","import ts from '@typescript-eslint/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\n\nexport const typescriptConfig: any[] = [\n {\n files: ['*.ts', '*.d.ts', '*.tsx', '*.d.tsx', '*.js', '*.d.js', '*.jsx', '*.d.jsx'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig.json',\n },\n },\n plugins: {\n '@typescript-eslint': ts,\n ts,\n },\n rules: {\n '@typescript-eslint/explicit-member-accessibility': ['warn', { accessibility: 'no-public' }],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'none',\n requireLast: true,\n },\n singleline: {\n delimiter: 'semi',\n requireLast: false,\n },\n },\n ],\n '@typescript-eslint/member-ordering': [\n 'warn',\n {\n default: {\n memberTypes: [\n 'signature',\n 'call-signature',\n 'public-static-field',\n 'protected-static-field',\n 'private-static-field',\n 'public-decorated-field',\n 'protected-decorated-field',\n 'private-decorated-field',\n 'public-instance-field',\n 'protected-instance-field',\n 'private-instance-field',\n 'public-abstract-field',\n 'protected-abstract-field',\n 'public-field',\n 'protected-field',\n 'private-field',\n 'static-field',\n 'instance-field',\n 'abstract-field',\n 'decorated-field',\n 'field',\n 'public-constructor',\n 'protected-constructor',\n 'private-constructor',\n 'constructor',\n ['public-static-get', 'public-static-set'],\n ['protected-static-get', 'protected-static-set'],\n ['private-static-get', 'private-static-set'],\n ['public-decorated-get', 'public-decorated-set'],\n ['protected-decorated-get', 'protected-decorated-set'],\n ['private-decorated-get', 'private-decorated-set'],\n ['public-instance-get', 'public-instance-set'],\n ['protected-instance-get', 'protected-instance-set'],\n ['private-instance-get', 'private-instance-set'],\n ['public-abstract-get', 'public-abstract-set'],\n ['protected-abstract-get', 'protected-abstract-set'],\n ['public-get', 'public-set'],\n ['protected-get', 'protected-set'],\n ['private-get', 'private-set'],\n ['static-get', 'static-set'],\n ['instance-get', 'instance-set'],\n ['abstract-get', 'abstract-set'],\n ['decorated-get', 'decorated-set'],\n 'get',\n 'set',\n 'public-static-method',\n 'protected-static-method',\n 'private-static-method',\n 'public-decorated-method',\n 'protected-decorated-method',\n 'private-decorated-method',\n 'public-instance-method',\n 'protected-instance-method',\n 'private-instance-method',\n 'public-abstract-method',\n 'protected-abstract-method',\n 'public-method',\n 'protected-method',\n 'private-method',\n 'static-method',\n 'instance-method',\n 'abstract-method',\n 'decorated-method',\n 'method',\n ],\n order: 'alphabetically',\n },\n },\n ],\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': 'error',\n '@typescript-eslint/no-unused-vars': [\n 'warn',\n {\n argsIgnorePattern: '^_',\n },\n ],\n '@typescript-eslint/semi': ['warn', 'never'],\n },\n },\n]\n","import unicorn from 'eslint-plugin-unicorn'\n\nexport const unicornConfig = [\n {\n plugins: {unicorn},\n rules: {\n 'unicorn/catch-error-name': ['off'],\n 'unicorn/consistent-function-scoping': ['off'],\n 'unicorn/filename-case': ['off'],\n 'unicorn/new-for-builtins': ['off'],\n 'unicorn/no-array-callback-reference': ['off'],\n 'unicorn/no-await-expression-member': ['off'],\n 'unicorn/no-nested-ternary': ['off'],\n 'unicorn/no-null': ['off'],\n 'unicorn/number-literal-case': ['off'],\n 'unicor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G;AACL;","names":["simpleImportSort","importPlugin","jsonc","jsoncParser","prettier","tsParser","ts","unicorn"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,OASlB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,OASlB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,OASlB,CAAA"}
|