@exadev/eslint-config 1.0.1 → 1.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/README.md +3 -1
- package/dist/index.cjs +4 -2
- package/dist/index.js +4 -2
- package/package.json +1 -1
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const plugin = {
|
|
4
4
|
meta: {
|
|
5
5
|
name: "@exadev/eslint-config",
|
|
6
|
-
version: "1.0
|
|
6
|
+
version: "1.1.0",
|
|
7
7
|
namespace: "exadev"
|
|
8
8
|
},
|
|
9
9
|
rules: {
|
|
@@ -19,11 +19,13 @@ if (configs === void 0) throw new Error("Unreachable: configs was just initializ
|
|
|
19
19
|
Object.assign(configs, {
|
|
20
20
|
recommended: {
|
|
21
21
|
plugins: { exadev: plugin },
|
|
22
|
+
linterOptions: { noInlineConfig: true },
|
|
22
23
|
rules: {
|
|
23
24
|
"exadev/no-non-barrel-index": "error",
|
|
24
25
|
"exadev/no-non-barrel-reexport": "error",
|
|
25
26
|
"exadev/no-pointless-reassignment": "error",
|
|
26
|
-
"exadev/no-side-effects-in-index": "error"
|
|
27
|
+
"exadev/no-side-effects-in-index": "error",
|
|
28
|
+
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "never" }]
|
|
27
29
|
}
|
|
28
30
|
},
|
|
29
31
|
barrel: {
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import noSideEffectsInIndex from "./rules/no-side-effects-in-index.js";
|
|
|
7
7
|
const plugin = {
|
|
8
8
|
meta: {
|
|
9
9
|
name: "@exadev/eslint-config",
|
|
10
|
-
version: "1.0
|
|
10
|
+
version: "1.1.0",
|
|
11
11
|
namespace: "exadev"
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
@@ -23,11 +23,13 @@ if (configs === void 0) throw new Error("Unreachable: configs was just initializ
|
|
|
23
23
|
Object.assign(configs, {
|
|
24
24
|
recommended: {
|
|
25
25
|
plugins: { exadev: plugin },
|
|
26
|
+
linterOptions: { noInlineConfig: true },
|
|
26
27
|
rules: {
|
|
27
28
|
"exadev/no-non-barrel-index": "error",
|
|
28
29
|
"exadev/no-non-barrel-reexport": "error",
|
|
29
30
|
"exadev/no-pointless-reassignment": "error",
|
|
30
|
-
"exadev/no-side-effects-in-index": "error"
|
|
31
|
+
"exadev/no-side-effects-in-index": "error",
|
|
32
|
+
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "never" }]
|
|
31
33
|
}
|
|
32
34
|
},
|
|
33
35
|
barrel: {
|