@enormora/eslint-config-base-with-prettier 0.0.1 → 0.0.2

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
@@ -39,5 +39,5 @@
39
39
  "./rule-sets/restricted-syntax.js"
40
40
  ],
41
41
  "type": "module",
42
- "version": "0.0.1"
42
+ "version": "0.0.2"
43
43
  }
@@ -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',
package/readme.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # `@enormora/eslint-config-base-with-prettier`
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@enormora/eslint-config-base-with-prettier?label=)](https://www.npmjs.com/package/@enormora/eslint-config-base-with-prettier)
4
+
3
5
  Drop-in alternative to [`@enormora/eslint-config-base`](../base/base.md) that formats with
4
6
  [prettier](https://prettier.io/) instead of dprint.
5
7
 
@@ -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-with-prettier",
19
- "version": "0.0.1",
20
- "bom-ref": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.1",
21
- "purl": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.1"
19
+ "version": "0.0.2",
20
+ "bom-ref": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.2",
21
+ "purl": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.2"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -197,7 +197,7 @@
197
197
  "ref": "pkg:npm/@cspell/eslint-plugin@10.0.0"
198
198
  },
199
199
  {
200
- "ref": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.1",
200
+ "ref": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.2",
201
201
  "dependsOn": [
202
202
  "pkg:npm/@cspell/eslint-plugin@10.0.0",
203
203
  "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1",