@enormora/eslint-config-base 0.0.32 → 0.0.34

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/package.json CHANGED
@@ -7,6 +7,10 @@
7
7
  "@ben_12/eslint-plugin-dprint": "1.19.0",
8
8
  "@ben_12/eslint-simple-parser": "0.1.0",
9
9
  "@cspell/eslint-plugin": "10.0.0",
10
+ "@dprint/json": "0.21.3",
11
+ "@dprint/markdown": "0.22.0",
12
+ "@dprint/toml": "0.7.0",
13
+ "@dprint/typescript": "0.96.0",
10
14
  "@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
11
15
  "@stylistic/eslint-plugin": "5.10.0",
12
16
  "eslint-plugin-array-func": "5.1.1",
@@ -52,5 +56,5 @@
52
56
  "./rule-sets/restricted-syntax.js"
53
57
  ],
54
58
  "type": "module",
55
- "version": "0.0.32"
59
+ "version": "0.0.34"
56
60
  }
@@ -8,6 +8,7 @@ import {
8
8
  createRestrictedSyntaxPlugin,
9
9
  noClassDeclarationRestriction,
10
10
  noEmptyFunctionBodyRestriction,
11
+ noInOperatorRestriction,
11
12
  noSwitchStatementRestriction
12
13
  } from '../../rule-sets/restricted-syntax.js';
13
14
  import { stylisticRuleSet } from '../../rule-sets/stylistic.js';
@@ -15,7 +16,8 @@ import { stylisticRuleSet } from '../../rule-sets/stylistic.js';
15
16
  const restrictedSyntaxPlugin = createRestrictedSyntaxPlugin([
16
17
  'no-class-declaration',
17
18
  'no-switch-statement',
18
- 'no-empty-function-body'
19
+ 'no-empty-function-body',
20
+ 'no-in-operator'
19
21
  ]);
20
22
 
21
23
  export const baseSharedConfig = {
@@ -128,6 +130,7 @@ export const baseSharedConfig = {
128
130
  'restricted-syntax/no-class-declaration': [ 'error', noClassDeclarationRestriction ],
129
131
  'restricted-syntax/no-switch-statement': [ 'error', noSwitchStatementRestriction ],
130
132
  'restricted-syntax/no-empty-function-body': [ 'error', noEmptyFunctionBodyRestriction ],
133
+ 'restricted-syntax/no-in-operator': [ 'error', noInOperatorRestriction ],
131
134
  'no-return-assign': [ 'error', 'always' ],
132
135
  'no-self-assign': [ 'error', { props: true } ],
133
136
  'no-self-compare': 'error',
@@ -1,3 +1,9 @@
1
+ /* eslint-disable import/no-unassigned-import -- side-effect imports surface the dprint formatter packages to Packtory's static dependency scanner so they end up as runtime dependencies of the published package */
2
+ import '@dprint/json';
3
+ import '@dprint/markdown';
4
+ import '@dprint/toml';
5
+ import '@dprint/typescript';
6
+ /* eslint-enable import/no-unassigned-import -- end of Packtory-visibility imports */
1
7
  import dprintPlugin from '@ben_12/eslint-plugin-dprint';
2
8
  import simpleParser from '@ben_12/eslint-simple-parser';
3
9
  import { baseSharedConfig } from './base-shared.js';
package/readme.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # `@enormora/eslint-config-base`
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@enormora/eslint-config-base?label=)](https://www.npmjs.com/package/@enormora/eslint-config-base)
4
+
3
5
  Base ESLint config preset, agnostic to any environment, framework, or library. Targets ESM-only projects.
4
6
 
5
7
  Code formatting is handled by [dprint](https://dprint.dev/), wired into ESLint via the
@@ -42,3 +42,8 @@ export const noEmptyFunctionBodyRestriction = {
42
42
  selector: emptyFunctionBodySelector,
43
43
  message: 'Empty function bodies are not allowed, even with a comment.'
44
44
  };
45
+
46
+ export const noInOperatorRestriction = {
47
+ selector: 'BinaryExpression[operator="in"]',
48
+ message: 'The `in` operator is not allowed. Use `Object.hasOwn` instead.'
49
+ };
package/sbom.cdx.json CHANGED
@@ -16,9 +16,9 @@
16
16
  "component": {
17
17
  "type": "library",
18
18
  "name": "@enormora/eslint-config-base",
19
- "version": "0.0.32",
20
- "bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.32",
21
- "purl": "pkg:npm/@enormora/eslint-config-base@0.0.32"
19
+ "version": "0.0.34",
20
+ "bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.34",
21
+ "purl": "pkg:npm/@enormora/eslint-config-base@0.0.34"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -61,6 +61,58 @@
61
61
  ],
62
62
  "purl": "pkg:npm/@cspell/eslint-plugin@10.0.0"
63
63
  },
64
+ {
65
+ "type": "library",
66
+ "name": "@dprint/json",
67
+ "version": "0.21.3",
68
+ "bom-ref": "pkg:npm/@dprint/json@0.21.3",
69
+ "scope": "required",
70
+ "licenses": [
71
+ {
72
+ "expression": "MIT"
73
+ }
74
+ ],
75
+ "purl": "pkg:npm/@dprint/json@0.21.3"
76
+ },
77
+ {
78
+ "type": "library",
79
+ "name": "@dprint/markdown",
80
+ "version": "0.22.0",
81
+ "bom-ref": "pkg:npm/@dprint/markdown@0.22.0",
82
+ "scope": "required",
83
+ "licenses": [
84
+ {
85
+ "expression": "MIT"
86
+ }
87
+ ],
88
+ "purl": "pkg:npm/@dprint/markdown@0.22.0"
89
+ },
90
+ {
91
+ "type": "library",
92
+ "name": "@dprint/toml",
93
+ "version": "0.7.0",
94
+ "bom-ref": "pkg:npm/@dprint/toml@0.7.0",
95
+ "scope": "required",
96
+ "licenses": [
97
+ {
98
+ "expression": "MIT"
99
+ }
100
+ ],
101
+ "purl": "pkg:npm/@dprint/toml@0.7.0"
102
+ },
103
+ {
104
+ "type": "library",
105
+ "name": "@dprint/typescript",
106
+ "version": "0.96.0",
107
+ "bom-ref": "pkg:npm/@dprint/typescript@0.96.0",
108
+ "scope": "required",
109
+ "licenses": [
110
+ {
111
+ "expression": "MIT"
112
+ }
113
+ ],
114
+ "purl": "pkg:npm/@dprint/typescript@0.96.0"
115
+ },
64
116
  {
65
117
  "type": "library",
66
118
  "name": "@eslint-community/eslint-plugin-eslint-comments",
@@ -216,11 +268,27 @@
216
268
  "ref": "pkg:npm/@cspell/eslint-plugin@10.0.0"
217
269
  },
218
270
  {
219
- "ref": "pkg:npm/@enormora/eslint-config-base@0.0.32",
271
+ "ref": "pkg:npm/@dprint/json@0.21.3"
272
+ },
273
+ {
274
+ "ref": "pkg:npm/@dprint/markdown@0.22.0"
275
+ },
276
+ {
277
+ "ref": "pkg:npm/@dprint/toml@0.7.0"
278
+ },
279
+ {
280
+ "ref": "pkg:npm/@dprint/typescript@0.96.0"
281
+ },
282
+ {
283
+ "ref": "pkg:npm/@enormora/eslint-config-base@0.0.34",
220
284
  "dependsOn": [
221
285
  "pkg:npm/@ben_12/eslint-plugin-dprint@1.19.0",
222
286
  "pkg:npm/@ben_12/eslint-simple-parser@0.1.0",
223
287
  "pkg:npm/@cspell/eslint-plugin@10.0.0",
288
+ "pkg:npm/@dprint/json@0.21.3",
289
+ "pkg:npm/@dprint/markdown@0.22.0",
290
+ "pkg:npm/@dprint/toml@0.7.0",
291
+ "pkg:npm/@dprint/typescript@0.96.0",
224
292
  "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1",
225
293
  "pkg:npm/@stylistic/eslint-plugin@5.10.0",
226
294
  "pkg:npm/eslint-plugin-array-func@5.1.1",