@exadev/eslint-config 1.0.1 → 1.1.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.
package/README.md CHANGED
@@ -42,12 +42,14 @@ export default defineConfig([
42
42
  {
43
43
  files: ['**/*.ts'],
44
44
  plugins: { exadev },
45
- extends: ['exadev/recommended'], // every rule this plugin defines
45
+ extends: ['exadev/recommended'], // every rule this plugin defines, plus no-inline-config and no-type-assertions
46
46
  // or: extends: ['exadev/barrel'], // just the barrel-discipline trio (no-non-barrel-index, no-non-barrel-reexport, no-side-effects-in-index)
47
47
  },
48
48
  ]);
49
49
  ```
50
50
 
51
+ `recommended` also turns on two general code-quality settings every current consumer already wires independently: `linterOptions.noInlineConfig` (no `eslint-disable` comments anywhere -- an exception belongs in the config, scoped to where it applies, not hidden inline in the source it's disabling a rule for) and `@typescript-eslint/consistent-type-assertions` set to `never` (no `as`/angle-bracket type assertions -- narrow with a guard or parse with Zod instead). The type-assertions rule is `@typescript-eslint`'s own, not one this plugin defines, so `recommended` assumes the consumer already has `typescript-eslint` registered under the `@typescript-eslint` namespace -- true for every consumer this plugin currently has. A consumer with no typescript-eslint at all should use `barrel`, or wire the four `exadev/*` rules directly, instead of taking `recommended` wholesale.
52
+
51
53
  ## Rules
52
54
 
53
55
  | Rule | Fixable | Description |
package/dist/index.cjs CHANGED
@@ -1,39 +1,2 @@
1
- //#endregion
2
- //#region src/index.ts
3
- const plugin = {
4
- meta: {
5
- name: "@exadev/eslint-config",
6
- version: "1.0.1",
7
- namespace: "exadev"
8
- },
9
- rules: {
10
- "no-non-barrel-index": require("./rules/no-non-barrel-index.cjs"),
11
- "no-non-barrel-reexport": require("./rules/no-non-barrel-reexport.cjs"),
12
- "no-pointless-reassignment": require("./rules/no-pointless-reassignment.cjs"),
13
- "no-side-effects-in-index": require("./rules/no-side-effects-in-index.cjs")
14
- },
15
- configs: {}
16
- };
17
- const { configs } = plugin;
18
- if (configs === void 0) throw new Error("Unreachable: configs was just initialized to {} in the object literal above.");
19
- Object.assign(configs, {
20
- recommended: {
21
- plugins: { exadev: plugin },
22
- rules: {
23
- "exadev/no-non-barrel-index": "error",
24
- "exadev/no-non-barrel-reexport": "error",
25
- "exadev/no-pointless-reassignment": "error",
26
- "exadev/no-side-effects-in-index": "error"
27
- }
28
- },
29
- barrel: {
30
- plugins: { exadev: plugin },
31
- rules: {
32
- "exadev/no-non-barrel-index": "error",
33
- "exadev/no-non-barrel-reexport": "error",
34
- "exadev/no-side-effects-in-index": "error"
35
- }
36
- }
37
- });
38
- //#endregion
39
- module.exports = plugin;
1
+ const require_plugin = require("./plugin-jELHVCCw.cjs");
2
+ module.exports = require_plugin.plugin;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,2 @@
1
- import { ESLint } from "eslint";
2
- //#region src/index.d.ts
3
- declare const plugin: ESLint.Plugin;
1
+ import plugin from "./plugin.cjs";
4
2
  export = plugin;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- import { ESLint } from "eslint";
2
- //#region src/index.d.ts
3
- declare const plugin: ESLint.Plugin;
4
- //#endregion
1
+ import plugin from "./plugin.js";
5
2
  export { plugin as default };
package/dist/index.js CHANGED
@@ -1,43 +1,2 @@
1
- import noNonBarrelIndex from "./rules/no-non-barrel-index.js";
2
- import noNonBarrelReexport from "./rules/no-non-barrel-reexport.js";
3
- import noPointlessReassignment from "./rules/no-pointless-reassignment.js";
4
- import noSideEffectsInIndex from "./rules/no-side-effects-in-index.js";
5
- //#endregion
6
- //#region src/index.ts
7
- const plugin = {
8
- meta: {
9
- name: "@exadev/eslint-config",
10
- version: "1.0.1",
11
- namespace: "exadev"
12
- },
13
- rules: {
14
- "no-non-barrel-index": noNonBarrelIndex,
15
- "no-non-barrel-reexport": noNonBarrelReexport,
16
- "no-pointless-reassignment": noPointlessReassignment,
17
- "no-side-effects-in-index": noSideEffectsInIndex
18
- },
19
- configs: {}
20
- };
21
- const { configs } = plugin;
22
- if (configs === void 0) throw new Error("Unreachable: configs was just initialized to {} in the object literal above.");
23
- Object.assign(configs, {
24
- recommended: {
25
- plugins: { exadev: plugin },
26
- rules: {
27
- "exadev/no-non-barrel-index": "error",
28
- "exadev/no-non-barrel-reexport": "error",
29
- "exadev/no-pointless-reassignment": "error",
30
- "exadev/no-side-effects-in-index": "error"
31
- }
32
- },
33
- barrel: {
34
- plugins: { exadev: plugin },
35
- rules: {
36
- "exadev/no-non-barrel-index": "error",
37
- "exadev/no-non-barrel-reexport": "error",
38
- "exadev/no-side-effects-in-index": "error"
39
- }
40
- }
41
- });
42
- //#endregion
1
+ import { t as plugin } from "./plugin-BBix8yMe.js";
43
2
  export { plugin as default };
@@ -0,0 +1,45 @@
1
+ import noNonBarrelIndex from "./rules/no-non-barrel-index.js";
2
+ import noNonBarrelReexport from "./rules/no-non-barrel-reexport.js";
3
+ import noPointlessReassignment from "./rules/no-pointless-reassignment.js";
4
+ import noSideEffectsInIndex from "./rules/no-side-effects-in-index.js";
5
+ //#endregion
6
+ //#region src/plugin.ts
7
+ const plugin = {
8
+ meta: {
9
+ name: "@exadev/eslint-config",
10
+ version: "1.1.1",
11
+ namespace: "exadev"
12
+ },
13
+ rules: {
14
+ "no-non-barrel-index": noNonBarrelIndex,
15
+ "no-non-barrel-reexport": noNonBarrelReexport,
16
+ "no-pointless-reassignment": noPointlessReassignment,
17
+ "no-side-effects-in-index": noSideEffectsInIndex
18
+ },
19
+ configs: {}
20
+ };
21
+ const { configs } = plugin;
22
+ if (configs === void 0) throw new Error("Unreachable: configs was just initialized to {} in the object literal above.");
23
+ Object.assign(configs, {
24
+ recommended: {
25
+ plugins: { exadev: plugin },
26
+ linterOptions: { noInlineConfig: true },
27
+ rules: {
28
+ "exadev/no-non-barrel-index": "error",
29
+ "exadev/no-non-barrel-reexport": "error",
30
+ "exadev/no-pointless-reassignment": "error",
31
+ "exadev/no-side-effects-in-index": "error",
32
+ "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "never" }]
33
+ }
34
+ },
35
+ barrel: {
36
+ plugins: { exadev: plugin },
37
+ rules: {
38
+ "exadev/no-non-barrel-index": "error",
39
+ "exadev/no-non-barrel-reexport": "error",
40
+ "exadev/no-side-effects-in-index": "error"
41
+ }
42
+ }
43
+ });
44
+ //#endregion
45
+ export { plugin as t };
@@ -0,0 +1,46 @@
1
+ //#endregion
2
+ //#region src/plugin.ts
3
+ const plugin = {
4
+ meta: {
5
+ name: "@exadev/eslint-config",
6
+ version: "1.1.1",
7
+ namespace: "exadev"
8
+ },
9
+ rules: {
10
+ "no-non-barrel-index": require("./rules/no-non-barrel-index.cjs"),
11
+ "no-non-barrel-reexport": require("./rules/no-non-barrel-reexport.cjs"),
12
+ "no-pointless-reassignment": require("./rules/no-pointless-reassignment.cjs"),
13
+ "no-side-effects-in-index": require("./rules/no-side-effects-in-index.cjs")
14
+ },
15
+ configs: {}
16
+ };
17
+ const { configs } = plugin;
18
+ if (configs === void 0) throw new Error("Unreachable: configs was just initialized to {} in the object literal above.");
19
+ Object.assign(configs, {
20
+ recommended: {
21
+ plugins: { exadev: plugin },
22
+ linterOptions: { noInlineConfig: true },
23
+ rules: {
24
+ "exadev/no-non-barrel-index": "error",
25
+ "exadev/no-non-barrel-reexport": "error",
26
+ "exadev/no-pointless-reassignment": "error",
27
+ "exadev/no-side-effects-in-index": "error",
28
+ "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "never" }]
29
+ }
30
+ },
31
+ barrel: {
32
+ plugins: { exadev: plugin },
33
+ rules: {
34
+ "exadev/no-non-barrel-index": "error",
35
+ "exadev/no-non-barrel-reexport": "error",
36
+ "exadev/no-side-effects-in-index": "error"
37
+ }
38
+ }
39
+ });
40
+ //#endregion
41
+ Object.defineProperty(exports, "plugin", {
42
+ enumerable: true,
43
+ get: function() {
44
+ return plugin;
45
+ }
46
+ });
@@ -0,0 +1,2 @@
1
+ const require_plugin = require("./plugin-jELHVCCw.cjs");
2
+ module.exports = require_plugin.plugin;
@@ -0,0 +1,4 @@
1
+ import { ESLint } from "eslint";
2
+ //#region src/plugin.d.ts
3
+ declare const plugin: ESLint.Plugin;
4
+ export = plugin;
@@ -0,0 +1,5 @@
1
+ import { ESLint } from "eslint";
2
+ //#region src/plugin.d.ts
3
+ declare const plugin: ESLint.Plugin;
4
+ //#endregion
5
+ export { plugin as default };
package/dist/plugin.js ADDED
@@ -0,0 +1,2 @@
1
+ import { t as plugin } from "./plugin-BBix8yMe.js";
2
+ export { plugin as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exadev/eslint-config",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "Shared custom ESLint rules and plugin for ExaDev projects",
5
5
  "type": "module",
6
6
  "sideEffects": false,