@infernodesign/eslint-config 1.19.1 → 1.21.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/README.md +10 -1
- package/dist/cli.js +4 -3
- package/dist/index.d.ts +14 -7
- package/dist/index.js +95 -97
- package/package.json +13 -14
package/README.md
CHANGED
|
@@ -178,7 +178,16 @@ export default config( {
|
|
|
178
178
|
stylistic: {
|
|
179
179
|
indent: 2, // 4, or 'tab'
|
|
180
180
|
quotes: 'single', // or 'double'
|
|
181
|
-
|
|
181
|
+
blockSpacing: false,
|
|
182
|
+
braceStyle: '1tbs',
|
|
183
|
+
commaDangle: 'always-multiline',
|
|
184
|
+
experimental: false,
|
|
185
|
+
jsx: true,
|
|
186
|
+
quoteProps: 'consistent',
|
|
187
|
+
semi: false,
|
|
188
|
+
|
|
189
|
+
// Disable the opinionated spacing rules (space in parenthesis, objects, arrays, etc.)
|
|
190
|
+
lessOpinionated: true,
|
|
182
191
|
},
|
|
183
192
|
|
|
184
193
|
// TypeScript and Vue are autodetected, you can also explicitly enable them:
|
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
|
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.
|
|
12
|
+
var version = "1.21.0";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -57,6 +57,7 @@ const vscodeSettingsString = `
|
|
|
57
57
|
"postcss",
|
|
58
58
|
"scss",
|
|
59
59
|
"svelte",
|
|
60
|
+
"tailwindcss",
|
|
60
61
|
"toml",
|
|
61
62
|
"typescript",
|
|
62
63
|
"typescriptreact",
|
|
@@ -195,9 +196,9 @@ const versionsMap = {
|
|
|
195
196
|
"@eslint-react/eslint-plugin": "^2.12.4",
|
|
196
197
|
"@next/eslint-plugin-next": "^16.1.6",
|
|
197
198
|
"@unocss/eslint-plugin": "^66.6.0",
|
|
198
|
-
"astro-eslint-parser": "^1.
|
|
199
|
+
"astro-eslint-parser": "^1.3.0",
|
|
199
200
|
"eslint": "^10.0.0",
|
|
200
|
-
"eslint-plugin-astro": "^1.
|
|
201
|
+
"eslint-plugin-astro": "^1.6.0",
|
|
201
202
|
"eslint-plugin-better-tailwindcss": "^4.2.0",
|
|
202
203
|
"eslint-plugin-format": "^1.4.0",
|
|
203
204
|
"eslint-plugin-react-hooks": "^7.0.1",
|
package/dist/index.d.ts
CHANGED
|
@@ -8650,7 +8650,7 @@ interface RuleOptions {
|
|
|
8650
8650
|
* enforce valid `v-for` directives
|
|
8651
8651
|
* @see https://eslint.vuejs.org/rules/valid-v-for.html
|
|
8652
8652
|
*/
|
|
8653
|
-
'vue/valid-v-for'?: Linter.RuleEntry<
|
|
8653
|
+
'vue/valid-v-for'?: Linter.RuleEntry<VueValidVFor>;
|
|
8654
8654
|
/**
|
|
8655
8655
|
* enforce valid `v-html` directives
|
|
8656
8656
|
* @see https://eslint.vuejs.org/rules/valid-v-html.html
|
|
@@ -17019,6 +17019,7 @@ type VueAttributesOrder = [] | [{
|
|
|
17019
17019
|
order?: (("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT") | ("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT")[])[];
|
|
17020
17020
|
alphabetical?: boolean;
|
|
17021
17021
|
sortLineLength?: boolean;
|
|
17022
|
+
ignoreVBindObject?: boolean;
|
|
17022
17023
|
}]; // ----- vue/block-lang -----
|
|
17023
17024
|
type VueBlockLang = [] | [{
|
|
17024
17025
|
[k: string]: {
|
|
@@ -17096,7 +17097,7 @@ type VueDefineMacrosOrder = [] | [{
|
|
|
17096
17097
|
}]; // ----- vue/define-props-declaration -----
|
|
17097
17098
|
type VueDefinePropsDeclaration = [] | [("type-based" | "runtime")]; // ----- vue/define-props-destructuring -----
|
|
17098
17099
|
type VueDefinePropsDestructuring = [] | [{
|
|
17099
|
-
destructure?: ("always" | "never");
|
|
17100
|
+
destructure?: ("only-when-assigned" | "always" | "never");
|
|
17100
17101
|
}]; // ----- vue/dot-location -----
|
|
17101
17102
|
type VueDotLocation = [] | [("object" | "property")]; // ----- vue/dot-notation -----
|
|
17102
17103
|
type VueDotNotation = [] | [{
|
|
@@ -18098,7 +18099,10 @@ type VueVSlotStyle = [] | [(("shorthand" | "longform") | {
|
|
|
18098
18099
|
atComponent?: ("shorthand" | "longform" | "v-slot");
|
|
18099
18100
|
default?: ("shorthand" | "longform" | "v-slot");
|
|
18100
18101
|
named?: ("shorthand" | "longform");
|
|
18101
|
-
})]; // ----- vue/valid-v-
|
|
18102
|
+
})]; // ----- vue/valid-v-for -----
|
|
18103
|
+
type VueValidVFor = [] | [{
|
|
18104
|
+
allowEmptyAlias?: boolean;
|
|
18105
|
+
}]; // ----- vue/valid-v-on -----
|
|
18102
18106
|
type VueValidVOn = [] | [{
|
|
18103
18107
|
modifiers?: unknown[];
|
|
18104
18108
|
}]; // ----- vue/valid-v-slot -----
|
|
@@ -18304,7 +18308,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
18304
18308
|
exceptRange?: boolean;
|
|
18305
18309
|
onlyEquality?: boolean;
|
|
18306
18310
|
}]; // Names of all the configs
|
|
18307
|
-
type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/imports/rules' | 'config/unicorn/rules' | 'config/jsdoc/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/test/setup' | 'config/test/rules' | 'config/storybook/setup' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss' | 'config/astro/setup' | 'config/astro/rules' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/yaml/pnpm-workspace' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables' | '
|
|
18311
|
+
type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/imports/rules' | 'config/unicorn/rules' | 'config/jsdoc/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/test/setup' | 'config/test/rules' | 'config/storybook/setup' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss' | 'config/astro/setup' | 'config/astro/rules' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/yaml/pnpm-workspace' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables' | 'config/formatter/setup' | 'config/formatter/css' | 'config/formatter/scss' | 'config/formatter/less' | 'config/formatter/html' | 'config/formatter/xml' | 'config/formatter/svg' | 'config/formatter/markdown' | 'config/formatter/astro' | 'config/formatter/astro/disables' | 'config/formatter/graphql' | 'config/disables/scripts' | 'config/disables/cli' | 'config/disables/bin' | 'config/disables/dts' | 'config/disables/cjs' | 'config/disables/config-files';
|
|
18308
18312
|
//#endregion
|
|
18309
18313
|
//#region src/vendor/prettier-types.d.ts
|
|
18310
18314
|
type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
|
|
@@ -18474,7 +18478,7 @@ interface OptionsVue extends OptionsOverrides {
|
|
|
18474
18478
|
}
|
|
18475
18479
|
type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
|
|
18476
18480
|
interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'arrowParens' | 'blockSpacing' | 'braceStyle' | 'commaDangle' | 'experimental' | 'indent' | 'jsx' | 'quoteProps' | 'quotes' | 'semi'> {
|
|
18477
|
-
|
|
18481
|
+
lessOpinionated?: boolean;
|
|
18478
18482
|
}
|
|
18479
18483
|
type TypedFlatConfigItem = Omit<ConfigWithExtends, 'plugins' | 'rules'> & {
|
|
18480
18484
|
plugins?: Record<string, any>;
|
|
@@ -18573,7 +18577,10 @@ declare function storybook(options?: OptionsFiles & OptionsOverrides): Promise<T
|
|
|
18573
18577
|
//#endregion
|
|
18574
18578
|
//#region src/configs/stylistic.d.ts
|
|
18575
18579
|
declare const StylisticConfigDefaults: StylisticConfig;
|
|
18576
|
-
|
|
18580
|
+
interface StylisticOptions extends OptionsOverrides, StylisticConfig {
|
|
18581
|
+
lessOpinionated?: boolean;
|
|
18582
|
+
}
|
|
18583
|
+
declare function stylistic(options?: StylisticOptions): Promise<TypedFlatConfigItem[]>;
|
|
18577
18584
|
//#endregion
|
|
18578
18585
|
//#region src/configs/svelte.d.ts
|
|
18579
18586
|
declare function svelte(options?: OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
@@ -18680,4 +18687,4 @@ declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Reco
|
|
|
18680
18687
|
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
18681
18688
|
declare function toArray<T>(value: T | T[]): T[];
|
|
18682
18689
|
//#endregion
|
|
18683
|
-
export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SEARCH_EXCLUDE, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, PACKAGE_NAME, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, astro, combine, command, comments, config, config as inferno, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInCursorAgent, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
18690
|
+
export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SEARCH_EXCLUDE, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, PACKAGE_NAME, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, config, config as inferno, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInCursorAgent, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
package/dist/index.js
CHANGED
|
@@ -477,8 +477,10 @@ async function disables() {
|
|
|
477
477
|
//#region src/configs/stylistic.ts
|
|
478
478
|
const StylisticConfigDefaults = {
|
|
479
479
|
arrowParens: true,
|
|
480
|
+
blockSpacing: true,
|
|
480
481
|
braceStyle: "1tbs",
|
|
481
482
|
commaDangle: "always-multiline",
|
|
483
|
+
experimental: false,
|
|
482
484
|
indent: 2,
|
|
483
485
|
jsx: true,
|
|
484
486
|
quoteProps: "consistent",
|
|
@@ -486,15 +488,17 @@ const StylisticConfigDefaults = {
|
|
|
486
488
|
semi: false
|
|
487
489
|
};
|
|
488
490
|
async function stylistic(options = {}) {
|
|
489
|
-
const { arrowParens, braceStyle, commaDangle, indent, jsx,
|
|
491
|
+
const { arrowParens, blockSpacing, braceStyle, commaDangle, experimental, indent, jsx, lessOpinionated = false, overrides = {}, quoteProps, quotes, semi } = {
|
|
490
492
|
...StylisticConfigDefaults,
|
|
491
493
|
...options
|
|
492
494
|
};
|
|
493
495
|
const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
|
|
494
496
|
const config = pluginStylistic.configs.customize({
|
|
495
497
|
arrowParens,
|
|
498
|
+
blockSpacing,
|
|
496
499
|
braceStyle,
|
|
497
500
|
commaDangle,
|
|
501
|
+
experimental,
|
|
498
502
|
indent,
|
|
499
503
|
jsx,
|
|
500
504
|
pluginName: "style",
|
|
@@ -509,94 +513,83 @@ async function stylistic(options = {}) {
|
|
|
509
513
|
style: pluginStylistic
|
|
510
514
|
},
|
|
511
515
|
rules: {
|
|
512
|
-
...pluginStylistic.configs.recommended?.rules,
|
|
513
516
|
...config.rules,
|
|
517
|
+
...experimental ? {} : { "antfu/consistent-list-newline": "error" },
|
|
514
518
|
"antfu/consistent-chaining": "error",
|
|
515
|
-
"
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
after: true,
|
|
520
|
-
before: true
|
|
521
|
-
}],
|
|
522
|
-
"style/block-spacing": ["error", "always"],
|
|
523
|
-
"style/brace-style": ["error", "1tbs"],
|
|
524
|
-
"style/comma-spacing": ["error", {
|
|
525
|
-
after: true,
|
|
526
|
-
before: false
|
|
527
|
-
}],
|
|
528
|
-
"style/computed-property-spacing": ["error", "never"],
|
|
529
|
-
"style/function-call-spacing": ["error", "never"],
|
|
530
|
-
"style/generator-star-spacing": ["error", {
|
|
531
|
-
after: true,
|
|
532
|
-
before: false
|
|
533
|
-
}],
|
|
534
|
-
"style/jsx-closing-bracket-location": ["error", "tag-aligned"],
|
|
535
|
-
"style/jsx-curly-spacing": ["error", {
|
|
536
|
-
children: true,
|
|
537
|
-
when: "never"
|
|
538
|
-
}],
|
|
539
|
-
"style/jsx-equals-spacing": ["error", "never"],
|
|
540
|
-
"style/jsx-one-expression-per-line": "off",
|
|
541
|
-
"style/jsx-quotes": ["error", "prefer-double"],
|
|
542
|
-
"style/jsx-tag-spacing": ["error", {
|
|
543
|
-
beforeSelfClosing: "always",
|
|
544
|
-
closingSlash: "never"
|
|
545
|
-
}],
|
|
546
|
-
"style/max-len": "off",
|
|
547
|
-
"style/multiline-ternary": "off",
|
|
548
|
-
"style/no-mixed-spaces-and-tabs": "error",
|
|
549
|
-
"style/no-multi-spaces": ["error", { ignoreEOLComments: true }],
|
|
550
|
-
"style/no-trailing-spaces": ["error", { skipBlankLines: true }],
|
|
551
|
-
"style/quotes": [
|
|
552
|
-
"error",
|
|
553
|
-
"single",
|
|
554
|
-
{ avoidEscape: true }
|
|
555
|
-
],
|
|
556
|
-
"style/rest-spread-spacing": ["error", "never"],
|
|
557
|
-
"style/space-before-blocks": ["error", "always"],
|
|
558
|
-
"style/space-before-function-paren": ["error", {
|
|
559
|
-
"anonymous": "never",
|
|
560
|
-
"asyncArrow": "always",
|
|
561
|
-
"catch": "never",
|
|
562
|
-
"named": "never"
|
|
563
|
-
}],
|
|
564
|
-
"style/space-infix-ops": ["error", { int32Hint: false }],
|
|
565
|
-
"style/space-unary-ops": ["error", {
|
|
566
|
-
nonwords: false,
|
|
567
|
-
words: true
|
|
568
|
-
}],
|
|
569
|
-
"style/spaced-comment": ["error", "always"],
|
|
570
|
-
"style/switch-colon-spacing": ["error", {
|
|
571
|
-
after: true,
|
|
572
|
-
before: false
|
|
573
|
-
}],
|
|
574
|
-
"style/template-tag-spacing": ["error", "never"],
|
|
575
|
-
"style/type-annotation-spacing": "off",
|
|
576
|
-
"style/type-generic-spacing": "off",
|
|
577
|
-
"style/type-named-tuple-spacing": ["error"],
|
|
578
|
-
"style/wrap-iife": ["error", "outside"],
|
|
579
|
-
"style/yield-star-spacing": ["error", {
|
|
580
|
-
after: true,
|
|
581
|
-
before: false
|
|
582
|
-
}],
|
|
583
|
-
...!spacing ? {
|
|
584
|
-
"style/array-bracket-spacing": ["error", "never"],
|
|
585
|
-
"style/object-curly-spacing": [
|
|
519
|
+
...lessOpinionated ? { "curly": ["error", "multi-line"] } : {
|
|
520
|
+
"curly": ["error", "all"],
|
|
521
|
+
"style/array-bracket-spacing": ["error", "always"],
|
|
522
|
+
"style/arrow-parens": [
|
|
586
523
|
"error",
|
|
587
|
-
"
|
|
588
|
-
{
|
|
589
|
-
ImportAttributes: "always",
|
|
590
|
-
ImportDeclaration: "always",
|
|
591
|
-
ExportAllDeclaration: "always",
|
|
592
|
-
ExportNamedDeclaration: "always"
|
|
593
|
-
} }
|
|
524
|
+
"as-needed",
|
|
525
|
+
{ "requireForBlockBody": true }
|
|
594
526
|
],
|
|
595
|
-
"style/
|
|
596
|
-
|
|
597
|
-
|
|
527
|
+
"style/arrow-spacing": ["error", {
|
|
528
|
+
after: true,
|
|
529
|
+
before: true
|
|
530
|
+
}],
|
|
531
|
+
"style/block-spacing": ["error", "always"],
|
|
532
|
+
"style/comma-spacing": ["error", {
|
|
533
|
+
after: true,
|
|
534
|
+
before: false
|
|
535
|
+
}],
|
|
536
|
+
"style/computed-property-spacing": ["error", "never"],
|
|
537
|
+
"style/function-call-spacing": ["error", "never"],
|
|
538
|
+
"style/generator-star-spacing": ["error", {
|
|
539
|
+
after: true,
|
|
540
|
+
before: false
|
|
541
|
+
}],
|
|
542
|
+
"style/jsx-closing-bracket-location": ["error", "tag-aligned"],
|
|
543
|
+
"style/jsx-curly-spacing": ["error", {
|
|
544
|
+
children: true,
|
|
545
|
+
when: "never"
|
|
546
|
+
}],
|
|
547
|
+
"style/jsx-equals-spacing": ["error", "never"],
|
|
548
|
+
"style/jsx-one-expression-per-line": "off",
|
|
549
|
+
"style/jsx-quotes": ["error", "prefer-double"],
|
|
550
|
+
"style/jsx-tag-spacing": ["error", {
|
|
551
|
+
beforeSelfClosing: "always",
|
|
552
|
+
closingSlash: "never"
|
|
553
|
+
}],
|
|
554
|
+
"style/max-len": "off",
|
|
555
|
+
"style/multiline-ternary": "off",
|
|
556
|
+
"style/no-mixed-spaces-and-tabs": "error",
|
|
557
|
+
"style/no-multi-spaces": ["error", { ignoreEOLComments: true }],
|
|
558
|
+
"style/no-trailing-spaces": ["error", { skipBlankLines: true }],
|
|
598
559
|
"style/object-curly-spacing": ["error", "always"],
|
|
599
|
-
"style/
|
|
560
|
+
"style/quotes": [
|
|
561
|
+
"error",
|
|
562
|
+
quotes,
|
|
563
|
+
{ avoidEscape: true }
|
|
564
|
+
],
|
|
565
|
+
"style/spaced-comment": ["error", "always"],
|
|
566
|
+
"style/space-in-parens": ["error", "always"],
|
|
567
|
+
"style/rest-spread-spacing": ["error", "never"],
|
|
568
|
+
"style/space-before-blocks": ["error", "always"],
|
|
569
|
+
"style/space-before-function-paren": ["error", {
|
|
570
|
+
"anonymous": "never",
|
|
571
|
+
"asyncArrow": "always",
|
|
572
|
+
"catch": "never",
|
|
573
|
+
"named": "never"
|
|
574
|
+
}],
|
|
575
|
+
"style/space-infix-ops": ["error", { int32Hint: false }],
|
|
576
|
+
"style/space-unary-ops": ["error", {
|
|
577
|
+
nonwords: false,
|
|
578
|
+
words: true
|
|
579
|
+
}],
|
|
580
|
+
"style/switch-colon-spacing": ["error", {
|
|
581
|
+
after: true,
|
|
582
|
+
before: false
|
|
583
|
+
}],
|
|
584
|
+
"style/template-tag-spacing": ["error", "never"],
|
|
585
|
+
"style/type-annotation-spacing": "off",
|
|
586
|
+
"style/type-generic-spacing": "off",
|
|
587
|
+
"style/type-named-tuple-spacing": ["error"],
|
|
588
|
+
"style/wrap-iife": ["error", "outside"],
|
|
589
|
+
"style/yield-star-spacing": ["error", {
|
|
590
|
+
after: true,
|
|
591
|
+
before: false
|
|
592
|
+
}]
|
|
600
593
|
},
|
|
601
594
|
...overrides
|
|
602
595
|
}
|
|
@@ -631,8 +624,13 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
631
624
|
...stylistic
|
|
632
625
|
};
|
|
633
626
|
const prettierOptions = Object.assign({
|
|
634
|
-
|
|
627
|
+
arrowParens: "always",
|
|
628
|
+
bracketSameLine: false,
|
|
629
|
+
bracketSpacing: true,
|
|
630
|
+
endOfLine: "lf",
|
|
635
631
|
printWidth: 120,
|
|
632
|
+
proseWrap: "preserve",
|
|
633
|
+
quoteProps: "consistent",
|
|
636
634
|
semi,
|
|
637
635
|
singleQuote: quotes === "single",
|
|
638
636
|
tabWidth: typeof indent === "number" ? indent : 2,
|
|
@@ -651,35 +649,35 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
651
649
|
useTabs: indent === "tab"
|
|
652
650
|
}, options.dprintOptions || {});
|
|
653
651
|
const configs = [{
|
|
654
|
-
name: "
|
|
652
|
+
name: "config/formatter/setup",
|
|
655
653
|
plugins: { format: await interopDefault(import("eslint-plugin-format")) }
|
|
656
654
|
}];
|
|
657
655
|
if (options.css) configs.push({
|
|
658
656
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
659
657
|
languageOptions: { parser: parserPlain },
|
|
660
|
-
name: "
|
|
658
|
+
name: "config/formatter/css",
|
|
661
659
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "css" })] }
|
|
662
660
|
}, {
|
|
663
661
|
files: [GLOB_SCSS],
|
|
664
662
|
languageOptions: { parser: parserPlain },
|
|
665
|
-
name: "
|
|
663
|
+
name: "config/formatter/scss",
|
|
666
664
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "scss" })] }
|
|
667
665
|
}, {
|
|
668
666
|
files: [GLOB_LESS],
|
|
669
667
|
languageOptions: { parser: parserPlain },
|
|
670
|
-
name: "
|
|
668
|
+
name: "config/formatter/less",
|
|
671
669
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "less" })] }
|
|
672
670
|
});
|
|
673
671
|
if (options.html) configs.push({
|
|
674
672
|
files: [GLOB_HTML],
|
|
675
673
|
languageOptions: { parser: parserPlain },
|
|
676
|
-
name: "
|
|
674
|
+
name: "config/formatter/html",
|
|
677
675
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "html" })] }
|
|
678
676
|
});
|
|
679
677
|
if (options.xml) configs.push({
|
|
680
678
|
files: [GLOB_XML],
|
|
681
679
|
languageOptions: { parser: parserPlain },
|
|
682
|
-
name: "
|
|
680
|
+
name: "config/formatter/xml",
|
|
683
681
|
rules: { "format/prettier": ["error", mergePrettierOptions({
|
|
684
682
|
...prettierXmlOptions,
|
|
685
683
|
...prettierOptions
|
|
@@ -691,7 +689,7 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
691
689
|
if (options.svg) configs.push({
|
|
692
690
|
files: [GLOB_SVG],
|
|
693
691
|
languageOptions: { parser: parserPlain },
|
|
694
|
-
name: "
|
|
692
|
+
name: "config/formatter/svg",
|
|
695
693
|
rules: { "format/prettier": ["error", mergePrettierOptions({
|
|
696
694
|
...prettierXmlOptions,
|
|
697
695
|
...prettierOptions
|
|
@@ -707,7 +705,7 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
707
705
|
files: [GLOB_MARKDOWN],
|
|
708
706
|
ignores: GLOB_SLIDEV,
|
|
709
707
|
languageOptions: { parser: parserPlain },
|
|
710
|
-
name: "
|
|
708
|
+
name: "config/formatter/markdown",
|
|
711
709
|
rules: { [`format/${formater}`]: ["error", formater === "prettier" ? mergePrettierOptions(prettierOptions, {
|
|
712
710
|
embeddedLanguageFormatting: "off",
|
|
713
711
|
parser: "markdown"
|
|
@@ -719,7 +717,7 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
719
717
|
if (options.slidev) configs.push({
|
|
720
718
|
files: GLOB_SLIDEV,
|
|
721
719
|
languageOptions: { parser: parserPlain },
|
|
722
|
-
name: "
|
|
720
|
+
name: "config/formatter/slidev",
|
|
723
721
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, {
|
|
724
722
|
embeddedLanguageFormatting: "off",
|
|
725
723
|
parser: "slidev",
|
|
@@ -731,7 +729,7 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
731
729
|
configs.push({
|
|
732
730
|
files: [GLOB_ASTRO],
|
|
733
731
|
languageOptions: { parser: parserPlain },
|
|
734
|
-
name: "
|
|
732
|
+
name: "config/formatter/astro",
|
|
735
733
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, {
|
|
736
734
|
parser: "astro",
|
|
737
735
|
plugins: ["prettier-plugin-astro"]
|
|
@@ -739,7 +737,7 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
739
737
|
});
|
|
740
738
|
configs.push({
|
|
741
739
|
files: [GLOB_ASTRO, GLOB_ASTRO_TS],
|
|
742
|
-
name: "
|
|
740
|
+
name: "config/formatter/astro/disables",
|
|
743
741
|
rules: {
|
|
744
742
|
"style/arrow-parens": "off",
|
|
745
743
|
"style/block-spacing": "off",
|
|
@@ -754,7 +752,7 @@ async function formatters(options = {}, stylistic = {}) {
|
|
|
754
752
|
if (options.graphql) configs.push({
|
|
755
753
|
files: [GLOB_GRAPHQL],
|
|
756
754
|
languageOptions: { parser: parserPlain },
|
|
757
|
-
name: "
|
|
755
|
+
name: "config/formatter/graphql",
|
|
758
756
|
rules: { "format/prettier": ["error", mergePrettierOptions(prettierOptions, { parser: "graphql" })] }
|
|
759
757
|
});
|
|
760
758
|
return configs;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernodesign/eslint-config",
|
|
3
3
|
"description": "ESLint config for Inferno Design.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.21.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Inferno Design <support@infernodesign.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@antfu/install-pkg": "1.1.0",
|
|
50
|
-
"@clack/prompts": "1.0.
|
|
50
|
+
"@clack/prompts": "1.0.1",
|
|
51
51
|
"@eslint-community/eslint-plugin-eslint-comments": "4.6.0",
|
|
52
52
|
"@eslint/compat": "2.0.2",
|
|
53
53
|
"@eslint/config-array": "0.23.1",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"eslint-config-flat-gitignore": "2.1.0",
|
|
64
64
|
"eslint-flat-config-utils": "3.0.1",
|
|
65
65
|
"eslint-merge-processors": "2.0.0",
|
|
66
|
-
"eslint-plugin-antfu": "3.2.
|
|
66
|
+
"eslint-plugin-antfu": "3.2.2",
|
|
67
67
|
"eslint-plugin-command": "3.4.0",
|
|
68
|
-
"eslint-plugin-import-lite": "0.5.
|
|
68
|
+
"eslint-plugin-import-lite": "0.5.1",
|
|
69
69
|
"eslint-plugin-jsdoc": "62.5.4",
|
|
70
70
|
"eslint-plugin-jsonc": "2.21.1",
|
|
71
71
|
"eslint-plugin-n": "17.23.2",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"eslint-plugin-toml": "1.0.4",
|
|
77
77
|
"eslint-plugin-unicorn": "63.0.0",
|
|
78
78
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
79
|
-
"eslint-plugin-vue": "10.
|
|
79
|
+
"eslint-plugin-vue": "10.8.0",
|
|
80
80
|
"eslint-plugin-yml": "3.1.2",
|
|
81
81
|
"eslint-processor-vue-blocks": "2.0.0",
|
|
82
82
|
"globals": "17.3.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"local-pkg": "1.1.2",
|
|
85
85
|
"parse-gitignore": "2.0.0",
|
|
86
86
|
"toml-eslint-parser": "1.0.3",
|
|
87
|
-
"vue-eslint-parser": "10.
|
|
87
|
+
"vue-eslint-parser": "10.4.0",
|
|
88
88
|
"yaml-eslint-parser": "2.0.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
97
97
|
"@types/node": "25.2.3",
|
|
98
98
|
"@unocss/eslint-plugin": "66.6.0",
|
|
99
|
-
"astro-eslint-parser": "1.
|
|
99
|
+
"astro-eslint-parser": "1.3.0",
|
|
100
100
|
"eslint": "10.0.0",
|
|
101
|
-
"eslint-plugin-astro": "1.
|
|
101
|
+
"eslint-plugin-astro": "1.6.0",
|
|
102
102
|
"eslint-plugin-better-tailwindcss": "4.2.0",
|
|
103
103
|
"eslint-plugin-erasable-syntax-only": "0.4.0",
|
|
104
104
|
"eslint-plugin-format": "1.4.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"eslint-plugin-solid": "0.14.5",
|
|
109
109
|
"eslint-plugin-storybook": "10.2.8",
|
|
110
110
|
"eslint-plugin-svelte": "3.15.0",
|
|
111
|
-
"eslint-plugin-vuejs-accessibility": "2.
|
|
111
|
+
"eslint-plugin-vuejs-accessibility": "2.5.0",
|
|
112
112
|
"eslint-typegen": "2.3.0",
|
|
113
113
|
"execa": "9.6.1",
|
|
114
114
|
"find-up-simple": "1.0.1",
|
|
@@ -116,11 +116,10 @@
|
|
|
116
116
|
"pnpm-workspace-yaml": "1.5.0",
|
|
117
117
|
"prettier-plugin-astro": "0.14.1",
|
|
118
118
|
"prettier-plugin-slidev": "1.0.5",
|
|
119
|
-
"svelte": "5.
|
|
119
|
+
"svelte": "5.51.0",
|
|
120
120
|
"svelte-eslint-parser": "1.4.1",
|
|
121
121
|
"tinyglobby": "0.2.15",
|
|
122
122
|
"tsdown": "0.20.3",
|
|
123
|
-
"tsx": "4.21.0",
|
|
124
123
|
"typescript": "5.9.3",
|
|
125
124
|
"vitest": "4.0.18",
|
|
126
125
|
"vue": "3.5.28"
|
|
@@ -130,9 +129,9 @@
|
|
|
130
129
|
"@next/eslint-plugin-next": "^16.1.6",
|
|
131
130
|
"@prettier/plugin-xml": "^3.4.2",
|
|
132
131
|
"@unocss/eslint-plugin": "^66.6.0",
|
|
133
|
-
"astro-eslint-parser": "^1.
|
|
132
|
+
"astro-eslint-parser": "^1.3.0",
|
|
134
133
|
"eslint": "^10.0.0",
|
|
135
|
-
"eslint-plugin-astro": "^1.
|
|
134
|
+
"eslint-plugin-astro": "^1.6.0",
|
|
136
135
|
"eslint-plugin-better-tailwindcss": "^4.2.0",
|
|
137
136
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
138
137
|
"eslint-plugin-format": "^1.4.0",
|
|
@@ -142,7 +141,7 @@
|
|
|
142
141
|
"eslint-plugin-solid": "^0.14.5",
|
|
143
142
|
"eslint-plugin-storybook": "^10.2.8",
|
|
144
143
|
"eslint-plugin-svelte": "^3.15.0",
|
|
145
|
-
"eslint-plugin-vuejs-accessibility": "^2.
|
|
144
|
+
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
146
145
|
"prettier-plugin-astro": "^0.14.1",
|
|
147
146
|
"prettier-plugin-slidev": "^1.0.5",
|
|
148
147
|
"svelte-eslint-parser": "^1.4.1"
|