@bemoje/eslint 2.1.5 → 2.1.7

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/README.md CHANGED
@@ -8,10 +8,14 @@ Custom ESLint plugin and rule utilities for consistent code style in TypeScript
8
8
 
9
9
  <!-- EXPORTS_START -->
10
10
 
11
+ - **bemojePlugin**: The one plugin object that every ready-made config entry of this package registers, under the name `bemoje`. ESLint accepts the same plugin name in several config entries only when it is the same object each time, so the entries share this one. A rule's full name is `bemoje/<rule>`, for an `eslint-disable` comment.
11
12
  - **createRule**: Helper to create an ESLint rule with a consistent format.
13
+ - **enforceNoBlankLineBetweenCommentAndDeclaration**: A ready-made ESLint flat config entry that turns the rule `no-blank-line-between-comment-and-declaration` on as an error: a block comment over several lines has no blank line between it and the code right after it. Put it in the list a config file exports, with no plugin to register and no rule name to type.
14
+ - **enforceSplitImports**: A ready-made ESLint flat config entry that turns the rule `split-imports` on as an error: one import declaration per imported name. Put it in the list a config file exports, with no plugin to register and no rule name to type.
12
15
  - **eslintPluginBemoje**: ESLint plugin for Bemoje projects.
13
- - **noBlankLineBetweenCommentAndDeclaration**: Enforce no blank lines between block comments and the next declaration.
14
- - **splitImports**: Enforce no blank lines between block comments and the next declaration.
16
+ - **noBlankLineBetweenCommentAndDeclaration**: Enforce no blank lines between block comments and the next declaration. A file's header, the comment that nothing comes before, is left alone.
17
+ - **ruleForEslint**, never in what runs.
18
+ - **splitImports**: Require one import declaration per imported name: `import { a, b } from 'mod'` becomes two declarations.
15
19
 
16
20
  <!-- EXPORTS_END -->
17
21
 
package/lib/index.cjs CHANGED
@@ -77,7 +77,7 @@ var noBlankLineBetweenCommentAndDeclaration = createRule({
77
77
  }
78
78
  });
79
79
 
80
- // src/lib/forEslint.ts
80
+ // src/lib/ruleForEslint.ts
81
81
  var ruleForEslint = /* @__PURE__ */ __name((rule) => rule, "ruleForEslint");
82
82
  var splitImports = createRule({
83
83
  name: "split-imports",
package/lib/index.js CHANGED
@@ -75,7 +75,7 @@ var noBlankLineBetweenCommentAndDeclaration = createRule({
75
75
  }
76
76
  });
77
77
 
78
- // src/lib/forEslint.ts
78
+ // src/lib/ruleForEslint.ts
79
79
  var ruleForEslint = /* @__PURE__ */ __name((rule) => rule, "ruleForEslint");
80
80
  var splitImports = createRule({
81
81
  name: "split-imports",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bemoje/eslint",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "Custom ESLint plugin and rule utilities for consistent code style in TypeScript projects.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -10,6 +10,10 @@
10
10
  "dependencies": {
11
11
  "@typescript-eslint/utils": "^8.56.1"
12
12
  },
13
+ "peerDependencies": {
14
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
15
+ "typescript": ">=4.8.4 <6.0.0"
16
+ },
13
17
  "keywords": [
14
18
  "eslint",
15
19
  "eslint-plugin",