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

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
@@ -4,15 +4,15 @@
4
4
  "Christian Rackerseder <github@echooff.de>"
5
5
  ],
6
6
  "dependencies": {
7
- "@cspell/eslint-plugin": "10.0.0",
8
- "@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
7
+ "@cspell/eslint-plugin": "10.0.1",
8
+ "@eslint-community/eslint-plugin-eslint-comments": "4.7.2",
9
9
  "@stylistic/eslint-plugin": "5.10.0",
10
10
  "eslint-plugin-array-func": "5.1.1",
11
11
  "eslint-plugin-destructuring": "2.2.1",
12
12
  "eslint-plugin-import-x": "4.16.2",
13
13
  "eslint-plugin-no-barrel-files": "1.3.1",
14
14
  "eslint-plugin-no-secrets": "2.3.3",
15
- "eslint-plugin-prettier": "5.5.5",
15
+ "eslint-plugin-prettier": "5.5.6",
16
16
  "eslint-plugin-promise": "7.3.0",
17
17
  "eslint-plugin-sonarjs": "4.0.3",
18
18
  "eslint-plugin-unicorn": "64.0.0"
@@ -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.3"
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,9 +16,35 @@ 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
 
23
+ export const cspellSpellcheckerOptions = {
24
+ autoFix: false,
25
+ numSuggestions: 3,
26
+ generateSuggestions: true,
27
+ ignoreImports: true,
28
+ ignoreImportProperties: true,
29
+ checkIdentifiers: true,
30
+ checkStrings: true,
31
+ checkStringTemplates: true,
32
+ checkJSXText: true,
33
+ checkComments: true,
34
+ cspell: {
35
+ words: [],
36
+ ignoreWords: [],
37
+ flagWords: [],
38
+ ignoreRegExpList: [],
39
+ includeRegExpList: [],
40
+ allowCompoundWords: true,
41
+ import: [],
42
+ dictionaries: []
43
+ },
44
+ customWordListFile: undefined,
45
+ debugMode: false
46
+ };
47
+
21
48
  export const baseSharedConfig = {
22
49
  languageOptions: {
23
50
  ecmaVersion,
@@ -128,6 +155,7 @@ export const baseSharedConfig = {
128
155
  'restricted-syntax/no-class-declaration': [ 'error', noClassDeclarationRestriction ],
129
156
  'restricted-syntax/no-switch-statement': [ 'error', noSwitchStatementRestriction ],
130
157
  'restricted-syntax/no-empty-function-body': [ 'error', noEmptyFunctionBodyRestriction ],
158
+ 'restricted-syntax/no-in-operator': [ 'error', noInOperatorRestriction ],
131
159
  'no-return-assign': [ 'error', 'always' ],
132
160
  'no-self-assign': [ 'error', { props: true } ],
133
161
  'no-self-compare': 'error',
@@ -182,7 +210,23 @@ export const baseSharedConfig = {
182
210
  'no-warning-comments': [
183
211
  'error',
184
212
  {
185
- terms: [ 'todo', 'fixme', 'wtf', 'falls through', 'istanbul', 'c8' ],
213
+ terms: [
214
+ 'todo',
215
+ 'fixme',
216
+ 'wtf',
217
+ 'falls through',
218
+ 'istanbul',
219
+ 'c8',
220
+ 'v8 ignore',
221
+ 'node:coverage',
222
+ 'prettier-ignore',
223
+ 'dprint-ignore',
224
+ 'cspell:disable',
225
+ 'cspell:ignore',
226
+ 'cspell:words',
227
+ 'Stryker disable',
228
+ 'Stryker restore'
229
+ ],
186
230
  location: 'anywhere'
187
231
  }
188
232
  ],
@@ -422,32 +466,6 @@ export const baseSharedConfig = {
422
466
  'import/no-rename-default': 'off',
423
467
  'import/prefer-namespace-import': 'off',
424
468
 
425
- '@cspell/spellchecker': [
426
- 'warn',
427
- {
428
- autoFix: false,
429
- numSuggestions: 3,
430
- generateSuggestions: true,
431
- ignoreImports: true,
432
- ignoreImportProperties: true,
433
- checkIdentifiers: true,
434
- checkStrings: true,
435
- checkStringTemplates: true,
436
- checkJSXText: true,
437
- checkComments: true,
438
- cspell: {
439
- words: [],
440
- ignoreWords: [],
441
- flagWords: [],
442
- ignoreRegExpList: [],
443
- includeRegExpList: [],
444
- allowCompoundWords: true,
445
- import: [],
446
- dictionaries: []
447
- },
448
- customWordListFile: undefined,
449
- debugMode: false
450
- }
451
- ]
469
+ '@cspell/spellchecker': [ 'error', cspellSpellcheckerOptions ]
452
470
  }
453
471
  };
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
 
@@ -19,11 +21,11 @@ Provide a `prettier.config.js` at your project root with the formatting options
19
21
 
20
22
  ```javascript
21
23
  export default {
22
- printWidth: 120,
23
- tabWidth: 4,
24
- singleQuote: true,
25
- trailingComma: "none",
26
- arrowParens: "always",
24
+ printWidth: 120,
25
+ tabWidth: 4,
26
+ singleQuote: true,
27
+ trailingComma: 'none',
28
+ arrowParens: 'always'
27
29
  };
28
30
  ```
29
31
 
@@ -31,12 +33,12 @@ Create an ESLint configuration file (e.g., `eslint.config.js`) in your project a
31
33
  array:
32
34
 
33
35
  ```javascript
34
- import { baseWithPrettierConfig } from "@enormora/eslint-config-base-with-prettier";
36
+ import { baseWithPrettierConfig } from '@enormora/eslint-config-base-with-prettier';
35
37
 
36
38
  export default [
37
- {
38
- ignores: ["dist/**/*"],
39
- },
40
- baseWithPrettierConfig,
39
+ {
40
+ ignores: [ 'dist/**/*' ]
41
+ },
42
+ baseWithPrettierConfig
41
43
  ];
42
44
  ```
@@ -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
@@ -9,44 +9,44 @@
9
9
  {
10
10
  "type": "application",
11
11
  "name": "packtory",
12
- "version": "0.0.15"
12
+ "version": "0.0.32"
13
13
  }
14
14
  ]
15
15
  },
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.3",
20
+ "bom-ref": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.3",
21
+ "purl": "pkg:npm/@enormora/eslint-config-base-with-prettier@0.0.3"
22
22
  }
23
23
  },
24
24
  "components": [
25
25
  {
26
26
  "type": "library",
27
27
  "name": "@cspell/eslint-plugin",
28
- "version": "10.0.0",
29
- "bom-ref": "pkg:npm/@cspell/eslint-plugin@10.0.0",
28
+ "version": "10.0.1",
29
+ "bom-ref": "pkg:npm/@cspell/eslint-plugin@10.0.1",
30
30
  "scope": "required",
31
31
  "licenses": [
32
32
  {
33
33
  "expression": "MIT"
34
34
  }
35
35
  ],
36
- "purl": "pkg:npm/@cspell/eslint-plugin@10.0.0"
36
+ "purl": "pkg:npm/@cspell/eslint-plugin@10.0.1"
37
37
  },
38
38
  {
39
39
  "type": "library",
40
40
  "name": "@eslint-community/eslint-plugin-eslint-comments",
41
- "version": "4.7.1",
42
- "bom-ref": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1",
41
+ "version": "4.7.2",
42
+ "bom-ref": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.2",
43
43
  "scope": "required",
44
44
  "licenses": [
45
45
  {
46
46
  "expression": "MIT"
47
47
  }
48
48
  ],
49
- "purl": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1"
49
+ "purl": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.2"
50
50
  },
51
51
  {
52
52
  "type": "library",
@@ -129,15 +129,15 @@
129
129
  {
130
130
  "type": "library",
131
131
  "name": "eslint-plugin-prettier",
132
- "version": "5.5.5",
133
- "bom-ref": "pkg:npm/eslint-plugin-prettier@5.5.5",
132
+ "version": "5.5.6",
133
+ "bom-ref": "pkg:npm/eslint-plugin-prettier@5.5.6",
134
134
  "scope": "required",
135
135
  "licenses": [
136
136
  {
137
137
  "expression": "MIT"
138
138
  }
139
139
  ],
140
- "purl": "pkg:npm/eslint-plugin-prettier@5.5.5"
140
+ "purl": "pkg:npm/eslint-plugin-prettier@5.5.6"
141
141
  },
142
142
  {
143
143
  "type": "library",
@@ -194,20 +194,20 @@
194
194
  ],
195
195
  "dependencies": [
196
196
  {
197
- "ref": "pkg:npm/@cspell/eslint-plugin@10.0.0"
197
+ "ref": "pkg:npm/@cspell/eslint-plugin@10.0.1"
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.3",
201
201
  "dependsOn": [
202
- "pkg:npm/@cspell/eslint-plugin@10.0.0",
203
- "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1",
202
+ "pkg:npm/@cspell/eslint-plugin@10.0.1",
203
+ "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.2",
204
204
  "pkg:npm/@stylistic/eslint-plugin@5.10.0",
205
205
  "pkg:npm/eslint-plugin-array-func@5.1.1",
206
206
  "pkg:npm/eslint-plugin-destructuring@2.2.1",
207
207
  "pkg:npm/eslint-plugin-import-x@4.16.2",
208
208
  "pkg:npm/eslint-plugin-no-barrel-files@1.3.1",
209
209
  "pkg:npm/eslint-plugin-no-secrets@2.3.3",
210
- "pkg:npm/eslint-plugin-prettier@5.5.5",
210
+ "pkg:npm/eslint-plugin-prettier@5.5.6",
211
211
  "pkg:npm/eslint-plugin-promise@7.3.0",
212
212
  "pkg:npm/eslint-plugin-sonarjs@4.0.3",
213
213
  "pkg:npm/eslint-plugin-unicorn@64.0.0",
@@ -215,7 +215,7 @@
215
215
  ]
216
216
  },
217
217
  {
218
- "ref": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1"
218
+ "ref": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.2"
219
219
  },
220
220
  {
221
221
  "ref": "pkg:npm/@stylistic/eslint-plugin@5.10.0"
@@ -236,7 +236,7 @@
236
236
  "ref": "pkg:npm/eslint-plugin-no-secrets@2.3.3"
237
237
  },
238
238
  {
239
- "ref": "pkg:npm/eslint-plugin-prettier@5.5.5"
239
+ "ref": "pkg:npm/eslint-plugin-prettier@5.5.6"
240
240
  },
241
241
  {
242
242
  "ref": "pkg:npm/eslint-plugin-promise@7.3.0"