@shayanthenerd/eslint-config 0.13.0 → 0.13.1

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.
@@ -13,7 +13,14 @@ function getPerfectionistConfig(options) {
13
13
  name: "shayanthenerd/perfectionist",
14
14
  files: isEnabled(vue) ? [globs.src, globs.vue] : [globs.src],
15
15
  plugins: { perfectionist: eslintPluginPerfectionist },
16
- settings: { perfectionist: { type: sortType } },
16
+ settings: { perfectionist: {
17
+ type: sortType,
18
+ specialCharacters: "trim",
19
+ fallbackSort: {
20
+ order: "asc",
21
+ type: "natural"
22
+ }
23
+ } },
17
24
  rules: getPerfectionistRules(options)
18
25
  }, overrides);
19
26
  }
@@ -17,6 +17,7 @@ function getHTMLRules(options) {
17
17
  "@html-eslint/no-obsolete-tags": "error",
18
18
  "@html-eslint/no-script-style-type": "warn",
19
19
  "@html-eslint/no-target-blank": "warn",
20
+ "@html-eslint/no-whitespace-only-children": "error",
20
21
  "@html-eslint/prefer-https": "warn",
21
22
  "@html-eslint/require-button-type": "error",
22
23
  "@html-eslint/require-closing-tags": ["warn", {
@@ -12,8 +12,8 @@ function getPerfectionistRules(options) {
12
12
  "perfectionist/sort-union-types": "warn",
13
13
  "perfectionist/sort-array-includes": "warn",
14
14
  "perfectionist/sort-intersection-types": "warn",
15
- "perfectionist/sort-named-imports": ["warn", { groupKind: "types-first" }],
16
- "perfectionist/sort-named-exports": ["warn", { groupKind: "types-first" }],
15
+ "perfectionist/sort-named-imports": "warn",
16
+ "perfectionist/sort-named-exports": "warn",
17
17
  "perfectionist/sort-imports": ["warn", {
18
18
  environment: env,
19
19
  tsconfig: tsConfig || void 0,
@@ -87,6 +87,7 @@ function getTypeScriptRules(options) {
87
87
  "@typescript-eslint/no-unused-expressions": "error",
88
88
  "@typescript-eslint/no-unused-vars": "error",
89
89
  "@typescript-eslint/no-useless-constructor": "error",
90
+ "@typescript-eslint/no-useless-default-assignment": "warn",
90
91
  "@typescript-eslint/no-wrapper-object-types": "error",
91
92
  "@typescript-eslint/only-throw-error": "error",
92
93
  "@typescript-eslint/prefer-as-const": "warn",
@@ -2,6 +2,7 @@ import { RuleOptions } from "../eslintRules.mjs";
2
2
  import { ConfigWithOverrides } from "../index.mjs";
3
3
 
4
4
  //#region src/types/configOptions/perfectionist.d.ts
5
+ type SortTypeOptions = RuleOptions<'perfectionist/sort-imports'>['type'];
5
6
  interface PerfectionistOptions extends ConfigWithOverrides {
6
7
  /**
7
8
  * The type of sorting.
@@ -10,7 +11,7 @@ interface PerfectionistOptions extends ConfigWithOverrides {
10
11
  *
11
12
  * @see [Perfectionist Settings: `type` option](https://perfectionist.dev/guide/getting-started#settings)
12
13
  */
13
- sortType?: RuleOptions<'perfectionist/sort-imports'>['type'];
14
+ sortType?: Exclude<SortTypeOptions, 'type-import-first'>;
14
15
  }
15
16
  //#endregion
16
17
  export { type PerfectionistOptions };
@@ -7,7 +7,7 @@ interface BlockLang {
7
7
  style?: 'css' | 'scss' | 'postcss' | 'implicit';
8
8
  script?: 'js' | 'ts' | 'jsx' | 'tsx' | 'implicit';
9
9
  }
10
- type Macro = 'definePage' | 'defineModel' | 'defineProps' | 'defineEmits' | 'defineSlots' | 'defineCustom' | 'defineExpose' | 'defineOptions';
10
+ type Macro = 'definePage' | 'defineEmits' | 'defineModel' | 'defineProps' | 'defineSlots' | 'defineCustom' | 'defineExpose' | 'defineOptions';
11
11
  type SFCBlock = 'docs' | 'template' | 'script[setup]' | 'style[scoped]' | 'i18n[locale=en]' | 'script:not([setup])' | 'style:not([scoped])' | 'i18n:not([locale=en])';
12
12
  type VBindStyleSameNameShorthandOptions = RuleOptions<'vue/v-bind-style', 1>['sameNameShorthand'];
13
13
  interface VueOptions extends ConfigWithOverrides {