@zinkawaii/eslint-config 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 KazariEX
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the “Software”), to deal in
7
+ the Software without restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
9
+ Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ export recommended from "./lib/recommended.js";
2
+ import standard from "./lib/standard.js";
3
+ import stylistic from "./lib/stylistic.js";
4
+ import vue from "./lib/vue.js";
5
+
6
+ export default {
7
+ recommended,
8
+ standard,
9
+ stylistic,
10
+ vue
11
+ };
@@ -0,0 +1,47 @@
1
+ export default {
2
+ "constructor-super": "warn",
3
+ "for-direction": "warn",
4
+ "getter-return": "warn",
5
+ "no-async-promise-executor": "warn",
6
+ "no-class-assign": "warn",
7
+ "no-compare-neg-zero": "warn",
8
+ "no-const-assign": "warn",
9
+ "no-constant-condition": ["warn", {
10
+ checkLoops: false
11
+ }],
12
+ "no-control-regex": "warn",
13
+ "no-debugger": "warn",
14
+ "no-dupe-args": "warn",
15
+ "no-dupe-class-members": "warn",
16
+ "no-dupe-else-if": "warn",
17
+ "no-dupe-keys": "warn",
18
+ "no-duplicate-case": "warn",
19
+ "no-empty-character-class": "warn",
20
+ "no-empty-pattern": "warn",
21
+ "no-ex-assign": "warn",
22
+ "no-func-assign": "warn",
23
+ "no-import-assign": "warn",
24
+ "no-invalid-regexp": "warn",
25
+ "no-irregular-whitespace": "warn",
26
+ "no-loss-of-precision": "warn",
27
+ "no-misleading-character-class": "warn",
28
+ "no-new-symbol": "warn",
29
+ "no-obj-calls": "warn",
30
+ "no-prototype-builtins": "warn",
31
+ "no-self-assign": "warn",
32
+ "no-setter-return": "warn",
33
+ "no-sparse-arrays": "warn",
34
+ "no-this-before-super": "warn",
35
+ "no-unexpected-multiline": "warn",
36
+ "no-unreachable": "warn",
37
+ "no-unsafe-finally": "warn",
38
+ "no-unsafe-negation": ["warn", {
39
+ enforceForOrderingRelations: true
40
+ }],
41
+ "no-unsafe-optional-chaining": "warn",
42
+ "no-useless-backreference": "warn",
43
+ "use-isnan": ["warn", {
44
+ enforceForIndexOf: true
45
+ }],
46
+ "valid-typeof": "warn"
47
+ };
@@ -0,0 +1,29 @@
1
+ export default {
2
+ "array-callback-return": "warn",
3
+ "dot-notation": ["warn", {
4
+ allowPattern: "^[a-z]+(_[a-z]+)+$"
5
+ }],
6
+ "eqeqeq": ["warn", "smart"],
7
+ "no-constant-binary-expression": "warn",
8
+ "no-constructor-return": "warn",
9
+ "no-duplicate-imports": "warn",
10
+ "no-promise-executor-return": "warn",
11
+ "no-self-compare": "warn",
12
+ "no-unreachable-loop": "warn",
13
+ "no-unused-private-class-members": "warn",
14
+ "no-useless-concat": "warn",
15
+ "no-useless-rename": "warn",
16
+ "no-useless-return": "warn",
17
+ "no-var": "warn",
18
+ "object-shorthand": ["warn", "methods"],
19
+ "operator-assignment": ["warn", "always"],
20
+ "prefer-const": ["warn", {
21
+ destructuring: "all",
22
+ ignoreReadBeforeAssign: false
23
+ }],
24
+ "prefer-rest-params": "warn",
25
+ "prefer-spread": "warn",
26
+ "yoda": ["warn", "never", {
27
+ exceptRange: true
28
+ }]
29
+ };
@@ -0,0 +1,96 @@
1
+ import { withPrefix } from "../utils/index.js";
2
+
3
+ export default withPrefix("stylistic", {
4
+ "array-bracket-newline": ["warn", "consistent"],
5
+ "array-bracket-spacing": ["warn", "never"],
6
+ "arrow-parens": ["warn", "always"],
7
+ "arrow-spacing": ["warn", {
8
+ before: true,
9
+ after: true
10
+ }],
11
+ "block-spacing": ["warn", "always"],
12
+ "brace-style": ["warn", "stroustrup"],
13
+ "comma-dangle": ["warn", "never"],
14
+ "comma-spacing": ["warn", {
15
+ before: false,
16
+ after: true
17
+ }],
18
+ "comma-style": ["warn", "last"],
19
+ "computed-property-spacing": ["warn", "never"],
20
+ "dot-location": ["warn", "property"],
21
+ "eol-last": ["warn", "never"],
22
+ "function-call-argument-newline": ["warn", "consistent"],
23
+ "function-call-spacing": ["warn", "never"],
24
+ "function-paren-newline": ["warn", "consistent"],
25
+ "implicit-arrow-linebreak": ["warn", "beside"],
26
+ "jsx-quotes": ["warn", "prefer-double"],
27
+ "generator-star-spacing": ["warn", {
28
+ named: {
29
+ before: false,
30
+ after: true
31
+ },
32
+ anonymous: {
33
+ before: true,
34
+ after: false
35
+ },
36
+ method: {
37
+ before: true,
38
+ after: true
39
+ }
40
+ }],
41
+ "key-spacing": ["warn", {
42
+ beforeColon: false,
43
+ afterColon: true,
44
+ mode: "strict"
45
+ }],
46
+ "keyword-spacing": ["warn", {
47
+ before: true,
48
+ after: true
49
+ }],
50
+ "linebreak-style": ["warn", "unix"],
51
+ "lines-between-class-members": ["warn", "always", {
52
+ exceptAfterSingleLine: true
53
+ }],
54
+ "no-confusing-arrow": "warn",
55
+ "no-floating-decimal": "warn",
56
+ "no-extra-parens": ["warn", "functions"],
57
+ "no-extra-semi": "warn",
58
+ "no-mixed-spaces-and-tabs": "warn",
59
+ "no-tabs": "warn",
60
+ "no-trailing-spaces": "warn",
61
+ "no-whitespace-before-property": "warn",
62
+ "nonblock-statement-body-position": ["warn", "beside"],
63
+ "object-curly-newline": "warn",
64
+ "object-curly-spacing": ["warn", "always"],
65
+ "object-property-newline": ["warn", {
66
+ allowAllPropertiesOnSameLine: true
67
+ }],
68
+ "quotes": ["warn", "double", {
69
+ allowTemplateLiterals: true
70
+ }],
71
+ "rest-spread-spacing": ["warn", "never"],
72
+ "semi": ["warn", "always"],
73
+ "semi-spacing": ["warn", {
74
+ before: false,
75
+ after: true
76
+ }],
77
+ "semi-style": ["warn", "last"],
78
+ "space-before-blocks": ["warn", "always"],
79
+ "space-before-function-paren": ["warn", {
80
+ named: "never",
81
+ anonymous: "never",
82
+ asyncArrow: "always"
83
+ }],
84
+ "space-in-parens": ["warn", "never"],
85
+ "space-infix-ops": "warn",
86
+ "switch-colon-spacing": ["warn", {
87
+ before: false,
88
+ after: true
89
+ }],
90
+ "template-curly-spacing": ["warn", "never"],
91
+ "template-tag-spacing": ["warn", "never"],
92
+ "wrap-iife": ["warn", "inside", {
93
+ functionPrototypeMethods: true
94
+ }],
95
+ "yield-star-spacing": ["warn", "after"]
96
+ });
package/lib/vue.js ADDED
@@ -0,0 +1,101 @@
1
+ import { withPrefix } from "../utils/index.js";
2
+
3
+ export default withPrefix("vue", {
4
+ "attribute-hyphenation": "warn",
5
+ "attributes-order": ["warn", {
6
+ order: [
7
+ "LIST_RENDERING",
8
+ "CONDITIONALS",
9
+ "RENDER_MODIFIERS",
10
+ "OTHER_DIRECTIVES",
11
+ "SLOT",
12
+ "DEFINITION",
13
+ "UNIQUE",
14
+ "GLOBAL",
15
+ ["ATTR_DYNAMIC", "ATTR_STATIC", "ATTR_SHORTHAND_BOOL"],
16
+ "TWO_WAY_BINDING",
17
+ "EVENTS",
18
+ "CONTENT"
19
+ ]
20
+ }],
21
+ "component-definition-name-casing": ["warn", "kebab-case"],
22
+ "first-attribute-linebreak": ["warn", {
23
+ singleline: "beside",
24
+ multiline: "below"
25
+ }],
26
+ "html-closing-bracket-newline": ["warn", {
27
+ singleline: "never",
28
+ multiline: "always"
29
+ }],
30
+ "html-quotes": ["warn", "double"],
31
+ "html-self-closing": ["warn", {
32
+ html: {
33
+ void: "always",
34
+ normal: "never",
35
+ component: "always"
36
+ },
37
+ svg: "always",
38
+ math: "always"
39
+ }],
40
+ "mustache-interpolation-spacing": ["warn", "always"],
41
+ "no-dupe-keys": "warn",
42
+ "no-dupe-v-else-if": "warn",
43
+ "no-duplicate-attributes": "warn",
44
+ "no-export-in-script-setup": "warn",
45
+ "no-expose-after-await": "warn",
46
+ "no-lifecycle-after-await": "warn",
47
+ "no-lone-template": "warn",
48
+ "no-mutating-props": "warn",
49
+ "no-multiple-slot-args": "warn",
50
+ "no-multi-spaces": "warn",
51
+ "no-ref-as-operand": "warn",
52
+ "no-reserved-component-names": "warn",
53
+ "no-reserved-keys": "warn",
54
+ "no-reserved-props": "warn",
55
+ "no-side-effects-in-computed-properties": "warn",
56
+ "no-spaces-around-equal-signs-in-attribute": "warn",
57
+ "no-template-key": "warn",
58
+ "no-template-shadow": "warn",
59
+ "no-textarea-mustache": "warn",
60
+ "no-unused-vars": "warn",
61
+ "no-use-computed-property-like-method": "warn",
62
+ "no-use-v-if-with-v-for": "warn",
63
+ "no-useless-template-attributes": "warn",
64
+ "no-v-for-template-key-on-child": "warn",
65
+ "no-v-text-v-html-on-component": "warn",
66
+ "no-watch-after-await": "warn",
67
+ "one-component-per-file": "warn",
68
+ "prefer-import-from-vue": "warn",
69
+ "prop-name-casing": ["warn", "camelCase"],
70
+ "require-component-is": "warn",
71
+ "require-explicit-emits": "warn",
72
+ "require-prop-type-constructor": "warn",
73
+ "require-render-return": "warn",
74
+ "require-slots-as-functions": "warn",
75
+ "require-toggle-inside-transition": "warn",
76
+ "require-valid-default-prop": "warn",
77
+ "return-in-computed-property": "warn",
78
+ "return-in-emits-validator": "warn",
79
+ "this-in-template": ["warn", "never"],
80
+ "use-v-on-exact": "warn",
81
+ "valid-attribute-name": "warn",
82
+ "valid-define-emits": "warn",
83
+ "valid-define-props": "warn",
84
+ "valid-next-tick": "warn",
85
+ "valid-v-bind": "warn",
86
+ "valid-v-cloak": "warn",
87
+ "valid-v-else-if": "warn",
88
+ "valid-v-else": "warn",
89
+ "valid-v-html": "warn",
90
+ "valid-v-if": "warn",
91
+ "valid-v-memo": "warn",
92
+ "valid-v-model": "warn",
93
+ "valid-v-on": "warn",
94
+ "valid-v-once": "warn",
95
+ "valid-v-pre": "warn",
96
+ "valid-v-show": "warn",
97
+ "valid-v-slot": "warn",
98
+ "valid-v-text": "warn",
99
+ "v-bind-style": ["warn", "shorthand"],
100
+ "v-on-style": ["warn", "shorthand"]
101
+ });
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@zinkawaii/eslint-config",
3
+ "version": "0.0.1",
4
+ "main": "index.js",
5
+ "author": "KazariEX",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/KazariEX/eslint-config.git"
10
+ },
11
+ "type": "module"
12
+ }
package/utils/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export function withPrefix(prefix, obj) {
2
+ return Object.fromEntries(Object.entries(obj).map(([key, value]) => {
3
+ return [`${prefix}/${key}`, value];
4
+ }));
5
+ }