@so1ve/eslint-config 4.0.0 → 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";
@@ -756,6 +755,10 @@ async function formatting(options) {
756
755
  "resolutions"
757
756
  ]
758
757
  },
758
+ {
759
+ pathPattern: "^scripts$",
760
+ order: { type: "asc" }
761
+ },
759
762
  {
760
763
  pathPattern: "^exports$",
761
764
  order: { type: "asc" }
@@ -1068,7 +1071,6 @@ async function javascript({ overrides } = {}) {
1068
1071
  "array-func": pluginArrayFunc,
1069
1072
  "no-await-in-promise": pluginNoAwaitInPromise,
1070
1073
  "so1ve": pluginSo1ve,
1071
- "sort-imports": pluginSortImports,
1072
1074
  "unused-imports": pluginUnusedImports
1073
1075
  }
1074
1076
  },
@@ -1342,8 +1344,6 @@ async function javascript({ overrides } = {}) {
1342
1344
  "require-await": "off",
1343
1345
  "so1ve/import-dedupe": "error",
1344
1346
  "so1ve/require-async-with-await": "error",
1345
- "sort-imports/exports": "error",
1346
- "sort-imports/imports": ["error"],
1347
1347
  "switch-colon-spacing": "off",
1348
1348
  "symbol-description": "off",
1349
1349
  "unused-imports/no-unused-imports": "error",
@@ -1685,13 +1685,10 @@ async function solid({ overrides, typescript: typescript$1 } = {}) {
1685
1685
  //#endregion
1686
1686
  //#region src/configs/sort-imports.ts
1687
1687
  const sortImports = () => [{
1688
- name: "so1ve/sort-imports/setup",
1689
- plugins: { "sort-imports": pluginSortImports }
1690
- }, {
1691
1688
  name: "so1ve/sort-imports/rules",
1692
1689
  rules: {
1693
- "sort-imports/imports": "error",
1694
- "sort-imports/exports": "error"
1690
+ "so1ve/sort-imports": "error",
1691
+ "so1ve/sort-exports": "error"
1695
1692
  }
1696
1693
  }];
1697
1694
 
@@ -1813,7 +1810,7 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
1813
1810
  "no-use-before-define": "off",
1814
1811
  "no-useless-constructor": "off",
1815
1812
  "object-curly-spacing": "off",
1816
- "so1ve/no-inline-type-import": "error",
1813
+ "so1ve/no-inline-type-modifier": "error",
1817
1814
  "so1ve/prefer-ts-expect-error": "error",
1818
1815
  "space-before-blocks": "off",
1819
1816
  "space-before-function-paren": "off",
@@ -1826,8 +1823,8 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
1826
1823
  "ts/consistent-indexed-object-style": ["error", "record"],
1827
1824
  "ts/consistent-type-definitions": ["error", "interface"],
1828
1825
  "ts/consistent-type-imports": ["error", {
1829
- prefer: "type-imports",
1830
- disallowTypeAnnotations: false
1826
+ disallowTypeAnnotations: false,
1827
+ prefer: "type-imports"
1831
1828
  }],
1832
1829
  "ts/explicit-function-return-type": "off",
1833
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.0",
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.0",
80
- "@so1ve/eslint-plugin-sort-imports": "4.0.0"
79
+ "@so1ve/eslint-plugin": "4.1.0"
81
80
  },
82
81
  "devDependencies": {
83
82
  "eslint-plugin-de-morgan": "^2.0.0",