@eienjs/eslint-config 1.8.1 → 1.9.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/cli/constants_generated.mjs +2 -2
- package/dist/configs/typescript.mjs +5 -1
- package/dist/configs/vue.mjs +7 -2
- package/dist/package.mjs +1 -1
- package/dist/typegen.d.mts +27 -2
- package/dist/types.d.mts +2 -1
- package/package.json +18 -18
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/cli/constants_generated.ts
|
|
2
2
|
const versionsMap = {
|
|
3
|
-
"@adonisjs/eslint-plugin": "^2.2.
|
|
3
|
+
"@adonisjs/eslint-plugin": "^2.2.1",
|
|
4
4
|
"@nuxt/eslint-plugin": "^1.12.1",
|
|
5
5
|
"astro-eslint-parser": "^1.2.2",
|
|
6
6
|
"eslint": "^9.39.2",
|
|
7
7
|
"eslint-plugin-astro": "^1.5.0",
|
|
8
|
-
"eslint-plugin-format": "^1.
|
|
8
|
+
"eslint-plugin-format": "^1.2.0",
|
|
9
9
|
"prettier-plugin-astro": "^0.14.1"
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -12,7 +12,11 @@ async function typescript(options = {}) {
|
|
|
12
12
|
GLOB_VUE,
|
|
13
13
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
14
14
|
];
|
|
15
|
-
const filesTypeAware = options.filesTypeAware ?? [
|
|
15
|
+
const filesTypeAware = options.filesTypeAware ?? [
|
|
16
|
+
GLOB_TS,
|
|
17
|
+
GLOB_TSX,
|
|
18
|
+
GLOB_VUE
|
|
19
|
+
];
|
|
16
20
|
const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
|
|
17
21
|
const tsconfigPath = options.tsconfigPath ?? void 0;
|
|
18
22
|
const isTypeAware = Boolean(tsconfigPath);
|
package/dist/configs/vue.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { mergeProcessors } from "eslint-merge-processors";
|
|
|
6
6
|
async function vue(options = {}) {
|
|
7
7
|
const { componentNameInTemplateCasingGlobals = [], componentNameInTemplateCasingIgnores = [], componentNameInTemplateCasingOnlyRegistered = false, files = [GLOB_VUE], overrides = {}, stylistic = true, typescript } = options;
|
|
8
8
|
const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
|
|
9
|
-
const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
|
|
9
|
+
const { indent = 2, maxLineLength = 120 } = typeof stylistic === "boolean" ? {} : stylistic;
|
|
10
10
|
const [pluginVue, parserVue, processorVueBlocks] = await Promise.all([
|
|
11
11
|
interopDefault(import("eslint-plugin-vue")),
|
|
12
12
|
interopDefault(import("vue-eslint-parser")),
|
|
@@ -90,7 +90,7 @@ async function vue(options = {}) {
|
|
|
90
90
|
"defineEmits",
|
|
91
91
|
"defineSlots"
|
|
92
92
|
] }],
|
|
93
|
-
"vue/define-props-declaration":
|
|
93
|
+
"vue/define-props-declaration": "error",
|
|
94
94
|
"vue/dot-location": ["error", "property"],
|
|
95
95
|
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
96
96
|
"vue/eqeqeq": ["error", "smart"],
|
|
@@ -177,6 +177,11 @@ async function vue(options = {}) {
|
|
|
177
177
|
after: true,
|
|
178
178
|
before: true
|
|
179
179
|
}],
|
|
180
|
+
"vue/max-len": ["error", {
|
|
181
|
+
code: maxLineLength,
|
|
182
|
+
comments: maxLineLength,
|
|
183
|
+
template: maxLineLength
|
|
184
|
+
}],
|
|
180
185
|
"vue/object-curly-newline": "off",
|
|
181
186
|
"vue/object-curly-spacing": ["error", "always"],
|
|
182
187
|
"vue/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
package/dist/package.mjs
CHANGED
package/dist/typegen.d.mts
CHANGED
|
@@ -278,6 +278,7 @@ interface RuleOptions {
|
|
|
278
278
|
/**
|
|
279
279
|
* Enforce props alphabetical sorting
|
|
280
280
|
* @see https://eslint.style/rules/jsx-sort-props
|
|
281
|
+
* @deprecated
|
|
281
282
|
*/
|
|
282
283
|
'@stylistic/jsx-sort-props'?: Linter.RuleEntry<StylisticJsxSortProps>;
|
|
283
284
|
/**
|
|
@@ -1892,6 +1893,11 @@ interface RuleOptions {
|
|
|
1892
1893
|
* @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/no-named-default/README.md
|
|
1893
1894
|
*/
|
|
1894
1895
|
'import/no-named-default'?: Linter.RuleEntry<[]>;
|
|
1896
|
+
/**
|
|
1897
|
+
* Prefer a default export if module exports a single name or multiple names.
|
|
1898
|
+
* @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/prefer-default-export/README.md
|
|
1899
|
+
*/
|
|
1900
|
+
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>;
|
|
1895
1901
|
/**
|
|
1896
1902
|
* Enforce consistent indentation
|
|
1897
1903
|
* @see https://eslint.org/docs/latest/rules/indent
|
|
@@ -4651,7 +4657,7 @@ interface RuleOptions {
|
|
|
4651
4657
|
* disallow conditional expects
|
|
4652
4658
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
|
|
4653
4659
|
*/
|
|
4654
|
-
'test/no-conditional-expect'?: Linter.RuleEntry<
|
|
4660
|
+
'test/no-conditional-expect'?: Linter.RuleEntry<TestNoConditionalExpect>;
|
|
4655
4661
|
/**
|
|
4656
4662
|
* disallow conditional tests
|
|
4657
4663
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
|
|
@@ -4878,6 +4884,11 @@ interface RuleOptions {
|
|
|
4878
4884
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
|
|
4879
4885
|
*/
|
|
4880
4886
|
'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>;
|
|
4887
|
+
/**
|
|
4888
|
+
* Prefer mock return shorthands
|
|
4889
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
|
|
4890
|
+
*/
|
|
4891
|
+
'test/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>;
|
|
4881
4892
|
/**
|
|
4882
4893
|
* enforce including a hint with external snapshots
|
|
4883
4894
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
|
|
@@ -4963,6 +4974,11 @@ interface RuleOptions {
|
|
|
4963
4974
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-mock-type-parameters.md
|
|
4964
4975
|
*/
|
|
4965
4976
|
'test/require-mock-type-parameters'?: Linter.RuleEntry<TestRequireMockTypeParameters>;
|
|
4977
|
+
/**
|
|
4978
|
+
* require tests to declare a timeout
|
|
4979
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-test-timeout.md
|
|
4980
|
+
*/
|
|
4981
|
+
'test/require-test-timeout'?: Linter.RuleEntry<[]>;
|
|
4966
4982
|
/**
|
|
4967
4983
|
* require toThrow() to be called with an error message
|
|
4968
4984
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
|
|
@@ -8511,7 +8527,7 @@ type StylisticTypeAnnotationSpacing = [] | [{
|
|
|
8511
8527
|
after?: boolean;
|
|
8512
8528
|
overrides?: {
|
|
8513
8529
|
colon?: _StylisticTypeAnnotationSpacing_SpacingConfig;
|
|
8514
|
-
arrow?: _StylisticTypeAnnotationSpacing_SpacingConfig;
|
|
8530
|
+
arrow?: ("ignore" | _StylisticTypeAnnotationSpacing_SpacingConfig);
|
|
8515
8531
|
variable?: _StylisticTypeAnnotationSpacing_SpacingConfig;
|
|
8516
8532
|
parameter?: _StylisticTypeAnnotationSpacing_SpacingConfig;
|
|
8517
8533
|
property?: _StylisticTypeAnnotationSpacing_SpacingConfig;
|
|
@@ -9784,6 +9800,10 @@ type ImportNewlineAfterImport = [] | [{
|
|
|
9784
9800
|
type ImportNoDuplicates = [] | [{
|
|
9785
9801
|
"prefer-inline"?: boolean;
|
|
9786
9802
|
}];
|
|
9803
|
+
// ----- import/prefer-default-export -----
|
|
9804
|
+
type ImportPreferDefaultExport = [] | [{
|
|
9805
|
+
target?: ("single" | "any");
|
|
9806
|
+
}];
|
|
9787
9807
|
// ----- indent -----
|
|
9788
9808
|
type Indent = [] | [("tab" | number)] | [("tab" | number), {
|
|
9789
9809
|
SwitchCase?: number;
|
|
@@ -10145,6 +10165,7 @@ type JsdocRequireHyphenBeforeParamDescription = [] | [("always" | "never")] | [(
|
|
|
10145
10165
|
}];
|
|
10146
10166
|
// ----- jsdoc/require-jsdoc -----
|
|
10147
10167
|
type JsdocRequireJsdoc = [] | [{
|
|
10168
|
+
checkAllFunctionExpressions?: boolean;
|
|
10148
10169
|
checkConstructors?: boolean;
|
|
10149
10170
|
checkGetters?: (boolean | "no-setter");
|
|
10150
10171
|
checkSetters?: (boolean | "no-getter");
|
|
@@ -14060,6 +14081,10 @@ type TestMaxExpects = [] | [{
|
|
|
14060
14081
|
type TestMaxNestedDescribe = [] | [{
|
|
14061
14082
|
max?: number;
|
|
14062
14083
|
}];
|
|
14084
|
+
// ----- test/no-conditional-expect -----
|
|
14085
|
+
type TestNoConditionalExpect = [] | [{
|
|
14086
|
+
expectAssertions?: boolean;
|
|
14087
|
+
}];
|
|
14063
14088
|
// ----- test/no-focused-tests -----
|
|
14064
14089
|
type TestNoFocusedTests = [] | [{
|
|
14065
14090
|
fixable?: boolean;
|
package/dist/types.d.mts
CHANGED
|
@@ -259,7 +259,8 @@ interface OptionsHasTypeScript {
|
|
|
259
259
|
interface OptionsStylistic {
|
|
260
260
|
stylistic?: boolean | StylisticConfig;
|
|
261
261
|
}
|
|
262
|
-
interface StylisticConfig extends Pick<StylisticCustomizeOptions, '
|
|
262
|
+
interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'quotes' | 'experimental'> {
|
|
263
|
+
indent?: number | 'tab';
|
|
263
264
|
maxLineLength?: number;
|
|
264
265
|
}
|
|
265
266
|
interface OptionsOverrides {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eienjs/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.9.0",
|
|
5
5
|
"description": "EienJS ESLint Config",
|
|
6
6
|
"author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"node": ">=20.19"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@adonisjs/eslint-plugin": "^2.2.
|
|
39
|
+
"@adonisjs/eslint-plugin": "^2.2.1",
|
|
40
40
|
"@nuxt/eslint-plugin": "^1.12.1",
|
|
41
41
|
"@prettier/plugin-xml": "^3.4.2",
|
|
42
42
|
"astro-eslint-parser": "^1.2.2",
|
|
43
43
|
"eslint": "^9.39.2",
|
|
44
44
|
"eslint-plugin-astro": "^1.5.0",
|
|
45
45
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
46
|
-
"eslint-plugin-format": "^1.
|
|
46
|
+
"eslint-plugin-format": "^1.2.0",
|
|
47
47
|
"prettier-plugin-astro": "^0.14.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
@@ -77,44 +77,44 @@
|
|
|
77
77
|
"@clack/prompts": "^0.11.0",
|
|
78
78
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
79
79
|
"@eslint/markdown": "^7.5.1",
|
|
80
|
-
"@stylistic/eslint-plugin": "^5.
|
|
81
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
82
|
-
"@typescript-eslint/parser": "^8.
|
|
83
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
80
|
+
"@stylistic/eslint-plugin": "^5.7.0",
|
|
81
|
+
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
82
|
+
"@typescript-eslint/parser": "^8.52.0",
|
|
83
|
+
"@vitest/eslint-plugin": "^1.6.6",
|
|
84
84
|
"ansis": "^4.2.0",
|
|
85
85
|
"cac": "^6.7.14",
|
|
86
86
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
87
87
|
"eslint-flat-config-utils": "^2.1.4",
|
|
88
88
|
"eslint-merge-processors": "^2.0.0",
|
|
89
|
-
"eslint-plugin-antfu": "^3.1.
|
|
89
|
+
"eslint-plugin-antfu": "^3.1.3",
|
|
90
90
|
"eslint-plugin-command": "^3.4.0",
|
|
91
|
-
"eslint-plugin-import-lite": "^0.
|
|
92
|
-
"eslint-plugin-jsdoc": "^
|
|
91
|
+
"eslint-plugin-import-lite": "^0.5.0",
|
|
92
|
+
"eslint-plugin-jsdoc": "^62.0.0",
|
|
93
93
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
94
94
|
"eslint-plugin-n": "^17.23.1",
|
|
95
95
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
96
96
|
"eslint-plugin-perfectionist": "^4.15.1",
|
|
97
97
|
"eslint-plugin-pnpm": "^1.4.3",
|
|
98
98
|
"eslint-plugin-regexp": "^2.10.0",
|
|
99
|
-
"eslint-plugin-toml": "^0.
|
|
99
|
+
"eslint-plugin-toml": "^0.13.0",
|
|
100
100
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
101
101
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
102
102
|
"eslint-plugin-vue": "^10.6.2",
|
|
103
103
|
"eslint-plugin-yml": "^1.19.1",
|
|
104
104
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
105
|
-
"globals": "^
|
|
105
|
+
"globals": "^17.0.0",
|
|
106
106
|
"jsonc-eslint-parser": "^2.4.2",
|
|
107
107
|
"local-pkg": "^1.1.2",
|
|
108
108
|
"parse-gitignore": "^2.0.0",
|
|
109
109
|
"pathe": "^2.0.3",
|
|
110
|
-
"toml-eslint-parser": "^0.
|
|
110
|
+
"toml-eslint-parser": "^0.11.0",
|
|
111
111
|
"vue-eslint-parser": "^10.2.0",
|
|
112
112
|
"yaml-eslint-parser": "^1.3.2"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@adonisjs/eslint-plugin": "^2.2.
|
|
116
|
-
"@commitlint/cli": "^20.
|
|
117
|
-
"@commitlint/config-conventional": "^20.
|
|
115
|
+
"@adonisjs/eslint-plugin": "^2.2.1",
|
|
116
|
+
"@commitlint/cli": "^20.3.1",
|
|
117
|
+
"@commitlint/config-conventional": "^20.3.1",
|
|
118
118
|
"@eslint/config-inspector": "^1.4.2",
|
|
119
119
|
"@nuxt/eslint-plugin": "^1.12.1",
|
|
120
120
|
"@prettier/plugin-xml": "^3.4.2",
|
|
@@ -124,14 +124,14 @@
|
|
|
124
124
|
"eslint": "^9.39.2",
|
|
125
125
|
"eslint-plugin-astro": "^1.5.0",
|
|
126
126
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
127
|
-
"eslint-plugin-format": "^1.
|
|
127
|
+
"eslint-plugin-format": "^1.2.0",
|
|
128
128
|
"eslint-typegen": "^2.3.0",
|
|
129
129
|
"find-up-simple": "^1.0.1",
|
|
130
130
|
"husky": "^9.1.7",
|
|
131
131
|
"np": "^10.2.0",
|
|
132
132
|
"pnpm-workspace-yaml": "^1.4.3",
|
|
133
133
|
"prettier-plugin-astro": "^0.14.1",
|
|
134
|
-
"tsdown": "^0.18.
|
|
134
|
+
"tsdown": "^0.18.4",
|
|
135
135
|
"tsx": "^4.21.0",
|
|
136
136
|
"typescript": "^5.9.3"
|
|
137
137
|
},
|