@eienjs/eslint-config 2.1.0 → 2.1.2
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/cli/constants_generated.mjs +3 -3
- package/dist/configs/adonisjs.mjs +4 -1
- package/dist/configs/astro.mjs +1 -0
- package/dist/configs/disables.mjs +8 -4
- package/dist/configs/markdown.mjs +1 -0
- package/dist/configs/test.mjs +1 -0
- package/dist/configs/unicorn.mjs +63 -54
- package/dist/configs/vue.mjs +1 -0
- package/dist/package.mjs +1 -1
- package/dist/typegen.d.mts +5 -2
- package/package.json +9 -9
|
@@ -5,9 +5,9 @@ import.meta.url;
|
|
|
5
5
|
const versionsMap = {
|
|
6
6
|
"@adonisjs/eslint-plugin": "^2.2.2",
|
|
7
7
|
"@nuxt/eslint-plugin": "^1.16.0",
|
|
8
|
-
"astro-eslint-parser": "^2.
|
|
9
|
-
"eslint": "^10.
|
|
10
|
-
"eslint-plugin-astro": "^2.
|
|
8
|
+
"astro-eslint-parser": "^2.1.0",
|
|
9
|
+
"eslint": "^10.6.0",
|
|
10
|
+
"eslint-plugin-astro": "^2.1.1",
|
|
11
11
|
"eslint-plugin-format": "^2.0.1",
|
|
12
12
|
"prettier-plugin-astro": "^0.14.1"
|
|
13
13
|
};
|
|
@@ -64,7 +64,10 @@ async function adonisjs(options = {}) {
|
|
|
64
64
|
{
|
|
65
65
|
files: fileRoutes,
|
|
66
66
|
name: "eienjs/adonisjs/disables",
|
|
67
|
-
rules: {
|
|
67
|
+
rules: {
|
|
68
|
+
"antfu/no-top-level-await": "off",
|
|
69
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
70
|
+
}
|
|
68
71
|
},
|
|
69
72
|
{
|
|
70
73
|
files: [join(dirs.database, nestedGlobPattern)],
|
package/dist/configs/astro.mjs
CHANGED
|
@@ -39,6 +39,7 @@ async function astro(options = {}) {
|
|
|
39
39
|
"astro/no-unused-define-vars-in-style": "error",
|
|
40
40
|
"astro/semi": "off",
|
|
41
41
|
"astro/valid-compile": "error",
|
|
42
|
+
"unicorn/no-top-level-side-effects": "off",
|
|
42
43
|
...!stylistic && {
|
|
43
44
|
"@stylistic/indent": "off",
|
|
44
45
|
"@stylistic/jsx-closing-tag-location": "off",
|
|
@@ -12,7 +12,8 @@ function disables() {
|
|
|
12
12
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
13
13
|
"@typescript-eslint/no-deprecated": "off",
|
|
14
14
|
"antfu/no-top-level-await": "off",
|
|
15
|
-
"no-console": "off"
|
|
15
|
+
"no-console": "off",
|
|
16
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
19
|
{
|
|
@@ -22,7 +23,8 @@ function disables() {
|
|
|
22
23
|
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
23
24
|
"antfu/no-top-level-await": "off",
|
|
24
25
|
"no-console": "off",
|
|
25
|
-
"unicorn/no-process-exit": "off"
|
|
26
|
+
"unicorn/no-process-exit": "off",
|
|
27
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
26
28
|
}
|
|
27
29
|
},
|
|
28
30
|
{
|
|
@@ -53,7 +55,8 @@ function disables() {
|
|
|
53
55
|
rules: {
|
|
54
56
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
55
57
|
"antfu/no-top-level-await": "off",
|
|
56
|
-
"no-console": "off"
|
|
58
|
+
"no-console": "off",
|
|
59
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
57
60
|
}
|
|
58
61
|
},
|
|
59
62
|
{
|
|
@@ -86,7 +89,8 @@ function disables() {
|
|
|
86
89
|
rules: {
|
|
87
90
|
"antfu/no-top-level-await": "off",
|
|
88
91
|
"no-console": "off",
|
|
89
|
-
"unicorn/no-process-exit": "off"
|
|
92
|
+
"unicorn/no-process-exit": "off",
|
|
93
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
];
|
|
@@ -67,6 +67,7 @@ async function markdown(options = {}) {
|
|
|
67
67
|
"no-unused-labels": "off",
|
|
68
68
|
"no-unused-vars": "off",
|
|
69
69
|
"unicode-bom": "off",
|
|
70
|
+
"unicorn/no-top-level-side-effects": "off",
|
|
70
71
|
"unused-imports/no-unused-imports": "off",
|
|
71
72
|
"unused-imports/no-unused-vars": "off",
|
|
72
73
|
...overrides
|
package/dist/configs/test.mjs
CHANGED
package/dist/configs/unicorn.mjs
CHANGED
|
@@ -6,61 +6,70 @@ import { pluginUnicorn } from "../plugins.mjs";
|
|
|
6
6
|
//#region src/configs/unicorn.ts
|
|
7
7
|
function unicorn(options = {}) {
|
|
8
8
|
const { allRecommended = true, overrides = {} } = options;
|
|
9
|
-
return [
|
|
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
|
-
|
|
9
|
+
return [{
|
|
10
|
+
name: "eienjs/unicorn/setup",
|
|
11
|
+
plugins: { unicorn: pluginUnicorn }
|
|
12
|
+
}, {
|
|
13
|
+
files: [GLOB_SRC],
|
|
14
|
+
name: "eienjs/unicorn/rules",
|
|
15
|
+
rules: {
|
|
16
|
+
...allRecommended ? pluginUnicorn.configs.recommended.rules : {
|
|
17
|
+
"unicorn/consistent-empty-array-spread": "error",
|
|
18
|
+
"unicorn/error-message": "error",
|
|
19
|
+
"unicorn/escape-case": "error",
|
|
20
|
+
"unicorn/new-for-builtins": "error",
|
|
21
|
+
"unicorn/no-instanceof-builtins": "error",
|
|
22
|
+
"unicorn/no-new-array": "error",
|
|
23
|
+
"unicorn/no-new-buffer": "error",
|
|
24
|
+
"unicorn/number-literal-case": "error",
|
|
25
|
+
"unicorn/prefer-dom-node-text-content": "error",
|
|
26
|
+
"unicorn/prefer-includes": "error",
|
|
27
|
+
"unicorn/prefer-node-protocol": "error",
|
|
28
|
+
"unicorn/prefer-number-properties": "error",
|
|
29
|
+
"unicorn/prefer-string-starts-ends-with": "error",
|
|
30
|
+
"unicorn/prefer-type-error": "error",
|
|
31
|
+
"unicorn/throw-new-error": "error"
|
|
32
|
+
},
|
|
33
|
+
"unicorn/consistent-class-member-order": ["error", { order: [
|
|
34
|
+
"static-field",
|
|
35
|
+
"static-block",
|
|
36
|
+
"public-field",
|
|
37
|
+
"private-field",
|
|
38
|
+
"constructor",
|
|
39
|
+
"public-method",
|
|
40
|
+
"static-method",
|
|
41
|
+
"private-method"
|
|
42
|
+
] }],
|
|
43
|
+
"unicorn/consistent-destructuring": "error",
|
|
44
|
+
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
45
|
+
"unicorn/expiring-todo-comments": "off",
|
|
46
|
+
"unicorn/filename-case": ["error", {
|
|
47
|
+
case: "snakeCase",
|
|
48
|
+
ignore: [String.raw`\.md$`, String.raw`\.mdx$`]
|
|
49
|
+
}],
|
|
50
|
+
"unicorn/max-nested-calls": ["error", { max: 5 }],
|
|
51
|
+
"unicorn/name-replacements": "off",
|
|
52
|
+
"unicorn/no-array-reduce": "off",
|
|
53
|
+
"unicorn/no-non-function-verb-prefix": "off",
|
|
54
|
+
"unicorn/no-null": "off",
|
|
55
|
+
"unicorn/no-static-only-class": "off",
|
|
56
|
+
"unicorn/no-thenable": "off",
|
|
57
|
+
"unicorn/no-this-assignment": "off",
|
|
58
|
+
"unicorn/no-this-outside-of-class": "off",
|
|
59
|
+
"unicorn/numeric-separators-style": "off",
|
|
60
|
+
"unicorn/prefer-await": "off",
|
|
61
|
+
"unicorn/prefer-dom-node-append": "off",
|
|
62
|
+
"unicorn/prefer-dom-node-dataset": "off",
|
|
63
|
+
"unicorn/prefer-dom-node-remove": "off",
|
|
64
|
+
"unicorn/prefer-dom-node-text-content": "off",
|
|
65
|
+
"unicorn/prefer-export-from": "off",
|
|
66
|
+
"unicorn/prefer-modern-dom-apis": "off",
|
|
67
|
+
"unicorn/prefer-query-selector": "off",
|
|
68
|
+
"unicorn/prefer-switch": ["error", { emptyDefaultCase: "do-nothing-comment" }],
|
|
69
|
+
"unicorn/prefer-top-level-await": "off",
|
|
70
|
+
...overrides
|
|
62
71
|
}
|
|
63
|
-
];
|
|
72
|
+
}];
|
|
64
73
|
}
|
|
65
74
|
//#endregion
|
|
66
75
|
export { unicorn };
|
package/dist/configs/vue.mjs
CHANGED
package/dist/package.mjs
CHANGED
package/dist/typegen.d.mts
CHANGED
|
@@ -3189,7 +3189,7 @@ interface RuleOptions {
|
|
|
3189
3189
|
* Disallow expressions where the operation doesn't affect the value
|
|
3190
3190
|
* @see https://eslint.org/docs/latest/rules/no-constant-binary-expression
|
|
3191
3191
|
*/
|
|
3192
|
-
'no-constant-binary-expression'?: Linter.RuleEntry<
|
|
3192
|
+
'no-constant-binary-expression'?: Linter.RuleEntry<NoConstantBinaryExpression>;
|
|
3193
3193
|
/**
|
|
3194
3194
|
* Disallow constant expressions in conditions
|
|
3195
3195
|
* @see https://eslint.org/docs/latest/rules/no-constant-condition
|
|
@@ -12333,6 +12333,9 @@ type NoConfusingArrow = [] | [{
|
|
|
12333
12333
|
}]; // ----- no-console -----
|
|
12334
12334
|
type NoConsole = [] | [{
|
|
12335
12335
|
allow?: [string, ...(string)[]];
|
|
12336
|
+
}]; // ----- no-constant-binary-expression -----
|
|
12337
|
+
type NoConstantBinaryExpression = [] | [{
|
|
12338
|
+
checkRelationalComparisons?: boolean;
|
|
12336
12339
|
}]; // ----- no-constant-condition -----
|
|
12337
12340
|
type NoConstantCondition = [] | [{
|
|
12338
12341
|
checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false);
|
|
@@ -17517,6 +17520,6 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
17517
17520
|
exceptRange?: boolean;
|
|
17518
17521
|
onlyEquality?: boolean;
|
|
17519
17522
|
}]; // Names of all the configs
|
|
17520
|
-
type ConfigNames = 'eienjs/gitignore' | 'eienjs/ignores' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/command/rules' | 'eienjs/perfectionist/setup' | 'eienjs/node/setup' | 'eienjs/node/rules' | 'eienjs/jsdoc/setup' | 'eienjs/jsdoc/rules' | 'eienjs/imports/rules' | 'eienjs/e18e/setup' | 'eienjs/e18e/rules' | 'eienjs/unicorn/setup' | 'eienjs/unicorn/rules' | 'eienjs/
|
|
17523
|
+
type ConfigNames = 'eienjs/gitignore' | 'eienjs/ignores' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/command/rules' | 'eienjs/perfectionist/setup' | 'eienjs/node/setup' | 'eienjs/node/rules' | 'eienjs/jsdoc/setup' | 'eienjs/jsdoc/rules' | 'eienjs/imports/rules' | 'eienjs/e18e/setup' | 'eienjs/e18e/rules' | 'eienjs/unicorn/setup' | 'eienjs/unicorn/rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/type-aware-parser' | 'eienjs/typescript/rules' | 'eienjs/typescript/rules-type-aware' | 'eienjs/typescript/disables' | 'eienjs/typescript/erasable-syntax-only' | 'eienjs/stylistic/rules' | 'eienjs/regexp/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/vue/composables-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/inertia-rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/transformers-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/adonisjs/types-disables' | 'eienjs/nuxt/setup' | 'eienjs/nuxt/vue/single-root' | 'eienjs/nuxt/rules' | 'eienjs/nuxt/utils-disables' | 'eienjs/nuxt/sort-config' | 'eienjs/nuxt/vue/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/sort/package-json' | 'eienjs/sort/tsconfig-json' | 'eienjs/pnpm/package-json' | 'eienjs/pnpm/pnpm-workspace-yaml' | 'eienjs/pnpm/pnpm-workspace-yaml-sort' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/rules' | 'eienjs/markdown/disables/code' | 'eienjs/formatter/setup' | 'eienjs/formatter/css' | 'eienjs/formatter/scss' | 'eienjs/formatter/less' | 'eienjs/formatter/html' | 'eienjs/formatter/xml' | 'eienjs/formatter/svg' | 'eienjs/formatter/markdown' | 'eienjs/formatter/astro' | 'eienjs/formatter/astro/disables' | 'eienjs/disables/scripts' | 'eienjs/disables/cli' | 'eienjs/disables/bin' | 'eienjs/disables/dts' | 'eienjs/disables/cjs' | 'eienjs/disables/config-files' | 'eienjs/disables/json' | 'eienjs/disables/yaml' | 'eienjs/disables/toml' | 'eienjs/disables/astro' | 'eienjs/disables/deploy-tools';
|
|
17521
17524
|
//#endregion
|
|
17522
17525
|
export { ConfigNames, RuleOptions };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eienjs/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"description": "EienJS ESLint Config",
|
|
6
6
|
"author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
"eslint-plugin-antfu": "^3.2.3",
|
|
88
88
|
"eslint-plugin-command": "^3.5.2",
|
|
89
89
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
90
|
-
"eslint-plugin-jsdoc": "^63.0.
|
|
90
|
+
"eslint-plugin-jsdoc": "^63.0.10",
|
|
91
91
|
"eslint-plugin-jsonc": "^3.2.0",
|
|
92
|
-
"eslint-plugin-n": "^18.1
|
|
92
|
+
"eslint-plugin-n": "^18.2.1",
|
|
93
93
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
94
94
|
"eslint-plugin-perfectionist": "^5.9.1",
|
|
95
95
|
"eslint-plugin-pnpm": "^1.6.1",
|
|
96
|
-
"eslint-plugin-regexp": "^3.1.
|
|
96
|
+
"eslint-plugin-regexp": "^3.1.1",
|
|
97
97
|
"eslint-plugin-toml": "^1.4.0",
|
|
98
98
|
"eslint-plugin-unicorn": "^69.0.0",
|
|
99
99
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
"@nuxt/eslint-plugin": "^1.16.0",
|
|
117
117
|
"@prettier/plugin-xml": "^3.4.2",
|
|
118
118
|
"@types/node": "^24.13.2",
|
|
119
|
-
"astro-eslint-parser": "^2.
|
|
119
|
+
"astro-eslint-parser": "^2.1.0",
|
|
120
120
|
"auto-changelog": "^2.6.0",
|
|
121
|
-
"baseline-browser-mapping": "^2.10.
|
|
122
|
-
"eslint": "^10.
|
|
123
|
-
"eslint-plugin-astro": "^2.
|
|
121
|
+
"baseline-browser-mapping": "^2.10.40",
|
|
122
|
+
"eslint": "^10.6.0",
|
|
123
|
+
"eslint-plugin-astro": "^2.1.1",
|
|
124
124
|
"eslint-plugin-erasable-syntax-only": "^0.4.2",
|
|
125
125
|
"eslint-plugin-format": "^2.0.1",
|
|
126
126
|
"eslint-typegen": "^2.3.1",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"husky": "^9.1.7",
|
|
129
129
|
"pnpm-workspace-yaml": "^1.6.1",
|
|
130
130
|
"prettier-plugin-astro": "^0.14.1",
|
|
131
|
-
"release-it": "^20.2.
|
|
131
|
+
"release-it": "^20.2.1",
|
|
132
132
|
"tsdown": "^0.22.3",
|
|
133
133
|
"tsdown-stale-guard": "^0.1.2",
|
|
134
134
|
"tsx": "^4.22.4",
|