@so1ve/eslint-config 4.0.1 → 4.1.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/index.d.mts CHANGED
@@ -3469,10 +3469,10 @@ interface RuleOptions {
3469
3469
  */
3470
3470
  'so1ve/no-import-promises-as'?: Linter.RuleEntry<[]>;
3471
3471
  /**
3472
- * Disallow inline type import.
3473
- * @see no-inline-type-import
3472
+ * Disallow inline type modifiers in import/export.
3473
+ * @see no-inline-type-modifier
3474
3474
  */
3475
- 'so1ve/no-inline-type-import'?: Linter.RuleEntry<[]>;
3475
+ 'so1ve/no-inline-type-modifier'?: Linter.RuleEntry<[]>;
3476
3476
  /**
3477
3477
  * Disallow negated comparison.
3478
3478
  * @see no-negated-comparison
@@ -3493,6 +3493,16 @@ interface RuleOptions {
3493
3493
  * @see require-async-with-await
3494
3494
  */
3495
3495
  'so1ve/require-async-with-await'?: Linter.RuleEntry<[]>;
3496
+ /**
3497
+ * Sort export declarations.
3498
+ * @see sort-exports
3499
+ */
3500
+ 'so1ve/sort-exports'?: Linter.RuleEntry<[]>;
3501
+ /**
3502
+ * Sort import declarations.
3503
+ * @see sort-imports
3504
+ */
3505
+ 'so1ve/sort-imports'?: Linter.RuleEntry<So1VeSortImports>;
3496
3506
  /**
3497
3507
  * Sort attributes of root <script>, <template>, and <style> elements in Vue files.
3498
3508
  * @see vue-root-element-sort-attributes
@@ -3604,14 +3614,6 @@ interface RuleOptions {
3604
3614
  * @see https://eslint.org/docs/latest/rules/sort-imports
3605
3615
  */
3606
3616
  'sort-imports'?: Linter.RuleEntry<SortImports>;
3607
- /**
3608
- * @see https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order
3609
- */
3610
- 'sort-imports/exports'?: Linter.RuleEntry<[]>;
3611
- /**
3612
- * @see https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order
3613
- */
3614
- 'sort-imports/imports'?: Linter.RuleEntry<SortImportsImports>;
3615
3617
  /**
3616
3618
  * Require object keys to be sorted
3617
3619
  * @see https://eslint.org/docs/latest/rules/sort-keys
@@ -12085,6 +12087,10 @@ type SemiSpacing = [] | [{
12085
12087
  }];
12086
12088
  // ----- semi-style -----
12087
12089
  type SemiStyle = [] | [("last" | "first")];
12090
+ // ----- so1ve/sort-imports -----
12091
+ type So1VeSortImports = [] | [{
12092
+ groups?: string[][];
12093
+ }];
12088
12094
  // ----- so1ve/vue-root-element-sort-attributes -----
12089
12095
  type So1VeVueRootElementSortAttributes = [] | [{
12090
12096
  script?: string[];
@@ -12140,10 +12146,6 @@ type SortImports = [] | [{
12140
12146
  ignoreMemberSort?: boolean;
12141
12147
  allowSeparatedGroups?: boolean;
12142
12148
  }];
12143
- // ----- sort-imports/imports -----
12144
- type SortImportsImports = [] | [{
12145
- groups?: string[][];
12146
- }];
12147
12149
  // ----- sort-keys -----
12148
12150
  type SortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
12149
12151
  caseSensitive?: boolean;
@@ -16303,7 +16305,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
16303
16305
  onlyEquality?: boolean;
16304
16306
  }];
16305
16307
  // Names of all the configs
16306
- type ConfigNames = 'so1ve/ignores' | 'so1ve/javascript/setup' | 'so1ve/javascript/rules' | 'so1ve/javascript/regexp' | 'so1ve/javascript/cli' | 'so1ve/comments/setup' | 'so1ve/comments/rules' | 'so1ve/node/setup' | 'so1ve/node/rules' | 'so1ve/only-error' | 'so1ve/promise/setup' | 'so1ve/promise/rules' | 'so1ve/sort-imports/setup' | 'so1ve/sort-imports/rules' | 'so1ve/imports/setup' | 'so1ve/imports/rules' | 'so1ve/imports/rules/dts' | 'so1ve/unicorn/setup' | 'so1ve/unicorn/rules' | 'so1ve/command' | 'so1ve/de-morgan' | 'so1ve/pnpm/package-json' | 'so1ve/pnpm/pnpm-workspace-yaml' | 'so1ve/yaml/pnpm-workspace-yaml-sort' | 'so1ve/html/setup' | 'so1ve/html/rules' | 'so1ve/typescript/setup' | 'so1ve/typescript/rules' | 'so1ve/typescript/rules/type-aware' | 'so1ve/typescript/rules/dts' | 'so1ve/typescript/rules/js' | 'so1ve/test/setup' | 'so1ve/test/rules' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'so1ve/vue/setup' | 'so1ve/vue/rules' | 'so1ve/solid/setup' | 'so1ve/solid/rules' | 'so1ve/formatting/setup' | 'so1ve/formatting/rules' | 'so1ve/formatting/rules/sort-package-json' | 'so1ve/formatting/rules/sort-tsconfig' | 'so1ve/formatting/rules/test' | 'so1ve/perfectionist/setup' | 'so1ve/perfectionist/rules' | 'so1ve/jsonc/setup' | 'so1ve/jsonc/rules' | 'so1ve/toml/setup' | 'so1ve/toml/rules' | 'so1ve/yaml/setup' | 'so1ve/yaml/rules' | 'so1ve/mdx/setup' | 'so1ve/mdx/rules';
16308
+ type ConfigNames = 'so1ve/ignores' | 'so1ve/javascript/setup' | 'so1ve/javascript/rules' | 'so1ve/javascript/regexp' | 'so1ve/javascript/cli' | 'so1ve/comments/setup' | 'so1ve/comments/rules' | 'so1ve/node/setup' | 'so1ve/node/rules' | 'so1ve/only-error' | 'so1ve/promise/setup' | 'so1ve/promise/rules' | 'so1ve/sort-imports/rules' | 'so1ve/imports/setup' | 'so1ve/imports/rules' | 'so1ve/imports/rules/dts' | 'so1ve/unicorn/setup' | 'so1ve/unicorn/rules' | 'so1ve/command' | 'so1ve/de-morgan' | 'so1ve/pnpm/package-json' | 'so1ve/pnpm/pnpm-workspace-yaml' | 'so1ve/yaml/pnpm-workspace-yaml-sort' | 'so1ve/html/setup' | 'so1ve/html/rules' | 'so1ve/typescript/setup' | 'so1ve/typescript/rules' | 'so1ve/typescript/rules/type-aware' | 'so1ve/typescript/rules/dts' | 'so1ve/typescript/rules/js' | 'so1ve/test/setup' | 'so1ve/test/rules' | 'antfu/astro/setup' | 'antfu/astro/rules' | 'so1ve/vue/setup' | 'so1ve/vue/rules' | 'so1ve/solid/setup' | 'so1ve/solid/rules' | 'so1ve/formatting/setup' | 'so1ve/formatting/rules' | 'so1ve/formatting/rules/sort-package-json' | 'so1ve/formatting/rules/sort-tsconfig' | 'so1ve/formatting/rules/test' | 'so1ve/perfectionist/setup' | 'so1ve/perfectionist/rules' | 'so1ve/jsonc/setup' | 'so1ve/jsonc/rules' | 'so1ve/toml/setup' | 'so1ve/toml/rules' | 'so1ve/yaml/setup' | 'so1ve/yaml/rules' | 'so1ve/mdx/setup' | 'so1ve/mdx/rules';
16307
16309
  //#endregion
16308
16310
  //#region src/types.d.ts
16309
16311
  type MaybePromise<T> = T | Promise<T>;
package/dist/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import createCommand from "eslint-plugin-command/config";
2
2
  import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
3
3
  import pluginSo1ve from "@so1ve/eslint-plugin";
4
- import pluginSortImports from "@so1ve/eslint-plugin-sort-imports";
5
4
  import pluginArrayFunc from "eslint-plugin-array-func";
6
5
  import pluginImportLite from "eslint-plugin-import-lite";
7
6
  import pluginImport from "eslint-plugin-import-x";
@@ -1072,7 +1071,6 @@ async function javascript({ overrides } = {}) {
1072
1071
  "array-func": pluginArrayFunc,
1073
1072
  "no-await-in-promise": pluginNoAwaitInPromise,
1074
1073
  "so1ve": pluginSo1ve,
1075
- "sort-imports": pluginSortImports,
1076
1074
  "unused-imports": pluginUnusedImports
1077
1075
  }
1078
1076
  },
@@ -1346,8 +1344,6 @@ async function javascript({ overrides } = {}) {
1346
1344
  "require-await": "off",
1347
1345
  "so1ve/import-dedupe": "error",
1348
1346
  "so1ve/require-async-with-await": "error",
1349
- "sort-imports/exports": "error",
1350
- "sort-imports/imports": ["error"],
1351
1347
  "switch-colon-spacing": "off",
1352
1348
  "symbol-description": "off",
1353
1349
  "unused-imports/no-unused-imports": "error",
@@ -1689,13 +1685,10 @@ async function solid({ overrides, typescript: typescript$1 } = {}) {
1689
1685
  //#endregion
1690
1686
  //#region src/configs/sort-imports.ts
1691
1687
  const sortImports = () => [{
1692
- name: "so1ve/sort-imports/setup",
1693
- plugins: { "sort-imports": pluginSortImports }
1694
- }, {
1695
1688
  name: "so1ve/sort-imports/rules",
1696
1689
  rules: {
1697
- "sort-imports/imports": "error",
1698
- "sort-imports/exports": "error"
1690
+ "so1ve/sort-imports": "error",
1691
+ "so1ve/sort-exports": "error"
1699
1692
  }
1700
1693
  }];
1701
1694
 
@@ -1817,7 +1810,7 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
1817
1810
  "no-use-before-define": "off",
1818
1811
  "no-useless-constructor": "off",
1819
1812
  "object-curly-spacing": "off",
1820
- "so1ve/no-inline-type-import": "error",
1813
+ "so1ve/no-inline-type-modifier": "error",
1821
1814
  "so1ve/prefer-ts-expect-error": "error",
1822
1815
  "space-before-blocks": "off",
1823
1816
  "space-before-function-paren": "off",
@@ -1830,8 +1823,8 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
1830
1823
  "ts/consistent-indexed-object-style": ["error", "record"],
1831
1824
  "ts/consistent-type-definitions": ["error", "interface"],
1832
1825
  "ts/consistent-type-imports": ["error", {
1833
- prefer: "type-imports",
1834
- disallowTypeAnnotations: false
1826
+ disallowTypeAnnotations: false,
1827
+ prefer: "type-imports"
1835
1828
  }],
1836
1829
  "ts/explicit-function-return-type": "off",
1837
1830
  "ts/explicit-member-accessibility": ["error", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-config",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
5
5
  "type": "module",
6
6
  "description": "Ray's eslint config.",
@@ -76,8 +76,7 @@
76
76
  "typescript-eslint": "^8.50.1",
77
77
  "vue-eslint-parser": "^10.2.0",
78
78
  "yaml-eslint-parser": "^1.3.2",
79
- "@so1ve/eslint-plugin": "4.0.1",
80
- "@so1ve/eslint-plugin-sort-imports": "4.0.1"
79
+ "@so1ve/eslint-plugin": "4.1.0"
81
80
  },
82
81
  "devDependencies": {
83
82
  "eslint-plugin-de-morgan": "^2.0.0",