@shayanthenerd/eslint-config 0.29.1 → 0.29.3
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 +1 -0
- package/dist/helpers/options/defaultOptions.mjs +1 -0
- package/dist/rules/node.mjs +2 -0
- package/dist/rules/vue.mjs +3 -2
- package/dist/types/eslint-schema.d.mts +23 -4
- package/dist/types/options/stylistic.d.mts +3 -1
- package/dist/types/options/vue.d.mts +8 -0
- package/package.json +13 -15
package/README.md
CHANGED
package/dist/rules/node.mjs
CHANGED
|
@@ -25,7 +25,9 @@ function getNodeRules(options) {
|
|
|
25
25
|
"n/prefer-global/timers": "warn",
|
|
26
26
|
"n/prefer-global/url": "warn",
|
|
27
27
|
"n/prefer-global/url-search-params": "warn",
|
|
28
|
+
"n/prefer-import/assert-strict": "error",
|
|
28
29
|
"n/prefer-node-protocol": "warn",
|
|
30
|
+
"n/prefer-process-get-builtin-module": "error",
|
|
29
31
|
"n/prefer-promises/dns": "warn",
|
|
30
32
|
"n/prefer-promises/fs": "warn",
|
|
31
33
|
"n/process-exit-as-throw": "error"
|
package/dist/rules/vue.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { getRestrictedVueElements } from "../helpers/vue/getRestrictedVueElement
|
|
|
7
7
|
function getVueRules(options) {
|
|
8
8
|
const { typescript, stylistic, vue, nuxt } = options.configs;
|
|
9
9
|
const { indent, trailingComma, maxLineLength, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHtmlElements } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
|
|
10
|
-
const { blockLang, blocksOrder, macrosOrder, attributesOrder, destructureProps, vForDelimiterStyle, attributeHyphenation, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
|
|
10
|
+
const { blockLang, blocksOrder, macrosOrder, attributesOrder, destructureProps, vForDelimiterStyle, attributeHyphenation, templateMaxLineLength, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
|
|
11
11
|
const { imageComponents: userImageComponents, anchorComponents: userAnchorComponents, accessibleChildComponents: userAccessibleChildComponents } = isEnabled(vue) && isEnabled(vue.accessibility) ? vue.accessibility : defaultOptions.configs.vue.accessibility;
|
|
12
12
|
const isNuxtEnabled = isEnabled(nuxt);
|
|
13
13
|
const isNuxtImageEnabled = isNuxtEnabled ? nuxt.image : void 0;
|
|
@@ -207,7 +207,8 @@ function getVueRules(options) {
|
|
|
207
207
|
"vue/max-len": ["warn", {
|
|
208
208
|
tabWidth: indent,
|
|
209
209
|
code: maxLineLength,
|
|
210
|
-
template:
|
|
210
|
+
template: templateMaxLineLength,
|
|
211
|
+
comments: templateMaxLineLength,
|
|
211
212
|
ignoreUrls: true,
|
|
212
213
|
ignoreStrings: true,
|
|
213
214
|
ignoreComments: true,
|
|
@@ -3783,7 +3783,7 @@ interface ESLintSchema {
|
|
|
3783
3783
|
*/
|
|
3784
3784
|
'n/no-new-require'?: Linter.RuleEntry<[]>;
|
|
3785
3785
|
/**
|
|
3786
|
-
* disallow string concatenation with `__dirname` and `
|
|
3786
|
+
* disallow string concatenation with `__dirname`, `__filename`, and `import.meta` paths
|
|
3787
3787
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
3788
3788
|
*/
|
|
3789
3789
|
'n/no-path-concat'?: Linter.RuleEntry<[]>;
|
|
@@ -3892,11 +3892,21 @@ interface ESLintSchema {
|
|
|
3892
3892
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
3893
3893
|
*/
|
|
3894
3894
|
'n/prefer-global/url-search-params'?: Linter.RuleEntry<NPreferGlobalUrlSearchParams>;
|
|
3895
|
+
/**
|
|
3896
|
+
* enforce using `node:assert/strict` instead of `node:assert`.
|
|
3897
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
3898
|
+
*/
|
|
3899
|
+
'n/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
3895
3900
|
/**
|
|
3896
3901
|
* enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
3897
3902
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
3898
3903
|
*/
|
|
3899
3904
|
'n/prefer-node-protocol'?: Linter.RuleEntry<NPreferNodeProtocol>;
|
|
3905
|
+
/**
|
|
3906
|
+
* enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
3907
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
3908
|
+
*/
|
|
3909
|
+
'n/prefer-process-get-builtin-module'?: Linter.RuleEntry<NPreferProcessGetBuiltinModule>;
|
|
3900
3910
|
/**
|
|
3901
3911
|
* enforce `require("dns").promises`
|
|
3902
3912
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
|
|
@@ -5192,7 +5202,7 @@ interface ESLintSchema {
|
|
|
5192
5202
|
* Enforce that names for `scripts` are in kebab case (optionally separated by colons).
|
|
5193
5203
|
* @see https://eslint-plugin-package-json.dev/rules/scripts-name-casing
|
|
5194
5204
|
*/
|
|
5195
|
-
'package-json/scripts-name-casing'?: Linter.RuleEntry<
|
|
5205
|
+
'package-json/scripts-name-casing'?: Linter.RuleEntry<PackageJsonScriptsNameCasing>;
|
|
5196
5206
|
/**
|
|
5197
5207
|
* Selected collections must be in a consistent order (lexicographical for most; lifecycle-aware for scripts).
|
|
5198
5208
|
* @see https://eslint-plugin-package-json.dev/rules/sort-collections
|
|
@@ -17720,6 +17730,10 @@ type NPreferGlobalUrlSearchParams = [] | [("always" | "never")];
|
|
|
17720
17730
|
type NPreferNodeProtocol = [] | [{
|
|
17721
17731
|
version?: string;
|
|
17722
17732
|
}];
|
|
17733
|
+
// ----- n/prefer-process-get-builtin-module -----
|
|
17734
|
+
type NPreferProcessGetBuiltinModule = [] | [{
|
|
17735
|
+
version?: string;
|
|
17736
|
+
}];
|
|
17723
17737
|
// ----- n/shebang -----
|
|
17724
17738
|
type NShebang = [] | [{
|
|
17725
17739
|
convertPath?: ({
|
|
@@ -18406,12 +18420,12 @@ type PackageJsonRestrictDependencyRanges = [] | [({
|
|
|
18406
18420
|
forDependencyTypes?: ("dependencies" | "devDependencies" | "optionalDependencies" | "peerDependencies")[];
|
|
18407
18421
|
forPackages?: string[];
|
|
18408
18422
|
forVersions?: string;
|
|
18409
|
-
rangeType: (("caret" | "pin" | "tilde") | ("caret" | "pin" | "tilde")[]);
|
|
18423
|
+
rangeType: (("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge") | ("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge")[]);
|
|
18410
18424
|
} | {
|
|
18411
18425
|
forDependencyTypes?: ("dependencies" | "devDependencies" | "optionalDependencies" | "peerDependencies")[];
|
|
18412
18426
|
forPackages?: string[];
|
|
18413
18427
|
forVersions?: string;
|
|
18414
|
-
rangeType: (("caret" | "pin" | "tilde") | ("caret" | "pin" | "tilde")[]);
|
|
18428
|
+
rangeType: (("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge") | ("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge")[]);
|
|
18415
18429
|
}[])];
|
|
18416
18430
|
// ----- package-json/restrict-private-properties -----
|
|
18417
18431
|
type PackageJsonRestrictPrivateProperties = [] | [{
|
|
@@ -18424,6 +18438,11 @@ type PackageJsonRestrictTopLevelProperties = [] | [{
|
|
|
18424
18438
|
property: string;
|
|
18425
18439
|
})[];
|
|
18426
18440
|
}];
|
|
18441
|
+
// ----- package-json/scripts-name-casing -----
|
|
18442
|
+
type PackageJsonScriptsNameCasing = [] | [{
|
|
18443
|
+
ignoreNames?: string[];
|
|
18444
|
+
ignorePatterns?: string[];
|
|
18445
|
+
}];
|
|
18427
18446
|
// ----- package-json/sort-collections -----
|
|
18428
18447
|
type PackageJsonSortCollections = [] | [(string | {
|
|
18429
18448
|
key: string;
|
|
@@ -59,7 +59,9 @@ interface StylisticOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
59
59
|
*/
|
|
60
60
|
maxConsecutiveEmptyLines?: RuleOptions<'@stylistic/no-multiple-empty-lines'>['max'];
|
|
61
61
|
/**
|
|
62
|
-
* Maximum line length for the code.
|
|
62
|
+
* Maximum line length for the code.
|
|
63
|
+
*
|
|
64
|
+
* Strings, texts, and comments are ignored.
|
|
63
65
|
*
|
|
64
66
|
* This is used by
|
|
65
67
|
* - [vue/max-len](https://eslint.vuejs.org/rules/max-len)
|
|
@@ -206,6 +206,14 @@ interface VueOptions extends ConfigWithOverrides<ConfigRules> {
|
|
|
206
206
|
* @see [vue/no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute)
|
|
207
207
|
*/
|
|
208
208
|
restrictedStaticAttributes?: RuleOptions<'vue/no-restricted-static-attribute'>[];
|
|
209
|
+
/**
|
|
210
|
+
* Maximum line length for `<template>` blocks (including comments).
|
|
211
|
+
*
|
|
212
|
+
* @default 130
|
|
213
|
+
*
|
|
214
|
+
* @see [vue/max-len: `template` option](https://eslint.vuejs.org/rules/max-len.html#options)
|
|
215
|
+
*/
|
|
216
|
+
templateMaxLineLength?: Exclude<RuleOptions<'vue/max-len'>, number>['template'];
|
|
209
217
|
/**
|
|
210
218
|
* The delimiter used in `v-for` directives.
|
|
211
219
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shayanthenerd/eslint-config",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.3",
|
|
4
4
|
"description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"{**/*.ts,package.json}": "pnpm lint"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@eslint-react/eslint-plugin": "5.18.
|
|
52
|
+
"@eslint-react/eslint-plugin": "5.18.3",
|
|
53
53
|
"@eslint/css": "1.4.0",
|
|
54
54
|
"@eslint/markdown": "8.0.3",
|
|
55
55
|
"@html-eslint/eslint-plugin": "0.64.0",
|
|
56
56
|
"@html-eslint/eslint-plugin-react": "0.64.0",
|
|
57
57
|
"@next/eslint-plugin-next": "16.3.0",
|
|
58
|
-
"@nuxt/eslint-plugin": "1.
|
|
58
|
+
"@nuxt/eslint-plugin": "1.17.0",
|
|
59
59
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
60
|
-
"@vitest/eslint-plugin": "1.6.
|
|
60
|
+
"@vitest/eslint-plugin": "1.6.27",
|
|
61
61
|
"astro-eslint-parser": "3.0.0",
|
|
62
62
|
"defu": "6.1.7",
|
|
63
63
|
"eslint-flat-config-utils": "3.2.0",
|
|
@@ -65,20 +65,20 @@
|
|
|
65
65
|
"eslint-plugin-astro": "3.1.0",
|
|
66
66
|
"eslint-plugin-baseline-js": "0.7.0",
|
|
67
67
|
"eslint-plugin-better-tailwindcss": "4.7.0",
|
|
68
|
-
"eslint-plugin-cypress": "
|
|
68
|
+
"eslint-plugin-cypress": "7.0.0",
|
|
69
69
|
"eslint-plugin-import-x": "4.17.1",
|
|
70
70
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
71
|
-
"eslint-plugin-n": "18.
|
|
72
|
-
"eslint-plugin-package-json": "1.
|
|
71
|
+
"eslint-plugin-n": "18.3.0",
|
|
72
|
+
"eslint-plugin-package-json": "1.7.0",
|
|
73
73
|
"eslint-plugin-perfectionist": "5.10.1",
|
|
74
74
|
"eslint-plugin-playwright": "2.11.0",
|
|
75
75
|
"eslint-plugin-promise": "7.3.0",
|
|
76
|
-
"eslint-plugin-storybook": "10.5.
|
|
76
|
+
"eslint-plugin-storybook": "10.5.7",
|
|
77
77
|
"eslint-plugin-unicorn": "73.0.0",
|
|
78
78
|
"eslint-plugin-vue": "10.10.0",
|
|
79
|
-
"eslint-plugin-vuejs-accessibility": "2.
|
|
80
|
-
"eslint-plugin-zod": "4.9.
|
|
81
|
-
"eslint-plugin-zod-mini": "1.6.
|
|
79
|
+
"eslint-plugin-vuejs-accessibility": "2.6.0",
|
|
80
|
+
"eslint-plugin-zod": "4.9.1",
|
|
81
|
+
"eslint-plugin-zod-mini": "1.6.1",
|
|
82
82
|
"globals": "17.9.0",
|
|
83
83
|
"local-pkg": "1.2.1",
|
|
84
84
|
"nuxt-link-checker": "5.1.3",
|
|
@@ -89,9 +89,8 @@
|
|
|
89
89
|
"@arethetypeswrong/cli": "0.18.5",
|
|
90
90
|
"@eslint/config-inspector": "3.2.0",
|
|
91
91
|
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
92
|
-
"@types/node": "26.
|
|
93
|
-
"
|
|
94
|
-
"eslint": "10.8.0",
|
|
92
|
+
"@types/node": "26.2.0",
|
|
93
|
+
"eslint": "10.8.1",
|
|
95
94
|
"eslint-typegen": "2.3.1",
|
|
96
95
|
"nano-staged": "1.0.2",
|
|
97
96
|
"prettier": "3.9.6",
|
|
@@ -126,7 +125,6 @@
|
|
|
126
125
|
},
|
|
127
126
|
"scripts": {
|
|
128
127
|
"git:gitmessage": "git config --local commit.template '.gitmessage'",
|
|
129
|
-
"update:actions": "actions-up --yes",
|
|
130
128
|
"update:deps": "pnpm update --latest && pnpm dedupe && pnpm generate:types && pnpm generate:docs",
|
|
131
129
|
"check:spell": "pnpx cspell . --gitignore --exclude='pnpm-lock.yaml' --cache --cache-location='./node_modules/.cache/.cspellcache'",
|
|
132
130
|
"inspect": "pnpm build:package && eslint-config-inspector",
|