@nokkvireyr/vue-config 1.1.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/README.md ADDED
@@ -0,0 +1,6 @@
1
+ ### Customized eslint & prettier configs
2
+ To be used in vue projects
3
+
4
+ ```
5
+ npm i @nokkvireyr/vue-config@latest -D
6
+ ```
package/dist/main.js ADDED
@@ -0,0 +1,83 @@
1
+ import r from "@eslint/js";
2
+ import e from "typescript-eslint";
3
+ import o from "eslint-plugin-vue";
4
+ import s from "eslint-config-prettier";
5
+ const c = ({
6
+ globals: n = {},
7
+ rules: t = {}
8
+ } = {}) => e.config(
9
+ // @ts-ignore
10
+ r.configs.recommended,
11
+ e.configs.recommended,
12
+ {
13
+ extends: [
14
+ r.configs.recommended,
15
+ ...e.configs.recommended,
16
+ ...o.configs["flat/recommended"]
17
+ ],
18
+ files: ["**/*.{ts,vue}"],
19
+ languageOptions: {
20
+ ecmaVersion: "latest",
21
+ sourceType: "module",
22
+ parserOptions: {
23
+ parser: e.parser
24
+ }
25
+ },
26
+ rules: {
27
+ // your rules
28
+ }
29
+ },
30
+ s,
31
+ {
32
+ languageOptions: {
33
+ globals: n
34
+ },
35
+ rules: {
36
+ "no-console": "warn",
37
+ "no-debugger": "warn",
38
+ "no-unused-vars": "off",
39
+ "@typescript-eslint/no-unused-vars": [
40
+ "warn",
41
+ // or "error"
42
+ {
43
+ argsIgnorePattern: "^_",
44
+ varsIgnorePattern: "^_",
45
+ caughtErrorsIgnorePattern: "^_"
46
+ }
47
+ ],
48
+ "no-undef": "off",
49
+ "vue/multi-word-component-names": "off",
50
+ "prefer-const": "error",
51
+ "vue/camelcase": "error",
52
+ "vue/attribute-hyphenation": ["error", "never"],
53
+ "vue/custom-event-name-casing": ["error", "camelCase"],
54
+ "vue/v-on-event-hyphenation": ["error", "never", { autofix: !0 }],
55
+ "@typescript-eslint/ban-ts-comment": "off",
56
+ "@typescript-eslint/no-explicit-any": "off",
57
+ "vue/html-self-closing": [
58
+ "warn",
59
+ {
60
+ html: {
61
+ void: "always",
62
+ normal: "always"
63
+ },
64
+ svg: "always",
65
+ math: "always"
66
+ }
67
+ ],
68
+ ...t
69
+ }
70
+ }
71
+ ), u = {
72
+ $schema: "https://json.schemastore.org/prettierrc",
73
+ semi: !0,
74
+ tabWidth: 2,
75
+ singleQuote: !0,
76
+ printWidth: 100,
77
+ trailingComma: "es5",
78
+ plugins: ["prettier-plugin-tailwindcss"]
79
+ };
80
+ export {
81
+ c as eslintConfig,
82
+ u as prettierConfig
83
+ };
@@ -0,0 +1,7 @@
1
+ export type OptionRules = 'off' | 'warn' | 'error' | 'never';
2
+ export type Rules = Record<string, Omit<OptionRules, 'never'> | (OptionRules | Record<string, unknown>)[]>;
3
+ export declare const eslintConfig: ({ globals, rules, }?: {
4
+ globals?: Record<string, "readonly" | "writable">;
5
+ rules?: Rules;
6
+ }) => TSESLint.FlatConfig.ConfigArray;
7
+ //# sourceMappingURL=lint.d.ts.map
@@ -0,0 +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;;;qCAkEtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './lint/lint';
2
+ export * from './prettier/prettier';
3
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const prettierConfig: {
2
+ $schema: string;
3
+ semi: boolean;
4
+ tabWidth: number;
5
+ singleQuote: boolean;
6
+ printWidth: number;
7
+ trailingComma: string;
8
+ plugins: string[];
9
+ };
10
+ //# sourceMappingURL=prettier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../../src/prettier/prettier.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@nokkvireyr/vue-config",
3
+ "version": "1.1.0",
4
+ "description": "",
5
+ "main": "dist/main.js",
6
+ "type": "module",
7
+ "module": "dist/main.js",
8
+ "types": "dist/types/main.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "test": "echo \"Error: no test specified\" && exit 1",
14
+ "build": "tsc -P ./tsconfig.decleration.json && vite build"
15
+ },
16
+ "keywords": [],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "peerDependencies": {
20
+ "@eslint/js": ">=9.0.0",
21
+ "eslint": ">=9.0.0",
22
+ "eslint-config-prettier": ">=10.0.0",
23
+ "eslint-plugin-vue": ">=9.0.0",
24
+ "prettier": ">=3.0.0",
25
+ "prettier-plugin-tailwindcss": ">=0.6.0",
26
+ "typescript-eslint": ">=8.0.0",
27
+ "vue-eslint-parser": "^9.4.3"
28
+ },
29
+ "devDependencies": {
30
+ "@eslint/js": "^9.20.0",
31
+ "@types/eslint-config-prettier": "^6.11.3",
32
+ "@types/node": "^20.13.0",
33
+ "eslint": "^9.20.0",
34
+ "eslint-config-prettier": "^10.0.1",
35
+ "eslint-plugin-vue": "^9.32.0",
36
+ "prettier": "^3.5.0",
37
+ "prettier-plugin-tailwindcss": "^0.6.11",
38
+ "typescript": "^5.4.5",
39
+ "typescript-eslint": "^8.24.0",
40
+ "vite": "^5.2.12",
41
+ "vue-eslint-parser": "^9.4.3"
42
+ }
43
+ }