@shayanthenerd/eslint-config 0.8.2 → 0.10.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/configs/base.js +2 -3
- package/dist/configs/css.js +2 -3
- package/dist/configs/cypress.js +2 -3
- package/dist/configs/html.js +2 -3
- package/dist/configs/importX.js +2 -3
- package/dist/configs/perfectionist.js +2 -3
- package/dist/configs/playwright.js +2 -3
- package/dist/configs/storybook.js +2 -3
- package/dist/configs/stylistic.js +2 -3
- package/dist/configs/tailwind.js +2 -3
- package/dist/configs/typescript.js +2 -3
- package/dist/configs/vitest.js +2 -3
- package/dist/configs/vue.js +2 -3
- package/dist/oxlint.config.jsonc +2 -1
- package/dist/rules/stylistic.js +9 -4
- package/dist/types/configOptions/vue.d.ts +1 -1
- package/dist/types/eslint-schema.d.ts +79 -2
- package/dist/utils/options/defaultOptions.js +1 -1
- package/dist/utils/options/mergeWithDefaults.js +1 -2
- package/package.json +28 -25
package/dist/configs/base.js
CHANGED
|
@@ -8,7 +8,7 @@ import javascriptESLint from "@eslint/js";
|
|
|
8
8
|
//#region src/configs/base.ts
|
|
9
9
|
function getBaseConfig(options) {
|
|
10
10
|
const { configs: { vue, base: { overrides } }, global: { globals: { node, worker, browser, commonjs, webextension, serviceworker, custom: userGlobals } } } = options;
|
|
11
|
-
|
|
11
|
+
return mergeConfigs({
|
|
12
12
|
name: "shayanthenerd/base",
|
|
13
13
|
files: [globs.src, vue ? globs.vue : ""],
|
|
14
14
|
extends: [javascriptESLint.configs.recommended],
|
|
@@ -35,8 +35,7 @@ function getBaseConfig(options) {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
rules: getJavaScriptRules(options)
|
|
38
|
-
};
|
|
39
|
-
return mergeConfigs(baseConfig, overrides);
|
|
38
|
+
}, overrides);
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
//#endregion
|
package/dist/configs/css.js
CHANGED
|
@@ -11,7 +11,7 @@ function getCSSConfig(options) {
|
|
|
11
11
|
const { css, tailwind } = options.configs;
|
|
12
12
|
const { overrides } = isEnabled(css) ? css : defaultOptions.configs.css;
|
|
13
13
|
const tailwindSyntax = isEnabled(tailwind) && tailwind.entryPoint ? tailwind4 : tailwind3;
|
|
14
|
-
|
|
14
|
+
return mergeConfigs({
|
|
15
15
|
name: "shayanthenerd/css",
|
|
16
16
|
files: [globs.css],
|
|
17
17
|
extends: [eslintCSS.configs.recommended],
|
|
@@ -21,8 +21,7 @@ function getCSSConfig(options) {
|
|
|
21
21
|
customSyntax: isEnabled(tailwind) ? tailwindSyntax : void 0
|
|
22
22
|
},
|
|
23
23
|
rules: getCSSRules(options)
|
|
24
|
-
};
|
|
25
|
-
return mergeConfigs(cssConfig, overrides);
|
|
24
|
+
}, overrides);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
//#endregion
|
package/dist/configs/cypress.js
CHANGED
|
@@ -9,13 +9,12 @@ import eslintPluginCypress from "eslint-plugin-cypress";
|
|
|
9
9
|
function getCypressConfig(options) {
|
|
10
10
|
const { cypress } = options.configs.test;
|
|
11
11
|
const { overrides } = isEnabled(cypress) ? cypress : defaultOptions.configs.test.cypress;
|
|
12
|
-
|
|
12
|
+
return mergeConfigs({
|
|
13
13
|
name: "shayanthenerd/cypress",
|
|
14
14
|
files: [globs.test],
|
|
15
15
|
extends: [eslintPluginCypress.configs.recommended],
|
|
16
16
|
rules: getCypressRules()
|
|
17
|
-
};
|
|
18
|
-
return mergeConfigs(cypressConfig, overrides);
|
|
17
|
+
}, overrides);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
//#endregion
|
package/dist/configs/html.js
CHANGED
|
@@ -9,14 +9,13 @@ import eslintPluginHTML from "@html-eslint/eslint-plugin";
|
|
|
9
9
|
function getHTMLConfig(options) {
|
|
10
10
|
const { html } = options.configs;
|
|
11
11
|
const { overrides } = isEnabled(html) ? html : defaultOptions.configs.html;
|
|
12
|
-
|
|
12
|
+
return mergeConfigs({
|
|
13
13
|
name: "shayanthenerd/html",
|
|
14
14
|
files: [globs.html],
|
|
15
15
|
extends: [eslintPluginHTML.configs["flat/recommended"]],
|
|
16
16
|
language: "html/html",
|
|
17
17
|
rules: getHTMLRules(options)
|
|
18
|
-
};
|
|
19
|
-
return mergeConfigs(htmlConfig, overrides);
|
|
18
|
+
}, overrides);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
//#endregion
|
package/dist/configs/importX.js
CHANGED
|
@@ -10,14 +10,13 @@ import eslintPluginUnusedImports from "eslint-plugin-unused-imports";
|
|
|
10
10
|
function getImportXConfig(options) {
|
|
11
11
|
const { vue, importX, typescript } = options.configs;
|
|
12
12
|
const { overrides } = isEnabled(importX) ? importX : defaultOptions.configs.importX;
|
|
13
|
-
|
|
13
|
+
return mergeConfigs({
|
|
14
14
|
name: "shayanthenerd/import-x",
|
|
15
15
|
files: [globs.src, vue ? globs.vue : ""],
|
|
16
16
|
extends: [eslintPluginImportX.flatConfigs.recommended, typescript ? eslintPluginImportX.flatConfigs.typescript : {}],
|
|
17
17
|
plugins: { "unused-imports": eslintPluginUnusedImports },
|
|
18
18
|
rules: getImportXRules(options)
|
|
19
|
-
};
|
|
20
|
-
return mergeConfigs(importXConfig, overrides);
|
|
19
|
+
}, overrides);
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
//#endregion
|
|
@@ -9,14 +9,13 @@ import eslintPluginPerfectionist from "eslint-plugin-perfectionist";
|
|
|
9
9
|
function getPerfectionistConfig(options) {
|
|
10
10
|
const { vue, perfectionist } = options.configs;
|
|
11
11
|
const { sortType, overrides } = isEnabled(perfectionist) ? perfectionist : defaultOptions.configs.perfectionist;
|
|
12
|
-
|
|
12
|
+
return mergeConfigs({
|
|
13
13
|
name: "shayanthenerd/perfectionist",
|
|
14
14
|
files: [globs.src, vue ? globs.vue : ""],
|
|
15
15
|
plugins: { perfectionist: eslintPluginPerfectionist },
|
|
16
16
|
settings: { perfectionist: { type: sortType } },
|
|
17
17
|
rules: getPerfectionistRules(options)
|
|
18
|
-
};
|
|
19
|
-
return mergeConfigs(perfectionistConfig, overrides);
|
|
18
|
+
}, overrides);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
//#endregion
|
|
@@ -9,13 +9,12 @@ import eslintPluginPlaywright from "eslint-plugin-playwright";
|
|
|
9
9
|
function getPlaywrightConfig(options) {
|
|
10
10
|
const { playwright } = options.configs.test;
|
|
11
11
|
const { overrides } = isEnabled(playwright) ? playwright : defaultOptions.configs.test.playwright;
|
|
12
|
-
|
|
12
|
+
return mergeConfigs({
|
|
13
13
|
name: "shayanthenerd/playwright",
|
|
14
14
|
files: [globs.test],
|
|
15
15
|
extends: [eslintPluginPlaywright.configs["flat/recommended"]],
|
|
16
16
|
rules: getPlaywrightRules(options)
|
|
17
|
-
};
|
|
18
|
-
return mergeConfigs(playwrightConfig, overrides);
|
|
17
|
+
}, overrides);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
//#endregion
|
|
@@ -10,13 +10,12 @@ const eslintConfigStorybook = eslintPluginStorybook.configs["flat/recommended"];
|
|
|
10
10
|
function getStorybookConfig(options) {
|
|
11
11
|
const { storybook } = options.configs.test;
|
|
12
12
|
const { overrides } = isEnabled(storybook) ? storybook : defaultOptions.configs.test.storybook;
|
|
13
|
-
|
|
13
|
+
return mergeConfigs({
|
|
14
14
|
name: "shayanthenerd/storybook",
|
|
15
15
|
files: [globs.storybook],
|
|
16
16
|
extends: [eslintConfigStorybook],
|
|
17
17
|
rules: getStorybookRules(options)
|
|
18
|
-
};
|
|
19
|
-
return mergeConfigs(storybookConfig, overrides);
|
|
18
|
+
}, overrides);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
//#endregion
|
|
@@ -9,13 +9,12 @@ import eslintPluginStylistic from "@stylistic/eslint-plugin";
|
|
|
9
9
|
function getStylisticConfig(options) {
|
|
10
10
|
const { stylistic } = options.configs;
|
|
11
11
|
const { overrides } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
|
|
12
|
-
|
|
12
|
+
return mergeConfigs({
|
|
13
13
|
name: "shayanthenerd/stylistic",
|
|
14
14
|
files: [globs.src, options.configs.vue ? globs.vue : ""],
|
|
15
15
|
extends: [eslintPluginStylistic.configs.recommended],
|
|
16
16
|
rules: getStylisticRules(options)
|
|
17
|
-
};
|
|
18
|
-
return mergeConfigs(stylisticConfig, overrides);
|
|
17
|
+
}, overrides);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
//#endregion
|
package/dist/configs/tailwind.js
CHANGED
|
@@ -14,7 +14,7 @@ const eslintParserVue = eslintPluginVue.configs["flat/recommended"].find((config
|
|
|
14
14
|
function getTailwindConfig(options) {
|
|
15
15
|
const { tsConfig, configs: { vue, html, tailwind } } = options;
|
|
16
16
|
const { config, entryPoint, overrides } = isEnabled(tailwind) ? tailwind : defaultOptions.configs.tailwind;
|
|
17
|
-
|
|
17
|
+
return mergeConfigs({
|
|
18
18
|
name: "shayanthenerd/tailwind",
|
|
19
19
|
files: [
|
|
20
20
|
globs.src,
|
|
@@ -34,8 +34,7 @@ function getTailwindConfig(options) {
|
|
|
34
34
|
]]]
|
|
35
35
|
} },
|
|
36
36
|
rules: getTailwindRules(options)
|
|
37
|
-
};
|
|
38
|
-
return mergeConfigs(tailwindConfig, overrides);
|
|
37
|
+
}, overrides);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
//#endregion
|
|
@@ -11,7 +11,7 @@ function getTypeScriptConfig(options) {
|
|
|
11
11
|
const { tsConfig, configs: { vue, typescript } } = options;
|
|
12
12
|
const { allowedDefaultProjects } = isEnabled(typescript) ? typescript : defaultOptions.configs.typescript;
|
|
13
13
|
const { overrides } = isEnabled(typescript) ? typescript : defaultOptions.configs.typescript;
|
|
14
|
-
|
|
14
|
+
return mergeConfigs({
|
|
15
15
|
name: "shayanthenerd/typescript",
|
|
16
16
|
files: [globs.ts, vue ? globs.vue : ""],
|
|
17
17
|
extends: [typescriptESLint.configs.strictTypeChecked, typescriptESLint.configs.stylisticTypeChecked],
|
|
@@ -24,8 +24,7 @@ function getTypeScriptConfig(options) {
|
|
|
24
24
|
}
|
|
25
25
|
} },
|
|
26
26
|
rules: getTypeScriptRules(options)
|
|
27
|
-
};
|
|
28
|
-
return mergeConfigs(typescriptConfig, overrides);
|
|
27
|
+
}, overrides);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
//#endregion
|
package/dist/configs/vitest.js
CHANGED
|
@@ -9,13 +9,12 @@ import eslintPluginVitest from "@vitest/eslint-plugin";
|
|
|
9
9
|
function getVitestConfig(options) {
|
|
10
10
|
const { vitest } = options.configs.test;
|
|
11
11
|
const { overrides } = isEnabled(vitest) ? vitest : defaultOptions.configs.test.vitest;
|
|
12
|
-
|
|
12
|
+
return mergeConfigs({
|
|
13
13
|
name: "shayanthenerd/vitest",
|
|
14
14
|
files: [globs.test],
|
|
15
15
|
extends: [eslintPluginVitest.configs.recommended],
|
|
16
16
|
rules: getVitestRules(options)
|
|
17
|
-
};
|
|
18
|
-
return mergeConfigs(vitestConfig, overrides);
|
|
17
|
+
}, overrides);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
//#endregion
|
package/dist/configs/vue.js
CHANGED
|
@@ -13,7 +13,7 @@ function getVueConfig(options) {
|
|
|
13
13
|
const { vue } = options.configs;
|
|
14
14
|
const accessibility = isEnabled(vue) && isEnabled(vue.accessibility);
|
|
15
15
|
const { overrides } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
|
|
16
|
-
|
|
16
|
+
return mergeConfigs({
|
|
17
17
|
name: "shayanthenerd/vue",
|
|
18
18
|
files: [globs.vue],
|
|
19
19
|
extends: [eslintPluginVue.configs["flat/recommended"], accessibility ? eslintPluginVueAccessibility.configs["flat/recommended"] : {}],
|
|
@@ -26,8 +26,7 @@ function getVueConfig(options) {
|
|
|
26
26
|
...getVueRules(options),
|
|
27
27
|
...accessibility ? getVueAccessibilityRules(options) : {}
|
|
28
28
|
}
|
|
29
|
-
};
|
|
30
|
-
return mergeConfigs(vueConfig, overrides);
|
|
29
|
+
}, overrides);
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
//#endregion
|
package/dist/oxlint.config.jsonc
CHANGED
|
@@ -54,8 +54,9 @@
|
|
|
54
54
|
"eslint/sort-imports": "off",
|
|
55
55
|
"eslint/no-magic-numbers": "off",
|
|
56
56
|
"eslint/arrow-body-style": "off",
|
|
57
|
-
"eslint/no-duplicate-imports": "off",
|
|
58
57
|
"eslint/func-names": ["error", "as-needed"],
|
|
58
|
+
"eslint/no-plusplus": ["warn", { "allowForLoopAfterthoughts": true }],
|
|
59
|
+
"eslint/no-duplicate-imports": ["error", { "allowSeparateTypeImports": true }],
|
|
59
60
|
"eslint/grouped-accessor-pairs": ["warn", "anyOrder", { "enforceForTSTypes": true }],
|
|
60
61
|
"eslint/no-console": [
|
|
61
62
|
"warn",
|
package/dist/rules/stylistic.js
CHANGED
|
@@ -9,8 +9,9 @@ function getStylisticRules(options) {
|
|
|
9
9
|
"@stylistic/wrap-regex": "warn",
|
|
10
10
|
"@stylistic/semi-style": "warn",
|
|
11
11
|
"@stylistic/semi": ["warn", semi],
|
|
12
|
-
"@stylistic/spaced-comment": "off",
|
|
13
12
|
"@stylistic/no-extra-semi": "warn",
|
|
13
|
+
"@stylistic/spaced-comment": "off",
|
|
14
|
+
"@stylistic/exp-list-style": "warn",
|
|
14
15
|
"@stylistic/linebreak-style": "warn",
|
|
15
16
|
"@stylistic/quotes": ["warn", quotes],
|
|
16
17
|
"@stylistic/no-confusing-arrow": "warn",
|
|
@@ -21,11 +22,10 @@ function getStylisticRules(options) {
|
|
|
21
22
|
"@stylistic/lines-between-class-members": "off",
|
|
22
23
|
"@stylistic/arrow-parens": ["warn", arrowParens],
|
|
23
24
|
"@stylistic/comma-dangle": ["warn", trailingComma],
|
|
24
|
-
"@stylistic/object-curly-spacing": ["warn", "always"],
|
|
25
|
-
"@stylistic/nonblock-statement-body-position": "error",
|
|
26
25
|
"@stylistic/generator-star-spacing": ["warn", "after"],
|
|
27
|
-
"@stylistic/
|
|
26
|
+
"@stylistic/nonblock-statement-body-position": "error",
|
|
28
27
|
"@stylistic/array-bracket-newline": ["warn", "consistent"],
|
|
28
|
+
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
|
|
29
29
|
"@stylistic/no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
|
|
30
30
|
"@stylistic/indent-binary-ops": ["warn", useTabs ? "tab" : indent],
|
|
31
31
|
"@stylistic/function-call-argument-newline": ["warn", "consistent"],
|
|
@@ -39,6 +39,11 @@ function getStylisticRules(options) {
|
|
|
39
39
|
"never",
|
|
40
40
|
{ allowSingleLineBlocks: true }
|
|
41
41
|
],
|
|
42
|
+
"@stylistic/object-curly-spacing": [
|
|
43
|
+
"warn",
|
|
44
|
+
"always",
|
|
45
|
+
{ emptyObjects: "never" }
|
|
46
|
+
],
|
|
42
47
|
"@stylistic/object-property-newline": ["warn", { allowAllPropertiesOnSameLine: true }],
|
|
43
48
|
"@stylistic/indent": [
|
|
44
49
|
"warn",
|
|
@@ -61,11 +61,11 @@ interface VueOptions extends ConfigWithOverrides {
|
|
|
61
61
|
*
|
|
62
62
|
* @default
|
|
63
63
|
* [
|
|
64
|
-
* 'DEFINITION',
|
|
65
64
|
* 'CONDITIONALS',
|
|
66
65
|
* 'RENDER_MODIFIERS',
|
|
67
66
|
* 'LIST_RENDERING',
|
|
68
67
|
* 'UNIQUE',
|
|
68
|
+
* 'DEFINITION',
|
|
69
69
|
* 'GLOBAL',
|
|
70
70
|
* 'TWO_WAY_BINDING',
|
|
71
71
|
* 'SLOT',
|
|
@@ -404,6 +404,11 @@ interface ESLintSchema {
|
|
|
404
404
|
* @see https://eslint.style/rules/eol-last
|
|
405
405
|
*/
|
|
406
406
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
|
|
407
|
+
/**
|
|
408
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
409
|
+
* @see https://eslint.style/rules/list-style
|
|
410
|
+
*/
|
|
411
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>;
|
|
407
412
|
/**
|
|
408
413
|
* Enforce line breaks between arguments of a function call
|
|
409
414
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -1722,6 +1727,11 @@ interface ESLintSchema {
|
|
|
1722
1727
|
* @see https://github.com/eslint/css/blob/main/docs/rules/relative-font-units.md
|
|
1723
1728
|
*/
|
|
1724
1729
|
'css/relative-font-units'?: Linter.RuleEntry<CssRelativeFontUnits>;
|
|
1730
|
+
/**
|
|
1731
|
+
* Disallow and limit CSS selectors
|
|
1732
|
+
* @see https://github.com/eslint/css/blob/main/docs/rules/selector-complexity.md
|
|
1733
|
+
*/
|
|
1734
|
+
'css/selector-complexity'?: Linter.RuleEntry<CssSelectorComplexity>;
|
|
1725
1735
|
/**
|
|
1726
1736
|
* Enforce the use of baseline features
|
|
1727
1737
|
* @see https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md
|
|
@@ -3876,7 +3886,7 @@ interface ESLintSchema {
|
|
|
3876
3886
|
*/
|
|
3877
3887
|
'vars-on-top'?: Linter.RuleEntry<[]>;
|
|
3878
3888
|
/**
|
|
3879
|
-
* require
|
|
3889
|
+
* require test file pattern
|
|
3880
3890
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
3881
3891
|
*/
|
|
3882
3892
|
'vitest/consistent-test-filename'?: Linter.RuleEntry<VitestConsistentTestFilename>;
|
|
@@ -5884,6 +5894,50 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
|
|
|
5884
5894
|
type StylisticDotLocation = [] | [("object" | "property")];
|
|
5885
5895
|
// ----- @stylistic/eol-last -----
|
|
5886
5896
|
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
5897
|
+
// ----- @stylistic/exp-list-style -----
|
|
5898
|
+
type StylisticExpListStyle = [] | [{
|
|
5899
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
5900
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig;
|
|
5901
|
+
overrides?: {
|
|
5902
|
+
"[]"?: _StylisticExpListStyle_BaseConfig;
|
|
5903
|
+
"{}"?: _StylisticExpListStyle_BaseConfig;
|
|
5904
|
+
"<>"?: _StylisticExpListStyle_BaseConfig;
|
|
5905
|
+
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
5906
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5907
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig;
|
|
5908
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5909
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5910
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
5911
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
5912
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5913
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
5914
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig;
|
|
5915
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5916
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5917
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig;
|
|
5918
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
|
|
5919
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig;
|
|
5920
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
|
|
5921
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
5922
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig;
|
|
5923
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
|
|
5924
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
5925
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
|
|
5926
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5927
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
5928
|
+
};
|
|
5929
|
+
}];
|
|
5930
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
5931
|
+
spacing?: ("always" | "never");
|
|
5932
|
+
maxItems?: number;
|
|
5933
|
+
}
|
|
5934
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
5935
|
+
minItems?: number;
|
|
5936
|
+
}
|
|
5937
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
5938
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
5939
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig;
|
|
5940
|
+
}
|
|
5887
5941
|
// ----- @stylistic/function-call-argument-newline -----
|
|
5888
5942
|
type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
5889
5943
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -5953,7 +6007,11 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
5953
6007
|
ObjectExpression?: (number | ("first" | "off"));
|
|
5954
6008
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
5955
6009
|
flatTernaryExpressions?: boolean;
|
|
5956
|
-
offsetTernaryExpressions?: boolean
|
|
6010
|
+
offsetTernaryExpressions?: (boolean | {
|
|
6011
|
+
CallExpression?: boolean;
|
|
6012
|
+
AwaitExpression?: boolean;
|
|
6013
|
+
NewExpression?: boolean;
|
|
6014
|
+
});
|
|
5957
6015
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
5958
6016
|
ignoredNodes?: string[];
|
|
5959
6017
|
ignoreComments?: boolean;
|
|
@@ -6754,6 +6812,7 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
|
|
|
6754
6812
|
TSInterfaceBody?: ("always" | "never");
|
|
6755
6813
|
TSEnumBody?: ("always" | "never");
|
|
6756
6814
|
};
|
|
6815
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
6757
6816
|
}];
|
|
6758
6817
|
// ----- @stylistic/object-property-newline -----
|
|
6759
6818
|
type StylisticObjectPropertyNewline = [] | [{
|
|
@@ -8539,6 +8598,23 @@ type CssPreferLogicalProperties = [] | [{
|
|
|
8539
8598
|
type CssRelativeFontUnits = [] | [{
|
|
8540
8599
|
allowUnits?: ("%" | "cap" | "ch" | "em" | "ex" | "ic" | "lh" | "rcap" | "rch" | "rem" | "rex" | "ric" | "rlh")[];
|
|
8541
8600
|
}];
|
|
8601
|
+
// ----- css/selector-complexity -----
|
|
8602
|
+
type CssSelectorComplexity = [] | [{
|
|
8603
|
+
maxIds?: number;
|
|
8604
|
+
maxClasses?: number;
|
|
8605
|
+
maxTypes?: number;
|
|
8606
|
+
maxAttributes?: number;
|
|
8607
|
+
maxPseudoClasses?: number;
|
|
8608
|
+
maxUniversals?: number;
|
|
8609
|
+
maxCompounds?: number;
|
|
8610
|
+
maxCombinators?: number;
|
|
8611
|
+
disallowCombinators?: string[];
|
|
8612
|
+
disallowPseudoClasses?: string[];
|
|
8613
|
+
disallowPseudoElements?: string[];
|
|
8614
|
+
disallowAttributes?: string[];
|
|
8615
|
+
disallowAttributeMatchers?: string[];
|
|
8616
|
+
[k: string]: unknown | undefined;
|
|
8617
|
+
}];
|
|
8542
8618
|
// ----- css/use-baseline -----
|
|
8543
8619
|
type CssUseBaseline = [] | [{
|
|
8544
8620
|
available?: (("widely" | "newly") | number);
|
|
@@ -13160,6 +13236,7 @@ type VueObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never")
|
|
|
13160
13236
|
TSInterfaceBody?: ("always" | "never");
|
|
13161
13237
|
TSEnumBody?: ("always" | "never");
|
|
13162
13238
|
};
|
|
13239
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
13163
13240
|
}];
|
|
13164
13241
|
// ----- vue/object-property-newline -----
|
|
13165
13242
|
type VueObjectPropertyNewline = [] | [{
|
|
@@ -117,11 +117,11 @@ const defaultOptions = {
|
|
|
117
117
|
"defineExpose"
|
|
118
118
|
],
|
|
119
119
|
attributesOrder: [
|
|
120
|
-
"DEFINITION",
|
|
121
120
|
"CONDITIONALS",
|
|
122
121
|
"RENDER_MODIFIERS",
|
|
123
122
|
"LIST_RENDERING",
|
|
124
123
|
"UNIQUE",
|
|
124
|
+
"DEFINITION",
|
|
125
125
|
"GLOBAL",
|
|
126
126
|
"SLOT",
|
|
127
127
|
"TWO_WAY_BINDING",
|
|
@@ -20,8 +20,7 @@ const mergeOptions = createDefu((object, key, value) => {
|
|
|
20
20
|
return isEmptyString(value) || isValueTrue && !isDefaultValueFalse;
|
|
21
21
|
});
|
|
22
22
|
function mergeWithDefaults(options) {
|
|
23
|
-
|
|
24
|
-
return mergeOptions(optionsWithDetectedConfigs, defaultOptions);
|
|
23
|
+
return mergeOptions(enableDetectedConfigs(options), defaultOptions);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shayanthenerd/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
|
|
6
6
|
"keywords": [
|
|
@@ -26,9 +26,6 @@
|
|
|
26
26
|
"url": "https://github.com/ShayanTheNerd"
|
|
27
27
|
},
|
|
28
28
|
"funding": "https://buymeacoffee.com/shayanthenerd",
|
|
29
|
-
"engines": {
|
|
30
|
-
"node": ">=20.12.0"
|
|
31
|
-
},
|
|
32
29
|
"files": [
|
|
33
30
|
"./dist"
|
|
34
31
|
],
|
|
@@ -52,15 +49,18 @@
|
|
|
52
49
|
"#configs/*": "./src/configs/*"
|
|
53
50
|
},
|
|
54
51
|
"type": "module",
|
|
55
|
-
"
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=20.12.0"
|
|
54
|
+
},
|
|
55
|
+
"packageManager": "pnpm@10.18.3",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"prepare": "pnpm git:gitmessage && pnpm simple-git-hooks && pnpm generate:types",
|
|
58
58
|
"prepublishOnly": "pnpm build:package",
|
|
59
59
|
"git:gitmessage": "git config --local commit.template \".gitmessage\"",
|
|
60
|
-
"inspect": "pnpm
|
|
60
|
+
"inspect": "pnpm @eslint/config-inspector",
|
|
61
61
|
"build:package": "tsdown --no-report",
|
|
62
|
-
"build:inspector": "pnpm
|
|
63
|
-
"preview:inspector": "pnpm
|
|
62
|
+
"build:inspector": "pnpm eslint-config-inspector build --config=./scripts/defaultESLintConfigReference.ts",
|
|
63
|
+
"preview:inspector": "pnpm serve .eslint-config-inspector",
|
|
64
64
|
"generate:types": "node ./scripts/generateESLintTypes.ts",
|
|
65
65
|
"update:actions": "pnpm actions-up --yes",
|
|
66
66
|
"format": "prettier --write '**/*.{json,jsonc,yaml,yml,lock}' --cache",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"lint:eslint": "eslint --fix --cache --cache-location=./node_modules/.cache/.eslintcache",
|
|
69
69
|
"lint": "pnpm lint:oxlint && pnpm lint:eslint",
|
|
70
70
|
"check:types": "tsc",
|
|
71
|
-
"check:exports": "pnpm
|
|
72
|
-
"check:spell": "pnpm dlx cspell . --gitignore --cache --cache-location
|
|
71
|
+
"check:exports": "pnpm attw --pack --profile=esm-only --exclude-entrypoints=./oxlint",
|
|
72
|
+
"check:spell": "pnpm dlx cspell . --gitignore --exclude='pnpm-lock.yaml' --cache --cache-location='./node_modules/.cache/.cspellcache'",
|
|
73
73
|
"ci:validate": "pnpm generate:types && pnpm format && pnpm lint && pnpm check:types && pnpm build:inspector && pnpm build:package && pnpm check:exports"
|
|
74
74
|
},
|
|
75
75
|
"simple-git-hooks": {
|
|
@@ -81,41 +81,44 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@eslint/compat": "1.4.0",
|
|
84
|
-
"@eslint/css": "0.
|
|
85
|
-
"@eslint/js": "9.
|
|
84
|
+
"@eslint/css": "0.13.0",
|
|
85
|
+
"@eslint/js": "9.38.0",
|
|
86
86
|
"@html-eslint/eslint-plugin": "0.47.0",
|
|
87
|
-
"@stylistic/eslint-plugin": "5.
|
|
88
|
-
"@vitest/eslint-plugin": "1.3.
|
|
87
|
+
"@stylistic/eslint-plugin": "5.5.0",
|
|
88
|
+
"@vitest/eslint-plugin": "1.3.23",
|
|
89
89
|
"defu": "6.1.4",
|
|
90
|
-
"eslint": "9.
|
|
90
|
+
"eslint": "9.38.0",
|
|
91
91
|
"eslint-flat-config-utils": "2.1.4",
|
|
92
92
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
93
|
-
"eslint-plugin-better-tailwindcss": "3.7.
|
|
93
|
+
"eslint-plugin-better-tailwindcss": "3.7.10",
|
|
94
94
|
"eslint-plugin-cypress": "5.2.0",
|
|
95
95
|
"eslint-plugin-import-x": "4.16.1",
|
|
96
|
-
"eslint-plugin-oxlint": "1.
|
|
96
|
+
"eslint-plugin-oxlint": "1.23.0",
|
|
97
97
|
"eslint-plugin-perfectionist": "4.15.1",
|
|
98
98
|
"eslint-plugin-playwright": "2.2.2",
|
|
99
|
-
"eslint-plugin-storybook": "9.1.
|
|
99
|
+
"eslint-plugin-storybook": "9.1.13",
|
|
100
100
|
"eslint-plugin-unused-imports": "4.2.0",
|
|
101
|
-
"eslint-plugin-vue": "10.5.
|
|
101
|
+
"eslint-plugin-vue": "10.5.1",
|
|
102
102
|
"eslint-plugin-vuejs-accessibility": "2.4.1",
|
|
103
103
|
"globals": "16.4.0",
|
|
104
104
|
"local-pkg": "1.1.2",
|
|
105
|
-
"oxlint": "1.
|
|
105
|
+
"oxlint": "1.23.0",
|
|
106
106
|
"tailwind-csstree": "0.1.4",
|
|
107
|
-
"typescript-eslint": "8.46.
|
|
107
|
+
"typescript-eslint": "8.46.1"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@
|
|
111
|
-
"
|
|
110
|
+
"@arethetypeswrong/cli": "0.18.2",
|
|
111
|
+
"@eslint/config-inspector": "1.3.0",
|
|
112
|
+
"@types/node": "24.8.1",
|
|
113
|
+
"actions-up": "1.4.2",
|
|
112
114
|
"eslint-typegen": "2.3.0",
|
|
113
115
|
"nano-staged": "0.8.0",
|
|
114
116
|
"prettier": "3.6.2",
|
|
115
117
|
"publint": "0.3.14",
|
|
118
|
+
"serve": "14.2.5",
|
|
116
119
|
"simple-git-hooks": "2.13.1",
|
|
117
|
-
"tsdown": "0.15.
|
|
120
|
+
"tsdown": "0.15.8",
|
|
118
121
|
"typescript": "5.9.3",
|
|
119
|
-
"unplugin-unused": "0.5.
|
|
122
|
+
"unplugin-unused": "0.5.4"
|
|
120
123
|
}
|
|
121
124
|
}
|