@nokkvireyr/vue-config 2.1.2 → 2.1.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.
package/dist/main.js
CHANGED
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
import e from "@eslint/js";
|
|
2
2
|
import t from "typescript-eslint";
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "globals";
|
|
5
|
-
import i from "eslint-config-prettier";
|
|
3
|
+
import { createRequire as n } from "node:module";
|
|
6
4
|
//#region src/lint/lint.ts
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
e
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...r.browser,
|
|
19
|
-
...a
|
|
20
|
-
},
|
|
21
|
-
parserOptions: { parser: t.parser }
|
|
22
|
-
},
|
|
23
|
-
rules: {
|
|
24
|
-
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
25
|
-
"no-debugger": "warn",
|
|
26
|
-
"no-unused-vars": "off",
|
|
27
|
-
"@typescript-eslint/no-unused-vars": ["warn", {
|
|
28
|
-
argsIgnorePattern: "^_",
|
|
29
|
-
varsIgnorePattern: "^_",
|
|
30
|
-
caughtErrorsIgnorePattern: "^_"
|
|
31
|
-
}],
|
|
32
|
-
"no-undef": "off",
|
|
5
|
+
var r = n(import.meta.url), i = (e) => {
|
|
6
|
+
try {
|
|
7
|
+
return r(e);
|
|
8
|
+
} catch {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
}, a = ({ globals: n = {}, rules: r = {}, ignores: a = [], oxlintPlugin: o = void 0, vue: s = !1 } = {}) => {
|
|
12
|
+
let c = s ? i("eslint-plugin-vue") : void 0, l = i("globals"), u = i("eslint-config-prettier"), d = u && !s ? {
|
|
13
|
+
...u,
|
|
14
|
+
rules: Object.fromEntries(Object.entries(u.rules ?? {}).filter(([e]) => !e.startsWith("vue/")))
|
|
15
|
+
} : u, f = c ? {
|
|
33
16
|
"vue/multi-word-component-names": "off",
|
|
34
|
-
"prefer-const": "error",
|
|
35
17
|
"vue/camelcase": "error",
|
|
36
18
|
"vue/attribute-hyphenation": ["error", "never"],
|
|
37
19
|
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
@@ -40,8 +22,6 @@ var a = ({ globals: a = {}, rules: o = {}, ignores: s = [], oxlintPlugin: c = vo
|
|
|
40
22
|
"never",
|
|
41
23
|
{ autofix: !0 }
|
|
42
24
|
],
|
|
43
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
44
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
45
25
|
"vue/html-self-closing": ["warn", {
|
|
46
26
|
html: {
|
|
47
27
|
void: "always",
|
|
@@ -49,10 +29,42 @@ var a = ({ globals: a = {}, rules: o = {}, ignores: s = [], oxlintPlugin: c = vo
|
|
|
49
29
|
},
|
|
50
30
|
svg: "always",
|
|
51
31
|
math: "always"
|
|
52
|
-
}]
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
32
|
+
}]
|
|
33
|
+
} : {};
|
|
34
|
+
return t.config({ ignores: ["**/dist", ...a] }, {
|
|
35
|
+
extends: [
|
|
36
|
+
e.configs.recommended,
|
|
37
|
+
...t.configs.recommended,
|
|
38
|
+
...c?.configs["flat/recommended"] ?? []
|
|
39
|
+
],
|
|
40
|
+
files: ["**/*.{ts,vue,js}"],
|
|
41
|
+
languageOptions: {
|
|
42
|
+
ecmaVersion: "latest",
|
|
43
|
+
sourceType: "module",
|
|
44
|
+
globals: {
|
|
45
|
+
...l?.browser ?? {},
|
|
46
|
+
...n
|
|
47
|
+
},
|
|
48
|
+
parserOptions: { parser: t.parser }
|
|
49
|
+
},
|
|
50
|
+
rules: {
|
|
51
|
+
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
52
|
+
"no-debugger": "warn",
|
|
53
|
+
"no-unused-vars": "off",
|
|
54
|
+
"@typescript-eslint/no-unused-vars": ["warn", {
|
|
55
|
+
argsIgnorePattern: "^_",
|
|
56
|
+
varsIgnorePattern: "^_",
|
|
57
|
+
caughtErrorsIgnorePattern: "^_"
|
|
58
|
+
}],
|
|
59
|
+
"no-undef": "off",
|
|
60
|
+
"prefer-const": "error",
|
|
61
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
62
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
63
|
+
...f,
|
|
64
|
+
...r
|
|
65
|
+
}
|
|
66
|
+
}, ...d ? [d] : [], ...o ? [o.configs["flat/recommended"]] : []);
|
|
67
|
+
}, o = {
|
|
56
68
|
$schema: "https://json.schemastore.org/prettierrc",
|
|
57
69
|
semi: !0,
|
|
58
70
|
tabWidth: 2,
|
package/dist/oxc.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
//#region src/oxlint/oxlint.ts
|
|
2
|
-
var e = ({ plugins: e = [], categories: t = {}, rules: n = {}, globals: r = {}, ignorePatterns: i = [], overrides: a = [] } = {}) => ({
|
|
2
|
+
var e = ({ plugins: e = [], categories: t = {}, rules: n = {}, globals: r = {}, ignorePatterns: i = [], overrides: a = [], vue: o = !0 } = {}) => ({
|
|
3
3
|
plugins: [
|
|
4
4
|
"typescript",
|
|
5
|
-
"vue",
|
|
5
|
+
...o ? ["vue"] : [],
|
|
6
6
|
...(e || []).filter((e) => e !== "typescript" && e !== "vue").filter(Boolean)
|
|
7
7
|
],
|
|
8
8
|
categories: {
|
|
@@ -20,7 +20,7 @@ var e = ({ plugins: e = [], categories: t = {}, rules: n = {}, globals: r = {},
|
|
|
20
20
|
}],
|
|
21
21
|
"typescript/no-explicit-any": "off",
|
|
22
22
|
"typescript/ban-ts-comment": "off",
|
|
23
|
-
"vue/multi-word-component-names": "off",
|
|
23
|
+
...o ? { "vue/multi-word-component-names": "off" } : {},
|
|
24
24
|
...n
|
|
25
25
|
},
|
|
26
26
|
env: { browser: !0 },
|
|
@@ -7,11 +7,12 @@ type OxlintPlugin = {
|
|
|
7
7
|
buildFromOxlintConfigFile?: (path: string) => Linter.Config[];
|
|
8
8
|
buildFromOxlintConfig?: (config: Record<string, unknown>) => Linter.Config[];
|
|
9
9
|
};
|
|
10
|
-
export declare const eslintConfig: ({ globals, rules, ignores, oxlintPlugin, }?: {
|
|
10
|
+
export declare const eslintConfig: ({ globals, rules, ignores, oxlintPlugin, vue, }?: {
|
|
11
11
|
globals?: Record<string, "readonly" | "writable">;
|
|
12
12
|
rules?: Rules;
|
|
13
13
|
ignores?: string[];
|
|
14
14
|
oxlintPlugin?: OxlintPlugin;
|
|
15
|
+
vue?: boolean;
|
|
15
16
|
}) => TSESLint.FlatConfig.ConfigArray;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/lint/lint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/lint/lint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAYrC,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAC7D,MAAM,MAAM,KAAK,GAAG,MAAM,CACxB,MAAM,EACN,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CACvE,CAAC;AAEF,kGAAkG;AAClG,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,yBAAyB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;IAC9D,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;CAC9E,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;qCAqFxB,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { OxlintConfig } from 'oxlint';
|
|
2
2
|
export type { OxlintConfig } from 'oxlint';
|
|
3
|
-
export declare const oxlintConfig: ({ plugins, categories, rules, globals, ignorePatterns, overrides, }?: {
|
|
4
|
-
plugins?: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node"
|
|
3
|
+
export declare const oxlintConfig: ({ plugins, categories, rules, globals, ignorePatterns, overrides, vue, }?: {
|
|
4
|
+
plugins?: ("vue" | "eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node")[];
|
|
5
5
|
categories?: import("oxlint").RuleCategories;
|
|
6
6
|
rules?: import("oxlint").DummyRuleMap;
|
|
7
7
|
globals?: import("oxlint").OxlintGlobals;
|
|
8
8
|
ignorePatterns?: string[];
|
|
9
9
|
overrides?: import("oxlint").OxlintOverride[];
|
|
10
|
+
vue?: boolean;
|
|
10
11
|
}) => OxlintConfig;
|
|
11
12
|
//# sourceMappingURL=oxlint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxlint.d.ts","sourceRoot":"","sources":["../../../src/oxlint/oxlint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAO3C,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"oxlint.d.ts","sourceRoot":"","sources":["../../../src/oxlint/oxlint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAO3C,eAAO,MAAM,YAAY;;;;;;;;MAQhB,YA+BP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nokkvireyr/vue-config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@eslint/js": "^9.20.0",
|
|
89
89
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
90
|
-
"@types/node": "^
|
|
90
|
+
"@types/node": "^24.12.4",
|
|
91
91
|
"eslint": "^9.20.0",
|
|
92
92
|
"eslint-config-prettier": "^10.0.1",
|
|
93
93
|
"eslint-plugin-oxlint": "^0.18.0",
|