@luxass/eslint-config 4.2.5 → 4.2.7
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/README.md +35 -54
- package/dist/index.cjs +166 -479
- package/dist/index.d.cts +733 -12
- package/dist/index.d.ts +733 -12
- package/dist/{configs/index.cjs → index.js} +300 -542
- package/package.json +51 -86
- package/dist/chunk-4YBQZLPS.mjs +0 -68
- package/dist/chunk-4YT54JFZ.mjs +0 -48
- package/dist/chunk-5NK24IKQ.mjs +0 -26
- package/dist/chunk-6T7MXPCT.mjs +0 -17
- package/dist/chunk-7ODEIBF5.mjs +0 -144
- package/dist/chunk-AQRBQAKE.mjs +0 -48
- package/dist/chunk-DAJA5AV3.mjs +0 -29
- package/dist/chunk-DCOLHWHC.mjs +0 -269
- package/dist/chunk-DVQQVCGF.mjs +0 -45
- package/dist/chunk-EHWA727G.mjs +0 -69
- package/dist/chunk-FNOIGW47.mjs +0 -104
- package/dist/chunk-KOXCJL3C.mjs +0 -109
- package/dist/chunk-MMSZW2UW.mjs +0 -92
- package/dist/chunk-MT5P5EKH.mjs +0 -207
- package/dist/chunk-O2BXTQHK.mjs +0 -117
- package/dist/chunk-QDSV5ONX.mjs +0 -93
- package/dist/chunk-QMGT2Z63.mjs +0 -57
- package/dist/chunk-RVSUTDCE.mjs +0 -57
- package/dist/chunk-SPD4DGYN.mjs +0 -274
- package/dist/chunk-UITQW3RA.mjs +0 -293
- package/dist/chunk-V57HXOSW.mjs +0 -81
- package/dist/chunk-WDSV2EFG.mjs +0 -7
- package/dist/chunk-WOBGA3K2.mjs +0 -63
- package/dist/chunk-WSQOWO67.mjs +0 -16
- package/dist/chunk-XBASVDU6.mjs +0 -215
- package/dist/chunk-XPKGXA67.mjs +0 -183
- package/dist/chunk-YGZJUKJC.mjs +0 -0
- package/dist/chunk-YO3IYQ2L.mjs +0 -220
- package/dist/configs/astro.cjs +0 -179
- package/dist/configs/astro.d.cts +0 -11
- package/dist/configs/astro.d.ts +0 -11
- package/dist/configs/astro.mjs +0 -8
- package/dist/configs/comments.cjs +0 -63
- package/dist/configs/comments.d.cts +0 -15
- package/dist/configs/comments.d.ts +0 -15
- package/dist/configs/comments.mjs +0 -6
- package/dist/configs/formatters.cjs +0 -274
- package/dist/configs/formatters.d.cts +0 -11
- package/dist/configs/formatters.d.ts +0 -11
- package/dist/configs/formatters.mjs +0 -9
- package/dist/configs/ignores.cjs +0 -96
- package/dist/configs/ignores.d.cts +0 -15
- package/dist/configs/ignores.d.ts +0 -15
- package/dist/configs/ignores.mjs +0 -7
- package/dist/configs/imports.cjs +0 -104
- package/dist/configs/imports.d.cts +0 -23
- package/dist/configs/imports.d.ts +0 -23
- package/dist/configs/imports.mjs +0 -7
- package/dist/configs/index.d.cts +0 -20
- package/dist/configs/index.d.ts +0 -20
- package/dist/configs/index.mjs +0 -104
- package/dist/configs/javascript.cjs +0 -324
- package/dist/configs/javascript.d.cts +0 -11
- package/dist/configs/javascript.d.ts +0 -11
- package/dist/configs/javascript.mjs +0 -7
- package/dist/configs/jsdoc.cjs +0 -85
- package/dist/configs/jsdoc.d.cts +0 -27
- package/dist/configs/jsdoc.d.ts +0 -27
- package/dist/configs/jsdoc.mjs +0 -7
- package/dist/configs/jsonc.cjs +0 -155
- package/dist/configs/jsonc.d.cts +0 -11
- package/dist/configs/jsonc.d.ts +0 -11
- package/dist/configs/jsonc.mjs +0 -8
- package/dist/configs/markdown.cjs +0 -164
- package/dist/configs/markdown.d.cts +0 -35
- package/dist/configs/markdown.d.ts +0 -35
- package/dist/configs/markdown.mjs +0 -8
- package/dist/configs/nextjs.cjs +0 -180
- package/dist/configs/nextjs.d.cts +0 -11
- package/dist/configs/nextjs.d.ts +0 -11
- package/dist/configs/nextjs.mjs +0 -8
- package/dist/configs/node.cjs +0 -60
- package/dist/configs/node.d.cts +0 -15
- package/dist/configs/node.d.ts +0 -15
- package/dist/configs/node.mjs +0 -6
- package/dist/configs/perfectionist.cjs +0 -51
- package/dist/configs/perfectionist.d.cts +0 -20
- package/dist/configs/perfectionist.d.ts +0 -20
- package/dist/configs/perfectionist.mjs +0 -6
- package/dist/configs/react.cjs +0 -379
- package/dist/configs/react.d.cts +0 -11
- package/dist/configs/react.d.ts +0 -11
- package/dist/configs/react.mjs +0 -8
- package/dist/configs/solid.cjs +0 -360
- package/dist/configs/solid.d.cts +0 -11
- package/dist/configs/solid.d.ts +0 -11
- package/dist/configs/solid.mjs +0 -8
- package/dist/configs/sort.cjs +0 -240
- package/dist/configs/sort.d.cts +0 -26
- package/dist/configs/sort.d.ts +0 -26
- package/dist/configs/sort.mjs +0 -8
- package/dist/configs/stylistic.cjs +0 -98
- package/dist/configs/stylistic.d.cts +0 -11
- package/dist/configs/stylistic.d.ts +0 -11
- package/dist/configs/stylistic.mjs +0 -9
- package/dist/configs/tailwindcss.cjs +0 -148
- package/dist/configs/tailwindcss.d.cts +0 -11
- package/dist/configs/tailwindcss.d.ts +0 -11
- package/dist/configs/tailwindcss.mjs +0 -8
- package/dist/configs/test.cjs +0 -206
- package/dist/configs/test.d.cts +0 -11
- package/dist/configs/test.d.ts +0 -11
- package/dist/configs/test.mjs +0 -9
- package/dist/configs/toml.cjs +0 -131
- package/dist/configs/toml.d.cts +0 -11
- package/dist/configs/toml.d.ts +0 -11
- package/dist/configs/toml.mjs +0 -8
- package/dist/configs/typescript.cjs +0 -291
- package/dist/configs/typescript.d.cts +0 -11
- package/dist/configs/typescript.d.ts +0 -11
- package/dist/configs/typescript.mjs +0 -8
- package/dist/configs/unicorn.cjs +0 -91
- package/dist/configs/unicorn.d.cts +0 -15
- package/dist/configs/unicorn.d.ts +0 -15
- package/dist/configs/unicorn.mjs +0 -6
- package/dist/configs/unocss.cjs +0 -133
- package/dist/configs/unocss.d.cts +0 -11
- package/dist/configs/unocss.d.ts +0 -11
- package/dist/configs/unocss.mjs +0 -8
- package/dist/configs/vue.cjs +0 -293
- package/dist/configs/vue.d.cts +0 -11
- package/dist/configs/vue.d.ts +0 -11
- package/dist/configs/vue.mjs +0 -8
- package/dist/configs/yaml.cjs +0 -143
- package/dist/configs/yaml.d.cts +0 -11
- package/dist/configs/yaml.d.ts +0 -11
- package/dist/configs/yaml.mjs +0 -8
- package/dist/custom-rules/utils.cjs +0 -31
- package/dist/custom-rules/utils.d.cts +0 -6
- package/dist/custom-rules/utils.d.ts +0 -6
- package/dist/custom-rules/utils.mjs +0 -6
- package/dist/globs.cjs +0 -158
- package/dist/globs.d.cts +0 -28
- package/dist/globs.d.ts +0 -28
- package/dist/globs.mjs +0 -56
- package/dist/index.mjs +0 -284
- package/dist/types-HqEzZfQU.d.cts +0 -668
- package/dist/types-HqEzZfQU.d.ts +0 -668
|
@@ -1,98 +0,0 @@
|
|
|
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/configs/stylistic.ts
|
|
31
|
-
var stylistic_exports = {};
|
|
32
|
-
__export(stylistic_exports, {
|
|
33
|
-
StylisticConfigDefaults: () => StylisticConfigDefaults,
|
|
34
|
-
stylistic: () => stylistic
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(stylistic_exports);
|
|
37
|
-
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
38
|
-
|
|
39
|
-
// src/utils.ts
|
|
40
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
41
|
-
var import_local_pkg = require("local-pkg");
|
|
42
|
-
async function interop(m) {
|
|
43
|
-
const resolved = await m;
|
|
44
|
-
return resolved.default || resolved;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// src/configs/stylistic.ts
|
|
48
|
-
var StylisticConfigDefaults = {
|
|
49
|
-
indent: 2,
|
|
50
|
-
jsx: true,
|
|
51
|
-
quotes: "double",
|
|
52
|
-
semi: false
|
|
53
|
-
};
|
|
54
|
-
async function stylistic(options = {}) {
|
|
55
|
-
const {
|
|
56
|
-
indent,
|
|
57
|
-
jsx,
|
|
58
|
-
overrides = {},
|
|
59
|
-
quotes,
|
|
60
|
-
semi
|
|
61
|
-
} = {
|
|
62
|
-
...StylisticConfigDefaults,
|
|
63
|
-
...options
|
|
64
|
-
};
|
|
65
|
-
const pluginStylistic = await interop(import("@stylistic/eslint-plugin"));
|
|
66
|
-
const config = pluginStylistic.configs.customize({
|
|
67
|
-
flat: true,
|
|
68
|
-
indent,
|
|
69
|
-
jsx,
|
|
70
|
-
pluginName: "style",
|
|
71
|
-
quotes,
|
|
72
|
-
semi
|
|
73
|
-
});
|
|
74
|
-
return [
|
|
75
|
-
{
|
|
76
|
-
name: "luxass:stylistic",
|
|
77
|
-
plugins: {
|
|
78
|
-
antfu: import_eslint_plugin_antfu.default,
|
|
79
|
-
style: pluginStylistic
|
|
80
|
-
},
|
|
81
|
-
rules: {
|
|
82
|
-
...config.rules,
|
|
83
|
-
"antfu/consistent-list-newline": "error",
|
|
84
|
-
"antfu/if-newline": "off",
|
|
85
|
-
"antfu/top-level-function": "error",
|
|
86
|
-
"curly": ["error", "multi-line", "consistent"],
|
|
87
|
-
"style/arrow-parens": ["error", "always", { requireForBlockBody: true }],
|
|
88
|
-
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
89
|
-
...overrides
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
-
0 && (module.exports = {
|
|
96
|
-
StylisticConfigDefaults,
|
|
97
|
-
stylistic
|
|
98
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@stylistic/eslint-plugin';
|
|
2
|
-
export { S as StylisticConfig, x as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-HqEzZfQU.cjs';
|
|
3
|
-
import 'eslint-config-flat-gitignore';
|
|
4
|
-
import '@antfu/eslint-define-config';
|
|
5
|
-
import '@eslint-types/jsdoc/types';
|
|
6
|
-
import '@eslint-types/typescript-eslint/types';
|
|
7
|
-
import '@eslint-types/unicorn/types';
|
|
8
|
-
import 'eslint-plugin-antfu';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@stylistic/eslint-plugin';
|
|
2
|
-
export { S as StylisticConfig, x as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-HqEzZfQU.js';
|
|
3
|
-
import 'eslint-config-flat-gitignore';
|
|
4
|
-
import '@antfu/eslint-define-config';
|
|
5
|
-
import '@eslint-types/jsdoc/types';
|
|
6
|
-
import '@eslint-types/typescript-eslint/types';
|
|
7
|
-
import '@eslint-types/unicorn/types';
|
|
8
|
-
import 'eslint-plugin-antfu';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
@@ -1,148 +0,0 @@
|
|
|
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/configs/tailwindcss.ts
|
|
31
|
-
var tailwindcss_exports = {};
|
|
32
|
-
__export(tailwindcss_exports, {
|
|
33
|
-
tailwindcss: () => tailwindcss
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(tailwindcss_exports);
|
|
36
|
-
|
|
37
|
-
// src/globs.ts
|
|
38
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
41
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
42
|
-
var GLOB_TESTS = [
|
|
43
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
44
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
45
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
46
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
47
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
48
|
-
];
|
|
49
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
50
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
// src/utils.ts
|
|
62
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
63
|
-
var import_local_pkg = require("local-pkg");
|
|
64
|
-
async function interop(m) {
|
|
65
|
-
const resolved = await m;
|
|
66
|
-
return resolved.default || resolved;
|
|
67
|
-
}
|
|
68
|
-
async function ensure(packages) {
|
|
69
|
-
if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
;
|
|
73
|
-
const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
|
|
74
|
-
if (nonExistingPackages.length === 0) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
;
|
|
78
|
-
const { default: prompts } = await import("prompts");
|
|
79
|
-
const { result } = await prompts([
|
|
80
|
-
{
|
|
81
|
-
name: "result",
|
|
82
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
83
|
-
type: "confirm"
|
|
84
|
-
}
|
|
85
|
-
]);
|
|
86
|
-
if (result) {
|
|
87
|
-
await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
|
|
88
|
-
dev: true
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// src/configs/tailwindcss.ts
|
|
95
|
-
async function tailwindcss(options = {}) {
|
|
96
|
-
const {
|
|
97
|
-
files = [GLOB_SRC],
|
|
98
|
-
overrides
|
|
99
|
-
} = options;
|
|
100
|
-
await ensure([
|
|
101
|
-
"eslint-plugin-tailwindcss"
|
|
102
|
-
]);
|
|
103
|
-
const [
|
|
104
|
-
pluginTailwindCSS
|
|
105
|
-
] = await Promise.all([
|
|
106
|
-
interop(import("eslint-plugin-tailwindcss"))
|
|
107
|
-
]);
|
|
108
|
-
return [
|
|
109
|
-
{
|
|
110
|
-
name: "luxass:tailwindcss:setup",
|
|
111
|
-
languageOptions: {
|
|
112
|
-
parserOptions: {
|
|
113
|
-
ecmaFeatures: {
|
|
114
|
-
jsx: true
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
plugins: {
|
|
119
|
-
tailwind: pluginTailwindCSS
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: "luxass:tailwindcss:rules",
|
|
124
|
-
files,
|
|
125
|
-
rules: {
|
|
126
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/classnames-order.md
|
|
127
|
-
"tailwind/classnames-order": "warn",
|
|
128
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/enforces-negative-arbitrary-values.md
|
|
129
|
-
"tailwind/enforces-negative-arbitrary-values": "warn",
|
|
130
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/enforces-shorthand.md
|
|
131
|
-
"tailwind/enforces-shorthand": "warn",
|
|
132
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/migration-from-tailwind-2.md
|
|
133
|
-
"tailwind/migration-from-tailwind-2": "warn",
|
|
134
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-arbitrary-value.md
|
|
135
|
-
"tailwind/no-arbitrary-value": "off",
|
|
136
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-contradicting-classname.md
|
|
137
|
-
"tailwind/no-contradicting-classname": "error",
|
|
138
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-custom-classname.md
|
|
139
|
-
"tailwind/no-custom-classname": "warn",
|
|
140
|
-
...overrides
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
];
|
|
144
|
-
}
|
|
145
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
-
0 && (module.exports = {
|
|
147
|
-
tailwindcss
|
|
148
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '../types-HqEzZfQU.cjs';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '../types-HqEzZfQU.js';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
package/dist/configs/test.cjs
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
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/configs/test.ts
|
|
31
|
-
var test_exports = {};
|
|
32
|
-
__export(test_exports, {
|
|
33
|
-
test: () => test
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(test_exports);
|
|
36
|
-
|
|
37
|
-
// src/globs.ts
|
|
38
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
41
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
42
|
-
var GLOB_TESTS = [
|
|
43
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
44
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
45
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
46
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
47
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
48
|
-
];
|
|
49
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
50
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
// src/utils.ts
|
|
62
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
63
|
-
var import_local_pkg = require("local-pkg");
|
|
64
|
-
async function interop(m) {
|
|
65
|
-
const resolved = await m;
|
|
66
|
-
return resolved.default || resolved;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// src/custom-rules/utils.ts
|
|
70
|
-
var import_utils = require("@typescript-eslint/utils");
|
|
71
|
-
var createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
|
|
72
|
-
|
|
73
|
-
// src/custom-rules/no-only-tests/index.ts
|
|
74
|
-
var DEFAULT_OPTIONS = {
|
|
75
|
-
blocks: ["describe", "it", "test"],
|
|
76
|
-
focus: ["only"]
|
|
77
|
-
};
|
|
78
|
-
function getPath(node, path = []) {
|
|
79
|
-
if (node) {
|
|
80
|
-
const nodeName = node.name || node.property && node.property.name;
|
|
81
|
-
if (node.object) {
|
|
82
|
-
return getPath(node.object, [
|
|
83
|
-
nodeName,
|
|
84
|
-
...path
|
|
85
|
-
]);
|
|
86
|
-
}
|
|
87
|
-
if (node.callee)
|
|
88
|
-
return getPath(node.callee, path);
|
|
89
|
-
return [nodeName, ...path];
|
|
90
|
-
}
|
|
91
|
-
return path;
|
|
92
|
-
}
|
|
93
|
-
var noOnlyTests = createRule({
|
|
94
|
-
name: "no-only-tests",
|
|
95
|
-
create: (context, [options]) => {
|
|
96
|
-
const {
|
|
97
|
-
blocks = DEFAULT_OPTIONS.blocks,
|
|
98
|
-
focus = DEFAULT_OPTIONS.focus
|
|
99
|
-
} = options;
|
|
100
|
-
const handler = {
|
|
101
|
-
Identifier(node) {
|
|
102
|
-
const parent = node.parent?.object;
|
|
103
|
-
if (!parent)
|
|
104
|
-
return;
|
|
105
|
-
if (!focus.includes(node.name))
|
|
106
|
-
return;
|
|
107
|
-
const callPath = getPath(node.parent).join(".");
|
|
108
|
-
const found = blocks.find((block) => {
|
|
109
|
-
if (block.endsWith("*"))
|
|
110
|
-
return callPath.startsWith(block.replace(/\*$/, ""));
|
|
111
|
-
return callPath.startsWith(`${block}.`);
|
|
112
|
-
});
|
|
113
|
-
if (found) {
|
|
114
|
-
context.report({
|
|
115
|
-
data: { block: callPath.split(".")[0], focus: node.name },
|
|
116
|
-
messageId: "notPermitted",
|
|
117
|
-
node
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
return handler;
|
|
123
|
-
},
|
|
124
|
-
defaultOptions: [{
|
|
125
|
-
blocks: ["describe", "it", "test"],
|
|
126
|
-
focus: ["only"]
|
|
127
|
-
}],
|
|
128
|
-
meta: {
|
|
129
|
-
docs: {
|
|
130
|
-
description: "disallow .only blocks in tests",
|
|
131
|
-
recommended: "recommended"
|
|
132
|
-
},
|
|
133
|
-
messages: {
|
|
134
|
-
notPermitted: "{{ block }}.{{ focus }} not permitted"
|
|
135
|
-
},
|
|
136
|
-
schema: [{
|
|
137
|
-
additionalProperties: false,
|
|
138
|
-
properties: {
|
|
139
|
-
blocks: {
|
|
140
|
-
items: {
|
|
141
|
-
type: "string"
|
|
142
|
-
},
|
|
143
|
-
type: "array",
|
|
144
|
-
uniqueItems: true
|
|
145
|
-
},
|
|
146
|
-
focus: {
|
|
147
|
-
items: {
|
|
148
|
-
type: "string"
|
|
149
|
-
},
|
|
150
|
-
type: "array",
|
|
151
|
-
uniqueItems: true
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
type: "object"
|
|
155
|
-
}],
|
|
156
|
-
type: "layout"
|
|
157
|
-
}
|
|
158
|
-
// i need to have this here, otherwise typechecking fails.
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// src/configs/test.ts
|
|
162
|
-
async function test(options = {}) {
|
|
163
|
-
const {
|
|
164
|
-
editor = false,
|
|
165
|
-
files = GLOB_TESTS,
|
|
166
|
-
overrides = {}
|
|
167
|
-
} = options;
|
|
168
|
-
const [
|
|
169
|
-
pluginVitest
|
|
170
|
-
] = await Promise.all([
|
|
171
|
-
interop(import("eslint-plugin-vitest"))
|
|
172
|
-
]);
|
|
173
|
-
return [
|
|
174
|
-
{
|
|
175
|
-
name: "luxass:test:setup",
|
|
176
|
-
plugins: {
|
|
177
|
-
test: {
|
|
178
|
-
...pluginVitest,
|
|
179
|
-
rules: {
|
|
180
|
-
...pluginVitest.rules,
|
|
181
|
-
"no-only-tests": noOnlyTests
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
name: "luxass:test:rules",
|
|
188
|
-
files,
|
|
189
|
-
rules: {
|
|
190
|
-
"test/consistent-test-it": [
|
|
191
|
-
"error",
|
|
192
|
-
{ fn: "it", withinDescribe: "it" }
|
|
193
|
-
],
|
|
194
|
-
"test/no-identical-title": "error",
|
|
195
|
-
"test/no-only-tests": editor ? "off" : "error",
|
|
196
|
-
"test/prefer-hooks-in-order": "error",
|
|
197
|
-
"test/prefer-lowercase-title": "error",
|
|
198
|
-
...overrides
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
];
|
|
202
|
-
}
|
|
203
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
204
|
-
0 && (module.exports = {
|
|
205
|
-
test
|
|
206
|
-
});
|
package/dist/configs/test.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { e as TestOptions, d as test } from '../types-HqEzZfQU.cjs';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
package/dist/configs/test.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { e as TestOptions, d as test } from '../types-HqEzZfQU.js';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
package/dist/configs/test.mjs
DELETED
package/dist/configs/toml.cjs
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
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/configs/toml.ts
|
|
31
|
-
var toml_exports = {};
|
|
32
|
-
__export(toml_exports, {
|
|
33
|
-
toml: () => toml
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(toml_exports);
|
|
36
|
-
|
|
37
|
-
// src/globs.ts
|
|
38
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
41
|
-
var GLOB_TOML = "**/*.toml";
|
|
42
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
43
|
-
var GLOB_TESTS = [
|
|
44
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
45
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
46
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
47
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
48
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
49
|
-
];
|
|
50
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
51
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
59
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
// src/utils.ts
|
|
63
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
64
|
-
var import_local_pkg = require("local-pkg");
|
|
65
|
-
async function interop(m) {
|
|
66
|
-
const resolved = await m;
|
|
67
|
-
return resolved.default || resolved;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// src/configs/toml.ts
|
|
71
|
-
async function toml(options = {}) {
|
|
72
|
-
const {
|
|
73
|
-
files = [GLOB_TOML],
|
|
74
|
-
overrides = {},
|
|
75
|
-
stylistic = true
|
|
76
|
-
} = options;
|
|
77
|
-
const {
|
|
78
|
-
indent = 2
|
|
79
|
-
} = typeof stylistic === "boolean" ? {} : stylistic;
|
|
80
|
-
const [
|
|
81
|
-
pluginToml,
|
|
82
|
-
parserToml
|
|
83
|
-
] = await Promise.all([
|
|
84
|
-
interop(import("eslint-plugin-toml")),
|
|
85
|
-
interop(import("toml-eslint-parser"))
|
|
86
|
-
]);
|
|
87
|
-
return [
|
|
88
|
-
{
|
|
89
|
-
name: "luxass:toml:setup",
|
|
90
|
-
plugins: {
|
|
91
|
-
toml: pluginToml
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "luxass:toml:rules",
|
|
96
|
-
files,
|
|
97
|
-
languageOptions: {
|
|
98
|
-
parser: parserToml
|
|
99
|
-
},
|
|
100
|
-
rules: {
|
|
101
|
-
"style/spaced-comment": "off",
|
|
102
|
-
"toml/comma-style": "error",
|
|
103
|
-
"toml/keys-order": "error",
|
|
104
|
-
"toml/no-space-dots": "error",
|
|
105
|
-
"toml/no-unreadable-number-separator": "error",
|
|
106
|
-
"toml/precision-of-fractional-seconds": "error",
|
|
107
|
-
"toml/precision-of-integer": "error",
|
|
108
|
-
"toml/tables-order": "error",
|
|
109
|
-
"toml/vue-custom-block/no-parsing-error": "error",
|
|
110
|
-
...stylistic ? {
|
|
111
|
-
"toml/array-bracket-newline": "error",
|
|
112
|
-
"toml/array-bracket-spacing": "error",
|
|
113
|
-
"toml/array-element-newline": "error",
|
|
114
|
-
"toml/indent": ["error", indent === "tab" ? 2 : indent],
|
|
115
|
-
"toml/inline-table-curly-spacing": "error",
|
|
116
|
-
"toml/key-spacing": "error",
|
|
117
|
-
"toml/padding-line-between-pairs": "error",
|
|
118
|
-
"toml/padding-line-between-tables": "error",
|
|
119
|
-
"toml/quoted-keys": "error",
|
|
120
|
-
"toml/spaced-comment": "error",
|
|
121
|
-
"toml/table-bracket-spacing": "error"
|
|
122
|
-
} : {},
|
|
123
|
-
...overrides
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
];
|
|
127
|
-
}
|
|
128
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
129
|
-
0 && (module.exports = {
|
|
130
|
-
toml
|
|
131
|
-
});
|