@sxzz/eslint-config 7.4.2 → 7.4.3

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
@@ -1098,37 +1098,42 @@ interface Rules {
1098
1098
  "implicit-arrow-linebreak"?: Linter.RuleEntry<ImplicitArrowLinebreak>;
1099
1099
  /**
1100
1100
  * Enforce or ban the use of inline type-only markers for named imports.
1101
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/consistent-type-specifier-style.test.ts
1101
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/consistent-type-specifier-style.test.ts
1102
1102
  */
1103
1103
  "import/consistent-type-specifier-style"?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>;
1104
1104
  /**
1105
1105
  * Ensure all imports appear before other statements.
1106
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/first.test.ts
1106
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/first.test.ts
1107
1107
  */
1108
1108
  "import/first"?: Linter.RuleEntry<ImportFirst>;
1109
1109
  /**
1110
- * Fix duplication in imports
1111
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/import-dedupe.test.ts
1112
- */
1113
- "import/import-dedupe"?: Linter.RuleEntry<[]>;
1114
- /**
1115
1110
  * Enforce a newline after import statements.
1116
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/newline-after-import.test.ts
1111
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/newline-after-import.test.ts
1117
1112
  */
1118
1113
  "import/newline-after-import"?: Linter.RuleEntry<ImportNewlineAfterImport>;
1119
1114
  /**
1120
1115
  * Forbid default exports.
1121
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/no-default-export.test.ts
1116
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/no-default-export.test.ts
1122
1117
  */
1123
1118
  "import/no-default-export"?: Linter.RuleEntry<[]>;
1124
1119
  /**
1120
+ * Forbid repeated import of the same module in multiple places.
1121
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/no-duplicates.test.ts
1122
+ */
1123
+ "import/no-duplicates"?: Linter.RuleEntry<ImportNoDuplicates>;
1124
+ /**
1125
+ * Fix duplication in imports
1126
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/import-dedupe.test.ts
1127
+ */
1128
+ "import/no-duplicates-specifier"?: Linter.RuleEntry<[]>;
1129
+ /**
1125
1130
  * Forbid the use of mutable exports with `var` or `let`.
1126
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/no-mutable-exports.test.ts
1131
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/no-mutable-exports.test.ts
1127
1132
  */
1128
1133
  "import/no-mutable-exports"?: Linter.RuleEntry<[]>;
1129
1134
  /**
1130
1135
  * Forbid named default exports.
1131
- * @see https://github.com/sxzz/eslint-plugin-ii/blob/main/src/rules/no-named-default.test.ts
1136
+ * @see https://github.com/sxzz/eslint-plugin-importer/blob/main/src/rules/no-named-default.test.ts
1132
1137
  */
1133
1138
  "import/no-named-default"?: Linter.RuleEntry<[]>;
1134
1139
  /**
@@ -7120,6 +7125,10 @@ type ImportNewlineAfterImport = [] | [{
7120
7125
  exactCount?: boolean;
7121
7126
  considerComments?: boolean;
7122
7127
  }];
7128
+ type ImportNoDuplicates = [] | [{
7129
+ considerQueryString?: boolean;
7130
+ preferInline?: boolean;
7131
+ }];
7123
7132
  type Indent = [] | [("tab" | number)] | [("tab" | number), {
7124
7133
  SwitchCase?: number;
7125
7134
  VariableDeclarator?: ((number | ("first" | "off")) | {
package/dist/index.mjs CHANGED
@@ -152,9 +152,10 @@ const imports = () => [{
152
152
  import: pluginImport
153
153
  },
154
154
  rules: {
155
- "antfu/import-dedupe": "error",
156
155
  "import/first": "error",
157
156
  "import/no-default-export": "error",
157
+ "import/no-duplicates": ["error", { preferInline: true }],
158
+ "import/no-duplicates-specifier": "error",
158
159
  "import/no-mutable-exports": "error",
159
160
  "import/no-named-default": "error"
160
161
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
3
  "type": "module",
4
- "version": "7.4.2",
4
+ "version": "7.4.3",
5
5
  "description": "ESLint config for @sxzz.",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "eslint-plugin-baseline-js": "^0.4.2",
51
51
  "eslint-plugin-command": "^3.3.1",
52
52
  "eslint-plugin-de-morgan": "^2.0.0",
53
- "eslint-plugin-importer": "^0.1.0",
53
+ "eslint-plugin-importer": "^0.2.0",
54
54
  "eslint-plugin-jsdoc": "^61.4.1",
55
55
  "eslint-plugin-jsonc": "^2.21.0",
56
56
  "eslint-plugin-n": "^17.23.1",