@isentinel/eslint-config 6.0.0-beta.2 → 6.0.0-beta.4

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/index.d.mts CHANGED
@@ -19518,6 +19518,28 @@ type ReactConfig = ESLintReactSettings & OptionsOverridesTypeAware & {
19518
19518
  } & {
19519
19519
  filenameCase?: "kebabCase" | "pascalCase";
19520
19520
  };
19521
+ interface OptionsUnicorn {
19522
+ /**
19523
+ * Additional entries merged into the built-in `unicorn/name-replacements`
19524
+ * list.
19525
+ *
19526
+ * Entries are shallow-merged over the defaults, so you can add new
19527
+ * replacements or disable a built-in one (set it to `false`) without
19528
+ * replacing the whole list.
19529
+ *
19530
+ * @example
19531
+ *
19532
+ * ```ts
19533
+ * nameReplacements: {
19534
+ * // Add: flag `props` and suggest `properties`.
19535
+ * props: { properties: true },
19536
+ * // Remove: stop flagging `dist`.
19537
+ * dist: false,
19538
+ * };
19539
+ * ```
19540
+ */
19541
+ nameReplacements?: NonNullable<ExtractRuleOptions<NonNullable<RuleOptions["unicorn/name-replacements"]>>[0]>["replacements"];
19542
+ }
19521
19543
  interface SpellCheckConfig {
19522
19544
  /**
19523
19545
  * Whether or not to run the spell checker in the editor.
@@ -19752,6 +19774,8 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsProjectType {
19752
19774
  * @default auto-detect based on the dependencies
19753
19775
  */
19754
19776
  typescript?: OptionsTypescript;
19777
+ /** Supply custom options for eslint-plugin-unicorn. */
19778
+ unicorn?: OptionsUnicorn;
19755
19779
  /**
19756
19780
  * Enable YAML support.
19757
19781
  *
@@ -19893,6 +19917,14 @@ declare function sortRojoProject(): Array<TypedFlatConfigItem>;
19893
19917
  * @returns An array of flat configuration items.
19894
19918
  */
19895
19919
  declare function sortTsconfig(): Array<TypedFlatConfigItem>;
19920
+ /**
19921
+ * Sort CSpell configuration files.
19922
+ *
19923
+ * Requires `yaml` config (for the parser).
19924
+ *
19925
+ * @returns An array of flat configuration items.
19926
+ */
19927
+ declare function sortCspell(): Array<TypedFlatConfigItem>;
19896
19928
  //#endregion
19897
19929
  //#region src/configs/spelling.d.ts
19898
19930
  declare function spelling(options?: OptionsComponentExtensions & OptionsFiles & OptionsIsInEditor & SpellCheckConfig): Promise<Array<TypedFlatConfigItem>>;
@@ -19911,7 +19943,7 @@ declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylist
19911
19943
  declare function typescript(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverridesTypeAware & OptionsStylistic & OptionsTypeScriptErasableOnly & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
19912
19944
  //#endregion
19913
19945
  //#region src/configs/unicorn.d.ts
19914
- declare function unicorn(options?: OptionsHasRoblox & OptionsStylistic & {
19946
+ declare function unicorn(options?: OptionsHasRoblox & OptionsStylistic & OptionsUnicorn & {
19915
19947
  root?: Array<string>;
19916
19948
  }): Promise<Array<TypedFlatConfigItem>>;
19917
19949
  //#endregion
@@ -19983,4 +20015,4 @@ declare const GLOB_BUILD_TOOLS: Array<string>;
19983
20015
  declare const GLOB_ALL_SRC: string[];
19984
20016
  declare const GLOB_EXCLUDE: string[];
19985
20017
  //#endregion
19986
- export { Awaitable, type ConfigNames, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, GitignoreOptions, JsdocOptions, NamedFlatConfigItem, NamedOptionsConfig, OptionsComponentExtensions, OptionsConfig, OptionsE18e, OptionsFiles, OptionsFilesTypeAware, OptionsFormatters, OptionsHasRoblox, OptionsHasTypeScript, OptionsIsInEditor, OptionsJest, OptionsOverrides, OptionsOverridesTypeAware, OptionsPnpm, OptionsProjectType, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVitest, type OxfmtOptions, PerfectionistConfig, type PrettierOptions, ReactConfig, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
20018
+ export { Awaitable, type ConfigNames, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, GitignoreOptions, JsdocOptions, NamedFlatConfigItem, NamedOptionsConfig, OptionsComponentExtensions, OptionsConfig, OptionsE18e, OptionsFiles, OptionsFilesTypeAware, OptionsFormatters, OptionsHasRoblox, OptionsHasTypeScript, OptionsIsInEditor, OptionsJest, OptionsOverrides, OptionsOverridesTypeAware, OptionsPnpm, OptionsProjectType, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsVitest, type OxfmtOptions, PerfectionistConfig, type PrettierOptions, ReactConfig, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
package/dist/index.mjs CHANGED
@@ -1729,7 +1729,6 @@ async function packageJson(options = {}) {
1729
1729
  "package-json/no-redundant-files": "error",
1730
1730
  "package-json/no-redundant-publishConfig": "error",
1731
1731
  "package-json/repository-shorthand": "error",
1732
- "package-json/require-packageManager": ["error", { ignorePrivate: true }],
1733
1732
  "package-json/require-type": "error",
1734
1733
  "package-json/restrict-private-properties": "error",
1735
1734
  "package-json/restrict-top-level-properties": ["error", { ban: [
@@ -1998,6 +1997,7 @@ async function isentinel(options, ...userConfigs) {
1998
1997
  componentExts: componentExtensions,
1999
1998
  stylistic: stylisticOptions
2000
1999
  }), unicorn({
2000
+ ...resolveSubOptions(options, "unicorn"),
2001
2001
  root: rootGlobs,
2002
2002
  stylistic: stylisticOptions
2003
2003
  }));
@@ -2074,11 +2074,14 @@ async function isentinel(options, ...userConfigs) {
2074
2074
  componentExts: componentExtensions,
2075
2075
  type: projectType
2076
2076
  }));
2077
- if (enableSpellCheck !== false) configs.push(spelling({
2078
- ...resolveSubOptions(options, "spellCheck"),
2079
- componentExts: componentExtensions,
2080
- isInEditor
2081
- }));
2077
+ if (enableSpellCheck !== false) {
2078
+ configs.push(spelling({
2079
+ ...resolveSubOptions(options, "spellCheck"),
2080
+ componentExts: componentExtensions,
2081
+ isInEditor
2082
+ }));
2083
+ if (stylisticOptions !== false && options.yaml !== false) configs.push(sortCspell());
2084
+ }
2082
2085
  configs.push(disables({ root: rootGlobs }));
2083
2086
  if (stylisticOptions !== false) configs.push(oxfmt({
2084
2087
  componentExts: componentExtensions,
@@ -2918,225 +2921,251 @@ function sortGithubAction() {
2918
2921
  return [{
2919
2922
  name: "isentinel/sort/github-actions",
2920
2923
  files: [`.github/workflows/${GLOB_YAML}`],
2921
- rules: { "yaml/sort-keys": [
2922
- "error",
2923
- {
2924
- order: [
2925
- "name",
2926
- "run-name",
2927
- "on",
2928
- "permissions",
2929
- "env",
2930
- "concurrency",
2931
- "jobs"
2932
- ],
2933
- pathPattern: "^$"
2934
- },
2935
- {
2936
- order: [
2937
- "name",
2938
- "permissions",
2939
- "needs",
2940
- "if",
2941
- "runs-on",
2942
- "environment",
2943
- "concurrency",
2944
- "outputs",
2945
- "env",
2946
- "defaults",
2947
- "steps",
2948
- "timeout-minutes",
2949
- "strategy",
2950
- "continue-on-error",
2951
- "container",
2952
- "services",
2953
- "uses",
2954
- "with",
2955
- "secrets"
2956
- ],
2957
- pathPattern: "^jobs\\.[^.]+$"
2958
- },
2959
- {
2960
- order: [
2961
- "check_run",
2962
- "check_suite",
2963
- "create",
2964
- "delete",
2965
- "deployment",
2966
- "deployment_status",
2967
- "discussion",
2968
- "discussion_comment",
2969
- "fork",
2970
- "gollum",
2971
- "issue_comment",
2972
- "issues",
2973
- "label",
2974
- "merge_group",
2975
- "milestone",
2976
- "page_build",
2977
- "public",
2978
- "pull_request",
2979
- "pull_request_comment",
2980
- "pull_request_review",
2981
- "pull_request_review_comment",
2982
- "pull_request_target",
2983
- "push",
2984
- "registry_package",
2985
- "release",
2986
- "repository_dispatch",
2987
- "schedule",
2988
- "status",
2989
- "watch",
2990
- "workflow_call",
2991
- "workflow_dispatch",
2992
- "workflow_run"
2993
- ],
2994
- pathPattern: "^on$"
2995
- },
2996
- {
2997
- order: [
2998
- "branches",
2999
- "branches-ignore",
3000
- "paths",
3001
- "paths-ignore"
3002
- ],
3003
- pathPattern: "^on\\.pull_request$"
3004
- },
3005
- {
3006
- order: [
3007
- "branches",
3008
- "branches-ignore",
3009
- "paths",
3010
- "paths-ignore"
3011
- ],
3012
- pathPattern: "^on\\.pull_request_target$"
3013
- },
3014
- {
3015
- order: [
3016
- "branches",
3017
- "tags",
3018
- "branches-ignore",
3019
- "tags-ignore",
3020
- "paths",
3021
- "paths-ignore"
3022
- ],
3023
- pathPattern: "^on\\.push$"
3024
- },
3025
- {
3026
- order: [
3027
- "inputs",
3028
- "outputs",
3029
- "secrets"
3030
- ],
3031
- pathPattern: "^on\\.workflow_call$"
3032
- },
3033
- {
3034
- order: ["inputs"],
3035
- pathPattern: "^on\\.workflow_dispatch$"
3036
- },
3037
- {
3038
- order: ["branches", "branches-ignore"],
3039
- pathPattern: "^on\\.workflow_run$"
3040
- },
3041
- {
3042
- order: [
3043
- "description",
3044
- "required",
3045
- "default",
3046
- "type"
3047
- ],
3048
- pathPattern: "^on\\.(workflow_call|workflow_dispatch)\\.inputs\\.[^.]+$"
3049
- },
3050
- {
3051
- order: ["shell", "working-directory"],
3052
- pathPattern: "^(defaults\\.run|jobs\\.[^.]+\\.defaults\\.run)$"
3053
- },
3054
- {
3055
- order: ["group", "cancel-in-progress"],
3056
- pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
3057
- },
3058
- {
3059
- order: [
3060
- "name",
3061
- "permissions",
3062
- "needs",
3063
- "if",
3064
- "runs-on",
3065
- "environment",
3066
- "concurrency",
3067
- "outputs",
3068
- "env",
3069
- "defaults",
3070
- "steps",
3071
- "timeout-minutes",
3072
- "strategy",
3073
- "continue-on-error",
3074
- "container",
3075
- "services",
3076
- "uses",
3077
- "with",
3078
- "secrets"
3079
- ],
3080
- pathPattern: "^jobs\\. [^.]+$"
3081
- },
3082
- {
3083
- order: [
3084
- "id",
3085
- "if",
3086
- "name",
3087
- "uses",
3088
- "run",
3089
- "working-directory",
3090
- "with",
3091
- "env",
3092
- "continue-on-error",
3093
- "timeout-minutes"
3094
- ],
3095
- pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]$"
3096
- },
3097
- {
3098
- order: ["args", "entrypoint"],
3099
- pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]\\.with$"
3100
- },
3101
- {
3102
- order: [
3103
- "matrix",
3104
- "fail-fast",
3105
- "max-parallel"
3106
- ],
3107
- pathPattern: "^jobs\\.[^.]+\\.strategy$"
3108
- },
3109
- {
3110
- order: ["include", "exclude"],
3111
- pathPattern: "^jobs\\.[^.]+\\.strategy\\.matrix$"
3112
- },
3113
- {
3114
- order: [
3115
- "image",
3116
- "credentials",
3117
- "env",
3118
- "ports",
3119
- "volumes",
3120
- "options"
3121
- ],
3122
- pathPattern: "^jobs\\.[^.]+\\.container$"
3123
- },
3124
- {
3125
- order: [
3126
- "image",
3127
- "credentials",
3128
- "env",
3129
- "ports",
3130
- "volumes",
3131
- "options"
3132
- ],
3133
- pathPattern: "^jobs\\.[^.]+\\.services\\.[^.]+$"
3134
- },
3135
- {
3136
- order: { type: "asc" },
3137
- pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
3138
- }
3139
- ] }
2924
+ rules: {
2925
+ "yaml/sort-keys": [
2926
+ "error",
2927
+ {
2928
+ order: [
2929
+ "name",
2930
+ "run-name",
2931
+ "on",
2932
+ "permissions",
2933
+ "env",
2934
+ "concurrency",
2935
+ "jobs"
2936
+ ],
2937
+ pathPattern: "^$"
2938
+ },
2939
+ {
2940
+ order: [
2941
+ "name",
2942
+ "permissions",
2943
+ "needs",
2944
+ "if",
2945
+ "runs-on",
2946
+ "environment",
2947
+ "concurrency",
2948
+ "outputs",
2949
+ "env",
2950
+ "defaults",
2951
+ "steps",
2952
+ "timeout-minutes",
2953
+ "strategy",
2954
+ "continue-on-error",
2955
+ "container",
2956
+ "services",
2957
+ "uses",
2958
+ "with",
2959
+ "secrets"
2960
+ ],
2961
+ pathPattern: "^jobs\\.[^.]+$"
2962
+ },
2963
+ {
2964
+ order: [
2965
+ "check_run",
2966
+ "check_suite",
2967
+ "create",
2968
+ "delete",
2969
+ "deployment",
2970
+ "deployment_status",
2971
+ "discussion",
2972
+ "discussion_comment",
2973
+ "fork",
2974
+ "gollum",
2975
+ "issue_comment",
2976
+ "issues",
2977
+ "label",
2978
+ "merge_group",
2979
+ "milestone",
2980
+ "page_build",
2981
+ "public",
2982
+ "pull_request",
2983
+ "pull_request_comment",
2984
+ "pull_request_review",
2985
+ "pull_request_review_comment",
2986
+ "pull_request_target",
2987
+ "push",
2988
+ "registry_package",
2989
+ "release",
2990
+ "repository_dispatch",
2991
+ "schedule",
2992
+ "status",
2993
+ "watch",
2994
+ "workflow_call",
2995
+ "workflow_dispatch",
2996
+ "workflow_run"
2997
+ ],
2998
+ pathPattern: "^on$"
2999
+ },
3000
+ {
3001
+ order: [
3002
+ "branches",
3003
+ "branches-ignore",
3004
+ "paths",
3005
+ "paths-ignore"
3006
+ ],
3007
+ pathPattern: "^on\\.pull_request$"
3008
+ },
3009
+ {
3010
+ order: [
3011
+ "branches",
3012
+ "branches-ignore",
3013
+ "paths",
3014
+ "paths-ignore"
3015
+ ],
3016
+ pathPattern: "^on\\.pull_request_target$"
3017
+ },
3018
+ {
3019
+ order: [
3020
+ "branches",
3021
+ "tags",
3022
+ "branches-ignore",
3023
+ "tags-ignore",
3024
+ "paths",
3025
+ "paths-ignore"
3026
+ ],
3027
+ pathPattern: "^on\\.push$"
3028
+ },
3029
+ {
3030
+ order: [
3031
+ "inputs",
3032
+ "outputs",
3033
+ "secrets"
3034
+ ],
3035
+ pathPattern: "^on\\.workflow_call$"
3036
+ },
3037
+ {
3038
+ order: ["inputs"],
3039
+ pathPattern: "^on\\.workflow_dispatch$"
3040
+ },
3041
+ {
3042
+ order: ["branches", "branches-ignore"],
3043
+ pathPattern: "^on\\.workflow_run$"
3044
+ },
3045
+ {
3046
+ order: [
3047
+ "description",
3048
+ "required",
3049
+ "default",
3050
+ "type"
3051
+ ],
3052
+ pathPattern: "^on\\.(workflow_call|workflow_dispatch)\\.inputs\\.[^.]+$"
3053
+ },
3054
+ {
3055
+ order: ["shell", "working-directory"],
3056
+ pathPattern: "^(defaults\\.run|jobs\\.[^.]+\\.defaults\\.run)$"
3057
+ },
3058
+ {
3059
+ order: ["group", "cancel-in-progress"],
3060
+ pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
3061
+ },
3062
+ {
3063
+ order: [
3064
+ "name",
3065
+ "permissions",
3066
+ "needs",
3067
+ "if",
3068
+ "runs-on",
3069
+ "environment",
3070
+ "concurrency",
3071
+ "outputs",
3072
+ "env",
3073
+ "defaults",
3074
+ "steps",
3075
+ "timeout-minutes",
3076
+ "strategy",
3077
+ "continue-on-error",
3078
+ "container",
3079
+ "services",
3080
+ "uses",
3081
+ "with",
3082
+ "secrets"
3083
+ ],
3084
+ pathPattern: "^jobs\\. [^.]+$"
3085
+ },
3086
+ {
3087
+ order: [
3088
+ "id",
3089
+ "if",
3090
+ "name",
3091
+ "uses",
3092
+ "run",
3093
+ "working-directory",
3094
+ "with",
3095
+ "env",
3096
+ "continue-on-error",
3097
+ "timeout-minutes"
3098
+ ],
3099
+ pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]$"
3100
+ },
3101
+ {
3102
+ order: ["args", "entrypoint"],
3103
+ pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]\\.with$"
3104
+ },
3105
+ {
3106
+ order: [
3107
+ "matrix",
3108
+ "fail-fast",
3109
+ "max-parallel"
3110
+ ],
3111
+ pathPattern: "^jobs\\.[^.]+\\.strategy$"
3112
+ },
3113
+ {
3114
+ order: ["include", "exclude"],
3115
+ pathPattern: "^jobs\\.[^.]+\\.strategy\\.matrix$"
3116
+ },
3117
+ {
3118
+ order: [
3119
+ "image",
3120
+ "credentials",
3121
+ "env",
3122
+ "ports",
3123
+ "volumes",
3124
+ "options"
3125
+ ],
3126
+ pathPattern: "^jobs\\.[^.]+\\.container$"
3127
+ },
3128
+ {
3129
+ order: [
3130
+ "image",
3131
+ "credentials",
3132
+ "env",
3133
+ "ports",
3134
+ "volumes",
3135
+ "options"
3136
+ ],
3137
+ pathPattern: "^jobs\\.[^.]+\\.services\\.[^.]+$"
3138
+ },
3139
+ {
3140
+ order: { type: "asc" },
3141
+ pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
3142
+ }
3143
+ ],
3144
+ "yaml/sort-sequence-values": [
3145
+ "error",
3146
+ {
3147
+ order: {
3148
+ natural: true,
3149
+ type: "asc"
3150
+ },
3151
+ pathPattern: "^on$"
3152
+ },
3153
+ {
3154
+ order: {
3155
+ natural: true,
3156
+ type: "asc"
3157
+ },
3158
+ pathPattern: "^on\\.[^.]+\\.(branches|branches-ignore|tags|tags-ignore|paths|paths-ignore|types)$"
3159
+ },
3160
+ {
3161
+ order: {
3162
+ natural: true,
3163
+ type: "asc"
3164
+ },
3165
+ pathPattern: "^jobs\\.[^.]+\\.needs$"
3166
+ }
3167
+ ]
3168
+ }
3140
3169
  }, {
3141
3170
  name: "isentinel/sort/github-composite-actions",
3142
3171
  files: [`.github/actions/${GLOB_YAML}`],
@@ -3323,110 +3352,119 @@ function sortPnpmWorkspace() {
3323
3352
  return [{
3324
3353
  name: "isentinel/sort/pnpm-workspace-yaml-sort",
3325
3354
  files: ["pnpm-workspace.yaml"],
3326
- rules: { "yaml/sort-keys": [
3327
- "error",
3328
- {
3329
- order: [
3330
- ...[
3331
- "autoInstallPeers",
3332
- "blockExoticSubdeps",
3333
- "cacheDir",
3334
- "catalogMode",
3335
- "cleanupUnusedCatalogs",
3336
- "dedupeDirectDeps",
3337
- "dedupePeerDependents",
3338
- "dedupePeers",
3339
- "deployAllFiles",
3340
- "enablePrePostScripts",
3341
- "engineStrict",
3342
- "extendNodePath",
3343
- "hoist",
3344
- "hoistPattern",
3345
- "hoistWorkspacePackages",
3346
- "hoistingLimits",
3347
- "ignoreCompatibilityDb",
3348
- "ignoreDepScripts",
3349
- "ignoreScripts",
3350
- "ignoreWorkspaceRootCheck",
3351
- "ignoredWorkspaceGlobs",
3352
- "includeWorkspaceRoot",
3353
- "injectWorkspacePackages",
3354
- "linkWorkspacePackages",
3355
- "managePackageManagerVersions",
3356
- "minimumReleaseAge",
3357
- "minimumReleaseAgeExclude",
3358
- "minimumReleaseAgeIgnoreMissingTime",
3359
- "minimumReleaseAgeStrict",
3360
- "modulesDir",
3361
- "nodeLinker",
3362
- "nodeVersion",
3363
- "optimisticRepeatInstall",
3364
- "packageManagerStrict",
3365
- "packageManagerStrictVersion",
3366
- "preferSymlinkedExecutables",
3367
- "preferWorkspacePackages",
3368
- "publicHoistPattern",
3369
- "registrySupportsTimeField",
3370
- "requiredScripts",
3371
- "resolutionMode",
3372
- "resolvePeersFromWorkspaceRoot",
3373
- "saveExact",
3374
- "savePrefix",
3375
- "saveWorkspaceProtocol",
3376
- "scriptShell",
3377
- "shamefullyHoist",
3378
- "sharedWorkspaceLockfile",
3379
- "shellEmulator",
3380
- "stateDir",
3381
- "strictDepBuilds",
3382
- "strictPeerDependencies",
3383
- "supportedArchitectures",
3384
- "symlink",
3385
- "tag",
3386
- "trustLockfile",
3387
- "trustPolicy",
3388
- "trustPolicyExclude",
3389
- "trustPolicyIgnoreAfter",
3390
- "updateConfig",
3391
- "updateNotifier",
3392
- "verifyDepsBeforeRun"
3393
- ],
3394
- ...[
3395
- "gitBranchLockfile",
3396
- "lockfile",
3397
- "lockfileIncludeTarballUrl",
3398
- "mergeGitBranchLockfilesBranchPattern",
3399
- "peersSuffixMaxLength",
3400
- "preferFrozenLockfile"
3401
- ],
3402
- "packages",
3403
- "overrides",
3404
- "patchedDependencies",
3405
- "catalog",
3406
- "catalogs",
3407
- ...[
3408
- "allowBuilds",
3409
- "allowNonAppliedPatches",
3410
- "allowedDeprecatedVersions",
3411
- "configDependencies",
3412
- "dangerouslyAllowAllBuilds",
3413
- "ignoredBuiltDependencies",
3414
- "ignoredOptionalDependencies",
3415
- "neverBuiltDependencies",
3416
- "onlyBuiltDependencies",
3417
- "onlyBuiltDependenciesFile",
3418
- "packageExtensions",
3419
- "peerDependencyRules"
3355
+ rules: {
3356
+ "yaml/sort-keys": [
3357
+ "error",
3358
+ {
3359
+ order: [
3360
+ ...[
3361
+ "autoInstallPeers",
3362
+ "blockExoticSubdeps",
3363
+ "cacheDir",
3364
+ "catalogMode",
3365
+ "cleanupUnusedCatalogs",
3366
+ "dedupeDirectDeps",
3367
+ "dedupePeerDependents",
3368
+ "dedupePeers",
3369
+ "deployAllFiles",
3370
+ "enablePrePostScripts",
3371
+ "engineStrict",
3372
+ "extendNodePath",
3373
+ "hoist",
3374
+ "hoistPattern",
3375
+ "hoistWorkspacePackages",
3376
+ "hoistingLimits",
3377
+ "ignoreCompatibilityDb",
3378
+ "ignoreDepScripts",
3379
+ "ignoreScripts",
3380
+ "ignoreWorkspaceRootCheck",
3381
+ "ignoredWorkspaceGlobs",
3382
+ "includeWorkspaceRoot",
3383
+ "injectWorkspacePackages",
3384
+ "linkWorkspacePackages",
3385
+ "managePackageManagerVersions",
3386
+ "minimumReleaseAge",
3387
+ "minimumReleaseAgeExclude",
3388
+ "minimumReleaseAgeIgnoreMissingTime",
3389
+ "minimumReleaseAgeStrict",
3390
+ "modulesDir",
3391
+ "nodeLinker",
3392
+ "nodeVersion",
3393
+ "optimisticRepeatInstall",
3394
+ "packageManagerStrict",
3395
+ "packageManagerStrictVersion",
3396
+ "preferSymlinkedExecutables",
3397
+ "preferWorkspacePackages",
3398
+ "publicHoistPattern",
3399
+ "registrySupportsTimeField",
3400
+ "requiredScripts",
3401
+ "resolutionMode",
3402
+ "resolvePeersFromWorkspaceRoot",
3403
+ "saveExact",
3404
+ "savePrefix",
3405
+ "saveWorkspaceProtocol",
3406
+ "scriptShell",
3407
+ "shamefullyHoist",
3408
+ "sharedWorkspaceLockfile",
3409
+ "shellEmulator",
3410
+ "stateDir",
3411
+ "strictDepBuilds",
3412
+ "strictPeerDependencies",
3413
+ "supportedArchitectures",
3414
+ "symlink",
3415
+ "tag",
3416
+ "trustLockfile",
3417
+ "trustPolicy",
3418
+ "trustPolicyExclude",
3419
+ "trustPolicyIgnoreAfter",
3420
+ "updateConfig",
3421
+ "updateNotifier",
3422
+ "verifyDepsBeforeRun"
3423
+ ],
3424
+ ...[
3425
+ "gitBranchLockfile",
3426
+ "lockfile",
3427
+ "lockfileIncludeTarballUrl",
3428
+ "mergeGitBranchLockfilesBranchPattern",
3429
+ "peersSuffixMaxLength",
3430
+ "preferFrozenLockfile"
3431
+ ],
3432
+ "packages",
3433
+ "overrides",
3434
+ "patchedDependencies",
3435
+ "catalog",
3436
+ "catalogs",
3437
+ ...[
3438
+ "allowBuilds",
3439
+ "allowNonAppliedPatches",
3440
+ "allowedDeprecatedVersions",
3441
+ "configDependencies",
3442
+ "dangerouslyAllowAllBuilds",
3443
+ "ignoredBuiltDependencies",
3444
+ "ignoredOptionalDependencies",
3445
+ "neverBuiltDependencies",
3446
+ "onlyBuiltDependencies",
3447
+ "onlyBuiltDependenciesFile",
3448
+ "packageExtensions",
3449
+ "peerDependencyRules"
3450
+ ],
3451
+ { order: { type: "asc" } }
3420
3452
  ],
3421
- { order: { type: "asc" } }
3422
- ],
3423
- pathPattern: "^$"
3424
- },
3425
- {
3426
- order: { type: "asc" },
3427
- pathPattern: ".*"
3428
- }
3429
- ] }
3453
+ pathPattern: "^$"
3454
+ },
3455
+ {
3456
+ order: { type: "asc" },
3457
+ pathPattern: ".*"
3458
+ }
3459
+ ],
3460
+ "yaml/sort-sequence-values": ["error", {
3461
+ order: {
3462
+ natural: true,
3463
+ type: "asc"
3464
+ },
3465
+ pathPattern: "^(packages|onlyBuiltDependencies|neverBuiltDependencies|ignoredBuiltDependencies|ignoredWorkspaceGlobs)$"
3466
+ }]
3467
+ }
3430
3468
  }];
3431
3469
  }
3432
3470
  /**
@@ -3601,6 +3639,32 @@ function sortTsconfig() {
3601
3639
  ] }
3602
3640
  }];
3603
3641
  }
3642
+ /**
3643
+ * Sort CSpell configuration files.
3644
+ *
3645
+ * Requires `yaml` config (for the parser).
3646
+ *
3647
+ * @returns An array of flat configuration items.
3648
+ */
3649
+ function sortCspell() {
3650
+ return [{
3651
+ name: "isentinel/sort/cspell",
3652
+ files: [
3653
+ "**/cspell.y?(a)ml",
3654
+ "**/cspell.config.y?(a)ml",
3655
+ "**/cspell.config.*.y?(a)ml",
3656
+ "**/.cspell.y?(a)ml",
3657
+ "**/.cspell.config.y?(a)ml"
3658
+ ],
3659
+ rules: { "yaml/sort-sequence-values": ["error", {
3660
+ order: {
3661
+ natural: true,
3662
+ type: "asc"
3663
+ },
3664
+ pathPattern: "^(words|ignoreWords|flagWords|ignorePaths|dictionaries|enableFiletypes)$"
3665
+ }] }
3666
+ }];
3667
+ }
3604
3668
  //#endregion
3605
3669
  //#region src/configs/stylistic.ts
3606
3670
  const StylisticConfigDefaults = {
@@ -4211,7 +4275,12 @@ const abbreviations = {
4211
4275
  utils: false
4212
4276
  };
4213
4277
  async function unicorn(options = {}) {
4214
- const { roblox = true, root: customRootGlobs, stylistic = true } = options;
4278
+ const { nameReplacements, roblox = true, root: customRootGlobs, stylistic = true } = options;
4279
+ const replacements = {
4280
+ ...abbreviations,
4281
+ ...roblox ? { buf: false } : {},
4282
+ ...nameReplacements
4283
+ };
4215
4284
  const pluginUnicorn = await interopDefault(import("eslint-plugin-unicorn"));
4216
4285
  const rootGlobs = mergeGlobs(GLOB_ROOT.map(toSourceGlob), customRootGlobs?.map(toSourceGlob));
4217
4286
  return [
@@ -4239,7 +4308,7 @@ async function unicorn(options = {}) {
4239
4308
  "unicorn/isolated-functions": "error",
4240
4309
  "unicorn/name-replacements": ["error", {
4241
4310
  checkFilenames: true,
4242
- replacements: abbreviations
4311
+ replacements
4243
4312
  }],
4244
4313
  "unicorn/no-array-sort-for-min-max": "error",
4245
4314
  "unicorn/no-async-promise-finally": "error",
@@ -4355,7 +4424,7 @@ async function unicorn(options = {}) {
4355
4424
  files: rootGlobs,
4356
4425
  rules: { "unicorn/name-replacements": ["error", {
4357
4426
  checkFilenames: false,
4358
- replacements: abbreviations
4427
+ replacements
4359
4428
  }] }
4360
4429
  }
4361
4430
  ];
@@ -13381,4 +13450,4 @@ async function yaml(options = {}) {
13381
13450
  }];
13382
13451
  }
13383
13452
  //#endregion
13384
- export { GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
13453
+ export { GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, ceaseNonsense, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isentinel/eslint-config",
3
- "version": "6.0.0-beta.2",
3
+ "version": "6.0.0-beta.4",
4
4
  "description": "iSentinel's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config",
@@ -118,7 +118,7 @@
118
118
  "type-fest": "5.7.0",
119
119
  "typescript": "6.0.3",
120
120
  "unplugin-unused": "0.5.7",
121
- "@isentinel/eslint-config": "6.0.0-beta.2"
121
+ "@isentinel/eslint-config": "6.0.0-beta.4"
122
122
  },
123
123
  "peerDependencies": {
124
124
  "@vitest/eslint-plugin": "^1.6.4",