@nokkvireyr/vue-config 1.2.0 → 2.0.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/main.js +101 -77
- package/dist/types/lint/lint.d.ts +10 -1
- package/dist/types/lint/lint.d.ts.map +1 -1
- package/dist/types/main.d.ts +2 -0
- package/dist/types/main.d.ts.map +1 -1
- package/dist/types/oxfmt/oxfmt.d.ts +12 -0
- package/dist/types/oxfmt/oxfmt.d.ts.map +1 -0
- package/dist/types/oxlint/oxlint.d.ts +10 -0
- package/dist/types/oxlint/oxlint.d.ts.map +1 -0
- package/package.json +53 -3
package/dist/main.js
CHANGED
|
@@ -1,77 +1,101 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
import e from "@eslint/js";
|
|
2
|
+
import t from "typescript-eslint";
|
|
3
|
+
import n from "eslint-plugin-vue";
|
|
4
|
+
import r from "globals";
|
|
5
|
+
import i from "eslint-config-prettier";
|
|
6
|
+
//#region src/lint/lint.ts
|
|
7
|
+
var a = ({ globals: a = {}, rules: o = {}, ignores: s = [], oxlintPlugin: c = void 0 } = {}) => t.config({ ignores: ["**/dist", ...s] }, {
|
|
8
|
+
extends: [
|
|
9
|
+
e.configs.recommended,
|
|
10
|
+
...t.configs.recommended,
|
|
11
|
+
...n.configs["flat/recommended"]
|
|
12
|
+
],
|
|
13
|
+
files: ["**/*.{ts,vue,js}"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
ecmaVersion: "latest",
|
|
16
|
+
sourceType: "module",
|
|
17
|
+
globals: {
|
|
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",
|
|
33
|
+
"vue/multi-word-component-names": "off",
|
|
34
|
+
"prefer-const": "error",
|
|
35
|
+
"vue/camelcase": "error",
|
|
36
|
+
"vue/attribute-hyphenation": ["error", "never"],
|
|
37
|
+
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
38
|
+
"vue/v-on-event-hyphenation": [
|
|
39
|
+
"error",
|
|
40
|
+
"never",
|
|
41
|
+
{ autofix: !0 }
|
|
42
|
+
],
|
|
43
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
44
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
45
|
+
"vue/html-self-closing": ["warn", {
|
|
46
|
+
html: {
|
|
47
|
+
void: "always",
|
|
48
|
+
normal: "always"
|
|
49
|
+
},
|
|
50
|
+
svg: "always",
|
|
51
|
+
math: "always"
|
|
52
|
+
}],
|
|
53
|
+
...o
|
|
54
|
+
}
|
|
55
|
+
}, i, ...c ? [c.configs["flat/recommended"]] : []), o = {
|
|
56
|
+
$schema: "https://json.schemastore.org/prettierrc",
|
|
57
|
+
semi: !0,
|
|
58
|
+
tabWidth: 2,
|
|
59
|
+
singleQuote: !0,
|
|
60
|
+
printWidth: 100,
|
|
61
|
+
trailingComma: "es5",
|
|
62
|
+
plugins: ["prettier-plugin-tailwindcss"]
|
|
63
|
+
}, s = ({ plugins: e = [], categories: t = {}, rules: n = {}, globals: r = {}, ignorePatterns: i = [], overrides: a = [] } = {}) => ({
|
|
64
|
+
plugins: [
|
|
65
|
+
"typescript",
|
|
66
|
+
"vue",
|
|
67
|
+
...(e || []).filter((e) => e !== "typescript" && e !== "vue").filter(Boolean)
|
|
68
|
+
],
|
|
69
|
+
categories: {
|
|
70
|
+
correctness: "warn",
|
|
71
|
+
...t
|
|
72
|
+
},
|
|
73
|
+
rules: {
|
|
74
|
+
"no-console": "warn",
|
|
75
|
+
"no-debugger": "warn",
|
|
76
|
+
"prefer-const": "error",
|
|
77
|
+
"typescript/no-unused-vars": ["warn", {
|
|
78
|
+
argsIgnorePattern: "^_",
|
|
79
|
+
varsIgnorePattern: "^_",
|
|
80
|
+
caughtErrorsIgnorePattern: "^_"
|
|
81
|
+
}],
|
|
82
|
+
"typescript/no-explicit-any": "off",
|
|
83
|
+
"typescript/ban-ts-comment": "off",
|
|
84
|
+
"vue/multi-word-component-names": "off",
|
|
85
|
+
...n
|
|
86
|
+
},
|
|
87
|
+
env: { browser: !0 },
|
|
88
|
+
globals: r,
|
|
89
|
+
ignorePatterns: ["dist/**", ...i],
|
|
90
|
+
overrides: a
|
|
91
|
+
}), c = (e = {}) => ({
|
|
92
|
+
semi: !0,
|
|
93
|
+
tabWidth: 2,
|
|
94
|
+
singleQuote: !0,
|
|
95
|
+
printWidth: 100,
|
|
96
|
+
trailingComma: "es5",
|
|
97
|
+
sortTailwindcss: {},
|
|
98
|
+
...e
|
|
99
|
+
});
|
|
100
|
+
//#endregion
|
|
101
|
+
export { a as eslintConfig, c as oxfmtConfig, s as oxlintConfig, o as prettierConfig };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
1
2
|
export type OptionRules = 'off' | 'warn' | 'error' | 'never';
|
|
2
3
|
export type Rules = Record<string, Omit<OptionRules, 'never'> | (OptionRules | Record<string, unknown>)[]>;
|
|
3
|
-
|
|
4
|
+
/** Pass the imported `eslint-plugin-oxlint` module to disable rules already covered by oxlint. */
|
|
5
|
+
type OxlintPlugin = {
|
|
6
|
+
configs: Record<string, Linter.Config>;
|
|
7
|
+
buildFromOxlintConfigFile?: (path: string) => Linter.Config[];
|
|
8
|
+
buildFromOxlintConfig?: (config: Record<string, unknown>) => Linter.Config[];
|
|
9
|
+
};
|
|
10
|
+
export declare const eslintConfig: ({ globals, rules, ignores, oxlintPlugin, }?: {
|
|
4
11
|
globals?: Record<string, "readonly" | "writable">;
|
|
5
12
|
rules?: Rules;
|
|
6
13
|
ignores?: string[];
|
|
14
|
+
oxlintPlugin?: OxlintPlugin;
|
|
7
15
|
}) => TSESLint.FlatConfig.ConfigArray;
|
|
16
|
+
export {};
|
|
8
17
|
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/lint/lint.ts"],"names":[],"mappings":"AAKA,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,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/lint/lint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,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;;;;;qCA6DtB,CAAC"}
|
package/dist/types/main.d.ts
CHANGED
package/dist/types/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OxfmtConfig } from 'oxfmt';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an oxfmt config object to spread into `defineConfig()` in your `oxfmt.config.ts`.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // oxfmt.config.ts
|
|
7
|
+
* import { defineConfig } from 'oxfmt';
|
|
8
|
+
* import { oxfmtConfig } from '@nokkvireyr/vue-config';
|
|
9
|
+
* export default defineConfig(oxfmtConfig());
|
|
10
|
+
*/
|
|
11
|
+
export declare const oxfmtConfig: (overrides?: OxfmtConfig) => OxfmtConfig;
|
|
12
|
+
//# sourceMappingURL=oxfmt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxfmt.d.ts","sourceRoot":"","sources":["../../../src/oxfmt/oxfmt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,eAAe,WAAW,KAAQ,WAQxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OxlintConfig } from 'oxlint';
|
|
2
|
+
export declare const oxlintConfig: ({ plugins, categories, rules, globals, ignorePatterns, overrides, }?: {
|
|
3
|
+
plugins?: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
|
|
4
|
+
categories?: import("oxlint").RuleCategories;
|
|
5
|
+
rules?: import("oxlint").DummyRuleMap;
|
|
6
|
+
globals?: import("oxlint").OxlintGlobals;
|
|
7
|
+
ignorePatterns?: string[];
|
|
8
|
+
overrides?: import("oxlint").OxlintOverride[];
|
|
9
|
+
}) => OxlintConfig;
|
|
10
|
+
//# sourceMappingURL=oxlint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxlint.d.ts","sourceRoot":"","sources":["../../../src/oxlint/oxlint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC,eAAO,MAAM,YAAY;;;;;;;MAOhB,YA+BP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nokkvireyr/vue-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/nokkvireyr/vue-config"
|
|
8
|
+
},
|
|
5
9
|
"main": "dist/main.js",
|
|
6
10
|
"type": "module",
|
|
7
11
|
"module": "dist/main.js",
|
|
@@ -12,7 +16,8 @@
|
|
|
12
16
|
"scripts": {
|
|
13
17
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
18
|
"build": "tsc -P ./tsconfig.decleration.json && vite build",
|
|
15
|
-
"lint": "
|
|
19
|
+
"lint": "oxlint",
|
|
20
|
+
"lint:fix": "oxlint --fix"
|
|
16
21
|
},
|
|
17
22
|
"keywords": [],
|
|
18
23
|
"author": "",
|
|
@@ -21,26 +26,71 @@
|
|
|
21
26
|
"@eslint/js": ">=9.0.0",
|
|
22
27
|
"eslint": ">=9.0.0",
|
|
23
28
|
"eslint-config-prettier": ">=10.0.0",
|
|
29
|
+
"eslint-plugin-oxlint": ">=0.0.0",
|
|
24
30
|
"eslint-plugin-vue": ">=9.0.0",
|
|
25
31
|
"globals": ">=14.0.0",
|
|
32
|
+
"oxfmt": ">=0.4.0",
|
|
33
|
+
"oxlint": ">=1.0.0",
|
|
26
34
|
"prettier": ">=3.0.0",
|
|
27
35
|
"prettier-plugin-tailwindcss": ">=0.6.0",
|
|
28
36
|
"typescript-eslint": ">=8.0.0",
|
|
29
37
|
"vue-eslint-parser": "^9.4.3"
|
|
30
38
|
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"@eslint/js": {
|
|
41
|
+
"optional": true
|
|
42
|
+
},
|
|
43
|
+
"eslint": {
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"eslint-config-prettier": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"eslint-plugin-oxlint": {
|
|
50
|
+
"optional": true
|
|
51
|
+
},
|
|
52
|
+
"eslint-plugin-vue": {
|
|
53
|
+
"optional": true
|
|
54
|
+
},
|
|
55
|
+
"globals": {
|
|
56
|
+
"optional": true
|
|
57
|
+
},
|
|
58
|
+
"oxfmt": {
|
|
59
|
+
"optional": true
|
|
60
|
+
},
|
|
61
|
+
"oxlint": {
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
64
|
+
"prettier": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
67
|
+
"prettier-plugin-tailwindcss": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"typescript-eslint": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"vue-eslint-parser": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
31
77
|
"devDependencies": {
|
|
32
78
|
"@eslint/js": "^9.20.0",
|
|
33
79
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
34
80
|
"@types/node": "^20.13.0",
|
|
35
81
|
"eslint": "^9.20.0",
|
|
36
82
|
"eslint-config-prettier": "^10.0.1",
|
|
83
|
+
"eslint-plugin-oxlint": "^0.18.0",
|
|
37
84
|
"eslint-plugin-vue": "^9.32.0",
|
|
38
85
|
"globals": "^16.0.0",
|
|
86
|
+
"oxfmt": "^0.41.0",
|
|
87
|
+
"oxlint": "^1.56.0",
|
|
88
|
+
"oxlint-tsgolint": "^0.17.0",
|
|
39
89
|
"prettier": "^3.5.0",
|
|
40
90
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
41
91
|
"typescript": "^5.4.5",
|
|
42
92
|
"typescript-eslint": "^8.24.1",
|
|
43
|
-
"vite": "^
|
|
93
|
+
"vite": "^8.0.0",
|
|
44
94
|
"vue-eslint-parser": "^9.4.3"
|
|
45
95
|
}
|
|
46
96
|
}
|