@enormora/eslint-config-base 0.0.30 → 0.0.32

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/constants.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export const ecmaVersion = 2025;
2
2
  export const indentSize = 4;
3
- export const javascriptExtensions = ['.js', '.cjs', '.mjs'];
4
- export const typescriptExtensions = ['.ts', '.cts', '.mts'];
3
+ export const javascriptExtensions = [ '.js', '.cjs', '.mjs' ];
4
+ export const typescriptExtensions = [ '.ts', '.cts', '.mts' ];
package/package.json CHANGED
@@ -4,27 +4,53 @@
4
4
  "Christian Rackerseder <github@echooff.de>"
5
5
  ],
6
6
  "dependencies": {
7
+ "@ben_12/eslint-plugin-dprint": "1.19.0",
8
+ "@ben_12/eslint-simple-parser": "0.1.0",
7
9
  "@cspell/eslint-plugin": "10.0.0",
8
10
  "@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
9
11
  "@stylistic/eslint-plugin": "5.10.0",
10
12
  "eslint-plugin-array-func": "5.1.1",
11
13
  "eslint-plugin-destructuring": "2.2.1",
12
14
  "eslint-plugin-import-x": "4.16.2",
13
- "eslint-plugin-no-barrel-files": "1.3.0",
15
+ "eslint-plugin-no-barrel-files": "1.3.1",
14
16
  "eslint-plugin-no-secrets": "2.3.3",
15
- "eslint-plugin-prettier": "5.5.5",
16
- "eslint-plugin-promise": "7.2.1",
17
- "eslint-plugin-sonarjs": "4.0.2",
17
+ "eslint-plugin-promise": "7.3.0",
18
+ "eslint-plugin-sonarjs": "4.0.3",
18
19
  "eslint-plugin-unicorn": "64.0.0"
19
20
  },
20
21
  "description": "Enormora’s ESLint base configuration",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./presets/base/base.js"
25
+ },
26
+ "./constants.js": {
27
+ "import": "./constants.js"
28
+ },
29
+ "./presets/base/base-shared.js": {
30
+ "import": "./presets/base/base-shared.js"
31
+ },
32
+ "./rule-sets/restricted-syntax.js": {
33
+ "import": "./rule-sets/restricted-syntax.js"
34
+ },
35
+ "./rule-sets/stylistic.js": {
36
+ "import": "./rule-sets/stylistic.js"
37
+ }
38
+ },
21
39
  "license": "MIT",
22
- "main": "base.js",
23
40
  "name": "@enormora/eslint-config-base",
41
+ "peerDependencies": {
42
+ "eslint": "^10.0.0"
43
+ },
24
44
  "repository": {
25
45
  "type": "git",
26
46
  "url": "git://github.com/enormora/eslint-config.git"
27
47
  },
48
+ "sideEffects": [
49
+ "./presets/base/base-shared.js",
50
+ "./presets/base/base.js",
51
+ "./rule-sets/best-practices.js",
52
+ "./rule-sets/restricted-syntax.js"
53
+ ],
28
54
  "type": "module",
29
- "version": "0.0.30"
55
+ "version": "0.0.32"
30
56
  }
@@ -1,12 +1,24 @@
1
- import importPlugin, { createNodeResolver } from 'eslint-plugin-import-x';
1
+ import codeSpellChecker from '@cspell/eslint-plugin';
2
2
  import eslintCommentsPlugin from '@eslint-community/eslint-plugin-eslint-comments';
3
+ import importPlugin, { createNodeResolver } from 'eslint-plugin-import-x';
3
4
  import noSecretsPlugin from 'eslint-plugin-no-secrets';
4
- import codeSpellChecker from '@cspell/eslint-plugin';
5
- import { stylisticRuleSet } from './rule-sets/stylistic.js';
6
- import { bestPracticesRuleSet } from './rule-sets/best-practices.js';
7
- import { ecmaVersion, javascriptExtensions } from './constants.js';
5
+ import { ecmaVersion, javascriptExtensions } from '../../constants.js';
6
+ import { bestPracticesRuleSet } from '../../rule-sets/best-practices.js';
7
+ import {
8
+ createRestrictedSyntaxPlugin,
9
+ noClassDeclarationRestriction,
10
+ noEmptyFunctionBodyRestriction,
11
+ noSwitchStatementRestriction
12
+ } from '../../rule-sets/restricted-syntax.js';
13
+ import { stylisticRuleSet } from '../../rule-sets/stylistic.js';
8
14
 
9
- export const baseConfig = {
15
+ const restrictedSyntaxPlugin = createRestrictedSyntaxPlugin([
16
+ 'no-class-declaration',
17
+ 'no-switch-statement',
18
+ 'no-empty-function-body'
19
+ ]);
20
+
21
+ export const baseSharedConfig = {
10
22
  languageOptions: {
11
23
  ecmaVersion,
12
24
  sourceType: 'module',
@@ -29,7 +41,8 @@ export const baseConfig = {
29
41
  import: importPlugin,
30
42
  'eslint-comments': eslintCommentsPlugin,
31
43
  'no-secrets': noSecretsPlugin,
32
- '@cspell': codeSpellChecker
44
+ '@cspell': codeSpellChecker,
45
+ 'restricted-syntax': restrictedSyntaxPlugin
33
46
  },
34
47
  settings: {
35
48
  ...stylisticRuleSet.settings,
@@ -37,7 +50,7 @@ export const baseConfig = {
37
50
  'import/parsers': {
38
51
  espree: javascriptExtensions
39
52
  },
40
- 'import-x/resolver-next': [createNodeResolver()]
53
+ 'import-x/resolver-next': [ createNodeResolver() ]
41
54
  },
42
55
  rules: {
43
56
  ...stylisticRuleSet.rules,
@@ -64,10 +77,10 @@ export const baseConfig = {
64
77
  'no-dupe-args': 'error',
65
78
  'no-duplicate-case': 'error',
66
79
  'no-duplicate-imports': 'error',
67
- 'no-else-return': ['error', { allowElseIf: false }],
68
- 'no-empty': ['error', { allowEmptyCatch: true }],
80
+ 'no-else-return': [ 'error', { allowElseIf: false } ],
81
+ 'no-empty': [ 'error', { allowEmptyCatch: true } ],
69
82
  'no-empty-character-class': 'error',
70
- 'no-empty-function': 'error',
83
+ 'no-empty-function': 'off',
71
84
  'no-empty-pattern': 'error',
72
85
  'no-empty-static-block': 'error',
73
86
  'no-eq-null': 'error',
@@ -83,7 +96,7 @@ export const baseConfig = {
83
96
  'no-implicit-globals': 'error',
84
97
  'no-implied-eval': 'error',
85
98
  'no-inline-comments': 'off',
86
- 'no-inner-declarations': ['error', 'functions'],
99
+ 'no-inner-declarations': [ 'error', 'functions' ],
87
100
  'no-invalid-regexp': 'error',
88
101
  'no-invalid-this': 'off',
89
102
  'no-irregular-whitespace': 'error',
@@ -105,39 +118,28 @@ export const baseConfig = {
105
118
  'no-object-constructor': 'error',
106
119
  'no-octal': 'error',
107
120
  'no-octal-escape': 'error',
108
- 'no-param-reassign': ['error', { props: true }],
121
+ 'no-param-reassign': [ 'error', { props: true } ],
109
122
  'no-plusplus': 'error',
110
123
  'no-proto': 'error',
111
124
  'no-prototype-builtins': 'error',
112
- 'no-redeclare': ['error', { builtinGlobals: true }],
125
+ 'no-redeclare': [ 'error', { builtinGlobals: true } ],
113
126
  'no-regex-spaces': 'error',
114
- 'no-restricted-syntax': [
115
- 'error',
116
- {
117
- selector: 'TSEnumDeclaration',
118
- message: 'Use a string union type instead'
119
- },
120
- {
121
- selector: 'ClassDeclaration[superClass.name!=/Error$/]',
122
- message: 'Class declarations are not allowed except for extending errors.'
123
- },
124
- {
125
- selector: 'SwitchStatement',
126
- message: 'Use pattern matching instead.'
127
- }
128
- ],
129
- 'no-return-assign': ['error', 'always'],
130
- 'no-self-assign': ['error', { props: true }],
127
+ 'no-restricted-syntax': 'off',
128
+ 'restricted-syntax/no-class-declaration': [ 'error', noClassDeclarationRestriction ],
129
+ 'restricted-syntax/no-switch-statement': [ 'error', noSwitchStatementRestriction ],
130
+ 'restricted-syntax/no-empty-function-body': [ 'error', noEmptyFunctionBodyRestriction ],
131
+ 'no-return-assign': [ 'error', 'always' ],
132
+ 'no-self-assign': [ 'error', { props: true } ],
131
133
  'no-self-compare': 'error',
132
134
  'no-sequences': 'error',
133
- 'no-shadow': ['error', { builtinGlobals: true }],
135
+ 'no-shadow': [ 'error', { builtinGlobals: true } ],
134
136
  'no-shadow-restricted-names': 'error',
135
137
  'no-sparse-arrays': 'error',
136
138
  'no-ternary': 'off',
137
139
  'no-this-before-super': 'error',
138
140
  'no-throw-literal': 'error',
139
141
  'no-unassigned-vars': 'error',
140
- 'no-undef': ['error', { typeof: true }],
142
+ 'no-undef': [ 'error', { typeof: true } ],
141
143
  'no-undef-init': 'error',
142
144
  'no-undefined': 'off',
143
145
  'no-unexpected-multiline': 'error',
@@ -180,7 +182,7 @@ export const baseConfig = {
180
182
  'no-warning-comments': [
181
183
  'error',
182
184
  {
183
- terms: ['todo', 'fixme', 'wtf', 'falls through', 'istanbul', 'c8'],
185
+ terms: [ 'todo', 'fixme', 'wtf', 'falls through', 'istanbul', 'c8' ],
184
186
  location: 'anywhere'
185
187
  }
186
188
  ],
@@ -193,10 +195,10 @@ export const baseConfig = {
193
195
  detectObjects: false,
194
196
  enforceConst: false,
195
197
  ignoreClassFieldInitialValues: false,
196
- ignore: [-1, 0, 1]
198
+ ignore: [ -1, 0, 1 ]
197
199
  }
198
200
  ],
199
- 'arrow-body-style': ['error', 'always'],
201
+ 'arrow-body-style': [ 'error', 'always' ],
200
202
  'accessor-pairs': [
201
203
  'error',
202
204
  {
@@ -204,24 +206,24 @@ export const baseConfig = {
204
206
  }
205
207
  ],
206
208
  'block-scoped-var': 'off',
207
- complexity: ['error', { max: 6 }],
209
+ complexity: [ 'error', { max: 6 } ],
208
210
  'consistent-return': 'error',
209
- 'consistent-this': ['error', 'self'],
211
+ 'consistent-this': [ 'error', 'self' ],
210
212
  'constructor-super': 'error',
211
- curly: ['error', 'all'],
213
+ curly: [ 'error', 'all' ],
212
214
  'default-case': 'error',
213
215
  'dot-notation': 'error',
214
216
  eqeqeq: 'error',
215
217
  'func-names': 'off',
216
218
  'func-style': 'off',
217
219
  'guard-for-in': 'error',
218
- 'id-length': ['error', { min: 2, properties: 'never' }],
219
- 'init-declarations': ['error', 'always'],
220
- 'max-depth': ['error', { max: 5 }],
221
- 'max-lines': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
222
- 'max-nested-callbacks': ['error', { max: 4 }],
223
- 'max-params': ['error', { max: 4 }],
224
- 'max-statements': ['error', { max: 10 }],
220
+ 'id-length': [ 'error', { min: 2, properties: 'never' } ],
221
+ 'init-declarations': [ 'error', 'always' ],
222
+ 'max-depth': [ 'error', { max: 5 } ],
223
+ 'max-lines': [ 'error', { max: 500, skipBlankLines: true, skipComments: true } ],
224
+ 'max-nested-callbacks': [ 'error', { max: 4 } ],
225
+ 'max-params': [ 'error', { max: 4 } ],
226
+ 'max-statements': [ 'error', { max: 10 } ],
225
227
  'new-cap': [
226
228
  'error',
227
229
  {
@@ -229,9 +231,9 @@ export const baseConfig = {
229
231
  capIsNew: true
230
232
  }
231
233
  ],
232
- 'object-shorthand': ['error', 'always'],
233
- 'one-var': ['error', 'never'],
234
- 'operator-assignment': ['error', 'always'],
234
+ 'object-shorthand': [ 'error', 'always' ],
235
+ 'one-var': [ 'error', 'never' ],
236
+ 'operator-assignment': [ 'error', 'always' ],
235
237
  'prefer-arrow-callback': [
236
238
  'error',
237
239
  {
@@ -244,12 +246,12 @@ export const baseConfig = {
244
246
  'require-yield': 'error',
245
247
  'sort-vars': 'off',
246
248
  'sort-imports': 'off',
247
- strict: ['error', 'safe'],
248
- 'unicode-bom': ['error', 'never'],
249
+ strict: [ 'error', 'safe' ],
250
+ 'unicode-bom': [ 'error', 'never' ],
249
251
  'use-isnan': 'error',
250
252
  'valid-typeof': 'error',
251
253
  'vars-on-top': 'error',
252
- yoda: ['error', 'never'],
254
+ yoda: [ 'error', 'never' ],
253
255
  'capitalized-comments': 'off',
254
256
  'class-methods-use-this': 'error',
255
257
  'func-name-matching': 'off',
@@ -329,11 +331,11 @@ export const baseConfig = {
329
331
  'no-unsafe-optional-chaining': 'error',
330
332
  'no-unused-private-class-members': 'error',
331
333
  'no-constant-binary-expression': 'error',
332
- 'logical-assignment-operators': ['error', 'never'],
334
+ 'logical-assignment-operators': [ 'error', 'never' ],
333
335
  'prefer-object-has-own': 'error',
334
336
  'no-useless-assignment': 'error',
335
337
 
336
- 'no-secrets/no-secrets': ['error', { tolerance: 5 }],
338
+ 'no-secrets/no-secrets': [ 'error', { tolerance: 5 } ],
337
339
  'no-secrets/no-pattern-match': 'off',
338
340
 
339
341
  'eslint-comments/disable-enable-pair': [
@@ -360,9 +362,9 @@ export const baseConfig = {
360
362
  'import/prefer-default-export': 'off',
361
363
  'import/newline-after-import': 'error',
362
364
  'import/no-nodejs-modules': 'off',
363
- 'import/max-dependencies': ['error', { max: 10 }],
365
+ 'import/max-dependencies': [ 'error', { max: 10 } ],
364
366
  'import/first': 'error',
365
- 'import/no-unused-modules': 'error',
367
+ 'import/no-unused-modules': [ 'error', { unusedExports: true, suppressMissingFileEnumeratorAPIWarning: true } ],
366
368
  'import/no-anonymous-default-export': 'off',
367
369
  'import/no-named-default': 'off',
368
370
  'import/no-cycle': 'error',
@@ -0,0 +1,80 @@
1
+ import dprintPlugin from '@ben_12/eslint-plugin-dprint';
2
+ import simpleParser from '@ben_12/eslint-simple-parser';
3
+ import { baseSharedConfig } from './base-shared.js';
4
+ import {
5
+ jsonDprintConfig,
6
+ markdownDprintConfig,
7
+ tomlDprintConfig,
8
+ typescriptDprintConfig,
9
+ yamlDprintConfig
10
+ } from './dprint-config.js';
11
+
12
+ const baseJsConfig = {
13
+ files: [ '**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}' ],
14
+ ...baseSharedConfig,
15
+ plugins: {
16
+ ...baseSharedConfig.plugins,
17
+ dprint: dprintPlugin
18
+ },
19
+ rules: {
20
+ ...baseSharedConfig.rules,
21
+
22
+ 'dprint/typescript': [ 'error', { config: typescriptDprintConfig } ],
23
+ 'dprint/json': 'off',
24
+ 'dprint/markdown': 'off',
25
+ 'dprint/toml': 'off',
26
+ 'dprint/dockerfile': 'off',
27
+ 'dprint/malva': 'off',
28
+ 'dprint/markup': 'off',
29
+ 'dprint/yaml': 'off',
30
+ 'dprint/graphql': 'off',
31
+
32
+ '@stylistic/member-delimiter-style': 'off'
33
+ }
34
+ };
35
+
36
+ const dprintJsonConfig = {
37
+ files: [ '**/*.json' ],
38
+ languageOptions: { parser: simpleParser },
39
+ plugins: { dprint: dprintPlugin },
40
+ rules: { 'dprint/json': [ 'error', { config: jsonDprintConfig } ] }
41
+ };
42
+
43
+ const dprintMarkdownConfig = {
44
+ files: [ '**/*.md' ],
45
+ languageOptions: { parser: simpleParser },
46
+ plugins: { dprint: dprintPlugin },
47
+ rules: { 'dprint/markdown': [ 'error', { config: markdownDprintConfig } ] }
48
+ };
49
+
50
+ const dprintYamlConfig = {
51
+ files: [ '**/*.{yml,yaml}' ],
52
+ languageOptions: { parser: simpleParser },
53
+ plugins: { dprint: dprintPlugin },
54
+ rules: { 'dprint/yaml': [ 'error', { config: yamlDprintConfig } ] }
55
+ };
56
+
57
+ const dprintTomlConfig = {
58
+ files: [ '**/*.toml' ],
59
+ languageOptions: { parser: simpleParser },
60
+ plugins: { dprint: dprintPlugin },
61
+ rules: { 'dprint/toml': [ 'error', { config: tomlDprintConfig } ] }
62
+ };
63
+
64
+ export const baseConfig = [
65
+ baseJsConfig,
66
+ dprintJsonConfig,
67
+ dprintMarkdownConfig,
68
+ dprintYamlConfig,
69
+ dprintTomlConfig
70
+ ];
71
+
72
+ /* eslint-disable no-barrel-files/no-barrel-files -- expose dprint configs as public API so consumers can spread them when overriding individual options */
73
+ export {
74
+ jsonDprintConfig,
75
+ markdownDprintConfig,
76
+ tomlDprintConfig,
77
+ typescriptDprintConfig,
78
+ yamlDprintConfig
79
+ } from './dprint-config.js';
80
+ /* eslint-enable no-barrel-files/no-barrel-files -- end of public re-exports */
@@ -0,0 +1,90 @@
1
+ const lineWidth = 120;
2
+ const indentWidth = 4;
3
+
4
+ export const typescriptDprintConfig = {
5
+ lineWidth,
6
+ indentWidth,
7
+ newLineKind: 'lf',
8
+ useTabs: false,
9
+ semiColons: 'always',
10
+ quoteStyle: 'preferSingle',
11
+ quoteProps: 'asNeeded',
12
+ useBraces: 'always',
13
+ bracePosition: 'sameLine',
14
+ singleBodyPosition: 'nextLine',
15
+ nextControlFlowPosition: 'sameLine',
16
+ trailingCommas: 'never',
17
+ operatorPosition: 'maintain',
18
+ preferHanging: false,
19
+ preferSingleLine: false,
20
+ 'arrowFunction.useParentheses': 'force',
21
+ 'binaryExpression.linePerExpression': false,
22
+ 'jsx.bracketPosition': 'nextLine',
23
+ 'jsx.forceNewLinesSurroundingContent': false,
24
+ 'jsx.multiLineParens': 'prefer',
25
+ 'memberExpression.linePerExpression': true,
26
+ 'typeLiteral.separatorKind': 'semiColon',
27
+ 'arrayExpression.spaceAround': true,
28
+ 'arrayPattern.spaceAround': true,
29
+ 'enumDeclaration.memberSpacing': 'newLine',
30
+ spaceAround: false,
31
+ spaceSurroundingProperties: true,
32
+ 'binaryExpression.spaceSurroundingBitwiseAndArithmeticOperator': true,
33
+ 'commentLine.forceSpaceAfterSlashes': true,
34
+ 'constructor.spaceBeforeParentheses': false,
35
+ 'constructorType.spaceAfterNewKeyword': true,
36
+ 'constructSignature.spaceAfterNewKeyword': true,
37
+ 'doWhileStatement.spaceAfterWhileKeyword': true,
38
+ 'exportDeclaration.spaceSurroundingNamedExports': true,
39
+ 'forInStatement.spaceAfterForKeyword': true,
40
+ 'forOfStatement.spaceAfterForKeyword': true,
41
+ 'forStatement.spaceAfterForKeyword': true,
42
+ 'forStatement.spaceAfterSemiColons': true,
43
+ 'functionDeclaration.spaceBeforeParentheses': false,
44
+ 'functionExpression.spaceBeforeParentheses': false,
45
+ 'functionExpression.spaceAfterFunctionKeyword': true,
46
+ 'getAccessor.spaceBeforeParentheses': false,
47
+ 'ifStatement.spaceAfterIfKeyword': true,
48
+ 'importDeclaration.spaceSurroundingNamedImports': true,
49
+ 'jsxSelfClosingElement.spaceBeforeSlash': true,
50
+ 'jsxExpressionContainer.spaceSurroundingExpression': false,
51
+ 'method.spaceBeforeParentheses': false,
52
+ 'setAccessor.spaceBeforeParentheses': false,
53
+ 'taggedTemplate.spaceBeforeLiteral': false,
54
+ 'typeAnnotation.spaceBeforeColon': false,
55
+ 'typeAssertion.spaceBeforeExpression': false,
56
+ 'whileStatement.spaceAfterWhileKeyword': true,
57
+ 'module.sortImportDeclarations': 'maintain',
58
+ 'module.sortExportDeclarations': 'maintain',
59
+ 'exportDeclaration.sortNamedExports': 'maintain',
60
+ 'importDeclaration.sortNamedImports': 'maintain',
61
+ 'exportDeclaration.forceSingleLine': false,
62
+ 'importDeclaration.forceSingleLine': false,
63
+ 'exportDeclaration.forceMultiLine': 'never',
64
+ 'importDeclaration.forceMultiLine': 'never'
65
+ };
66
+
67
+ export const jsonDprintConfig = {
68
+ lineWidth,
69
+ indentWidth,
70
+ newLineKind: 'lf',
71
+ useTabs: false
72
+ };
73
+
74
+ export const markdownDprintConfig = {
75
+ lineWidth,
76
+ newLineKind: 'lf'
77
+ };
78
+
79
+ export const yamlDprintConfig = {
80
+ printWidth: lineWidth,
81
+ indentWidth,
82
+ lineBreak: 'lf'
83
+ };
84
+
85
+ export const tomlDprintConfig = {
86
+ lineWidth,
87
+ indentWidth,
88
+ newLineKind: 'lf',
89
+ useTabs: false
90
+ };
package/readme.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  Base ESLint config preset, agnostic to any environment, framework, or library. Targets ESM-only projects.
4
4
 
5
+ Code formatting is handled by [dprint](https://dprint.dev/), wired into ESLint via the
6
+ [`@ben_12/eslint-plugin-dprint`](https://www.npmjs.com/package/@ben_12/eslint-plugin-dprint) plugin. TypeScript/JavaScript
7
+ files are formatted via the `dprint/typescript` rule, and JSON, Markdown, YAML, and TOML files are formatted via
8
+ their respective `dprint/*` rules — so a single `eslint --fix` covers everything and there is no need for a separate
9
+ formatter step. The dprint configuration ships inline with this preset, so no `dprint.json` is required at the consumer
10
+ project root. If you'd rather use prettier, use [`@enormora/eslint-config-base-with-prettier`](../base-with-prettier/base-with-prettier.md)
11
+ instead — it is an alternative base preset and is not meant to be combined with this one.
12
+
5
13
  ## Install & Setup
6
14
 
7
15
  Install the `@enormora/eslint-config-base` package via npm:
@@ -10,15 +18,79 @@ Install the `@enormora/eslint-config-base` package via npm:
10
18
  npm install --save-dev @enormora/eslint-config-base
11
19
  ```
12
20
 
13
- Create an ESLint configuration file (e.g., `eslint.config.js`) in your project and add the base config to the configuration array:
21
+ Create an ESLint configuration file (e.g., `eslint.config.js`) in your project and spread the base config into the
22
+ configuration array:
23
+
24
+ ```javascript
25
+ import { baseConfig } from "@enormora/eslint-config-base";
26
+
27
+ export default [
28
+ {
29
+ ignores: ["dist/**/*"],
30
+ },
31
+ ...baseConfig,
32
+ ];
33
+ ```
34
+
35
+ `baseConfig` is an array of flat config blocks. The first block targets `**/*.{js,mjs,cjs}` and carries the lint rules.
36
+ The remaining blocks each enable one dprint formatter scoped to a default file glob:
37
+
38
+ | Block | Files | Rule |
39
+ | :------------ | :----------------------------------------- | :------------------ |
40
+ | JavaScript/TS | `**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}` | `dprint/typescript` |
41
+ | JSON | `**/*.json` | `dprint/json` |
42
+ | Markdown | `**/*.md` | `dprint/markdown` |
43
+ | YAML | `**/*.{yml,yaml}` | `dprint/yaml` |
44
+ | TOML | `**/*.toml` | `dprint/toml` |
45
+
46
+ ### Customizing or disabling a formatter
47
+
48
+ Because the formatter blocks are plain flat config, you override them the same way as any other ESLint config — by
49
+ adding a later block whose `files` glob overlaps the one you want to change. Later blocks win.
50
+
51
+ Disable a formatter entirely:
52
+
53
+ ```javascript
54
+ export default [
55
+ ...baseConfig,
56
+ { files: ["**/*.json"], rules: { "dprint/json": "off" } },
57
+ ];
58
+ ```
59
+
60
+ Scope a formatter to a different path (turn the default off, then re-enable on your paths):
61
+
62
+ ```javascript
63
+ export default [
64
+ ...baseConfig,
65
+ { files: ["**/*.json"], rules: { "dprint/json": "off" } },
66
+ { files: ["src/**/*.json"], rules: { "dprint/json": "error" } },
67
+ ];
68
+ ```
69
+
70
+ Ignore specific paths from formatting:
71
+
72
+ ```javascript
73
+ export default [
74
+ ...baseConfig,
75
+ { ignores: ["vendor/**/*.json", "fixtures/**/*.md"] },
76
+ ];
77
+ ```
78
+
79
+ ### Tweaking dprint options
80
+
81
+ To override an individual dprint option (e.g. line width, quote style), add a later block that re-configures the rule
82
+ with your own `config`:
14
83
 
15
84
  ```javascript
16
- import { baseConfig } from '@enormora/eslint-config-base';
85
+ import { baseConfig, typescriptDprintConfig } from "@enormora/eslint-config-base";
17
86
 
18
87
  export default [
19
- {
20
- ignores: ['dist/**/*']
88
+ ...baseConfig,
89
+ {
90
+ files: ["**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}"],
91
+ rules: {
92
+ "dprint/typescript": ["error", { config: { ...typescriptDprintConfig, lineWidth: 100 } }],
21
93
  },
22
- baseConfig
94
+ },
23
95
  ];
24
96
  ```
@@ -1,8 +1,8 @@
1
- import unicornPlugin from 'eslint-plugin-unicorn';
2
- import promisePlugin from 'eslint-plugin-promise';
3
1
  import arrayFunctionPlugin from 'eslint-plugin-array-func';
4
- import sonarjsPlugin from 'eslint-plugin-sonarjs';
5
2
  import noBarrelFiles from 'eslint-plugin-no-barrel-files';
3
+ import promisePlugin from 'eslint-plugin-promise';
4
+ import sonarjsPlugin from 'eslint-plugin-sonarjs';
5
+ import unicornPlugin from 'eslint-plugin-unicorn';
6
6
 
7
7
  const maxSwitchCases = 6;
8
8
 
@@ -11,17 +11,18 @@ function isSonarjsRuleDeprecated(sonarjsRule) {
11
11
  }
12
12
 
13
13
  const nonDeprecatedSonarjsRuleNames = new Set(
14
- Object.entries(sonarjsPlugin.rules)
15
- .filter(([, sonarjsRule]) => {
14
+ Object
15
+ .entries(sonarjsPlugin.rules)
16
+ .filter(([ , sonarjsRule ]) => {
16
17
  return !isSonarjsRuleDeprecated(sonarjsRule);
17
18
  })
18
- .map(([sonarjsRuleName]) => {
19
+ .map(([ sonarjsRuleName ]) => {
19
20
  return `sonarjs/${sonarjsRuleName}`;
20
21
  })
21
22
  );
22
23
 
23
24
  const nonDeprecatedSonarjsRecommendedRules = Object.fromEntries(
24
- Object.entries(sonarjsPlugin.configs.recommended.rules).filter(([sonarjsRuleName]) => {
25
+ Object.entries(sonarjsPlugin.configs.recommended.rules).filter(([ sonarjsRuleName ]) => {
25
26
  return nonDeprecatedSonarjsRuleNames.has(sonarjsRuleName);
26
27
  })
27
28
  );
@@ -194,10 +195,11 @@ export const bestPracticesRuleSet = {
194
195
 
195
196
  'sonarjs/cognitive-complexity': 'off',
196
197
  'sonarjs/elseif-without-else': 'off',
197
- 'sonarjs/max-switch-cases': ['error', maxSwitchCases],
198
+ 'sonarjs/max-switch-cases': [ 'error', maxSwitchCases ],
198
199
  'sonarjs/no-all-duplicated-branches': 'error',
199
200
  'sonarjs/no-collapsible-if': 'error',
200
201
  'sonarjs/no-collection-size-mischeck': 'error',
202
+ 'sonarjs/no-clear-text-protocols': 'off',
201
203
  'sonarjs/no-duplicate-string': 'off',
202
204
  'sonarjs/no-duplicated-branches': 'error',
203
205
  'sonarjs/no-element-overwrite': 'error',
@@ -243,7 +245,7 @@ export const bestPracticesRuleSet = {
243
245
  'promise/no-new-statics': 'error',
244
246
  'promise/no-return-in-finally': 'error',
245
247
  'promise/valid-params': 'error',
246
- 'promise/prefer-await-to-then': 'error',
248
+ 'promise/prefer-await-to-then': [ 'error', { strict: true } ],
247
249
  'promise/no-multiple-resolved': 'error',
248
250
  'promise/spec-only': 'error',
249
251
  'promise/prefer-catch': 'error',
@@ -0,0 +1,44 @@
1
+ import { builtinRules } from 'eslint/use-at-your-own-risk';
2
+
3
+ const noRestrictedSyntaxRule = builtinRules.get('no-restricted-syntax');
4
+
5
+ export function createRestrictedSyntaxPlugin(ruleNames) {
6
+ return {
7
+ rules: Object.fromEntries(
8
+ ruleNames.map((ruleName) => {
9
+ return [ ruleName, noRestrictedSyntaxRule ];
10
+ })
11
+ )
12
+ };
13
+ }
14
+
15
+ const defaultAllowedSuperClassNamePattern = '/Error$/';
16
+ const defaultClassDeclarationMessage = 'Class declarations are not allowed except for extending errors.';
17
+
18
+ export function createNoClassDeclarationRestriction({
19
+ allowedSuperClassNamePattern = defaultAllowedSuperClassNamePattern,
20
+ message = defaultClassDeclarationMessage
21
+ } = {}) {
22
+ return {
23
+ selector: `ClassDeclaration[superClass.name!=${allowedSuperClassNamePattern}]`,
24
+ message
25
+ };
26
+ }
27
+
28
+ export const noClassDeclarationRestriction = createNoClassDeclarationRestriction();
29
+
30
+ export const noSwitchStatementRestriction = {
31
+ selector: 'SwitchStatement',
32
+ message: 'Use pattern matching instead.'
33
+ };
34
+
35
+ const emptyFunctionBodySelector = [ 'FunctionDeclaration', 'FunctionExpression', 'ArrowFunctionExpression' ]
36
+ .map((kind) => {
37
+ return `${kind} > BlockStatement[body.length=0]`;
38
+ })
39
+ .join(', ');
40
+
41
+ export const noEmptyFunctionBodyRestriction = {
42
+ selector: emptyFunctionBodySelector,
43
+ message: 'Empty function bodies are not allowed, even with a comment.'
44
+ };
@@ -1,11 +1,9 @@
1
- import prettierPlugin from 'eslint-plugin-prettier';
2
- import destructuringPlugin from 'eslint-plugin-destructuring';
3
1
  import stylisticPlugin from '@stylistic/eslint-plugin';
2
+ import destructuringPlugin from 'eslint-plugin-destructuring';
4
3
  import { indentSize } from '../constants.js';
5
4
 
6
5
  export const stylisticRuleSet = {
7
6
  plugins: {
8
- prettier: prettierPlugin,
9
7
  destructuring: destructuringPlugin,
10
8
  '@stylistic': stylisticPlugin
11
9
  },
@@ -13,16 +11,14 @@ export const stylisticRuleSet = {
13
11
  settings: {},
14
12
 
15
13
  rules: {
16
- 'prettier/prettier': 'error',
17
-
18
14
  'destructuring/in-methods-params': 'error',
19
- 'destructuring/in-params': ['error', { 'max-params': 0 }],
15
+ 'destructuring/in-params': [ 'error', { 'max-params': 0 } ],
20
16
  'destructuring/no-rename': 'off',
21
17
 
22
18
  '@stylistic/array-bracket-newline': 'off',
23
- '@stylistic/array-bracket-spacing': ['error', 'never'],
24
- '@stylistic/array-element-newline': ['error', 'consistent'],
25
- '@stylistic/arrow-parens': ['error', 'always'],
19
+ '@stylistic/array-bracket-spacing': [ 'error', 'always' ],
20
+ '@stylistic/array-element-newline': [ 'error', 'consistent' ],
21
+ '@stylistic/arrow-parens': [ 'error', 'always' ],
26
22
  '@stylistic/arrow-spacing': [
27
23
  'error',
28
24
  {
@@ -31,8 +27,8 @@ export const stylisticRuleSet = {
31
27
  }
32
28
  ],
33
29
  '@stylistic/block-spacing': 'off',
34
- '@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: false }],
35
- '@stylistic/comma-dangle': ['error', 'never'],
30
+ '@stylistic/brace-style': [ 'error', '1tbs', { allowSingleLine: false } ],
31
+ '@stylistic/comma-dangle': [ 'error', 'never' ],
36
32
  '@stylistic/comma-spacing': [
37
33
  'error',
38
34
  {
@@ -40,7 +36,7 @@ export const stylisticRuleSet = {
40
36
  after: true
41
37
  }
42
38
  ],
43
- '@stylistic/comma-style': ['error', 'last'],
39
+ '@stylistic/comma-style': [ 'error', 'last' ],
44
40
  '@stylistic/computed-property-spacing': [
45
41
  'error',
46
42
  'never',
@@ -48,15 +44,15 @@ export const stylisticRuleSet = {
48
44
  enforceForClassMembers: true
49
45
  }
50
46
  ],
51
- '@stylistic/dot-location': ['error', 'property'],
47
+ '@stylistic/dot-location': [ 'error', 'property' ],
52
48
  '@stylistic/eol-last': 'error',
53
49
  '@stylistic/exp-list-style': 'off',
54
50
  '@stylistic/exp-jsx-props-style': 'off',
55
- '@stylistic/function-call-spacing': ['error', 'never'],
56
- '@stylistic/function-call-argument-newline': ['error', 'consistent'],
51
+ '@stylistic/function-call-spacing': [ 'error', 'never' ],
52
+ '@stylistic/function-call-argument-newline': [ 'error', 'consistent' ],
57
53
  '@stylistic/function-paren-newline': 'off',
58
- '@stylistic/generator-star-spacing': ['error', { before: false, after: true }],
59
- '@stylistic/indent-binary-ops': ['error', indentSize],
54
+ '@stylistic/generator-star-spacing': [ 'error', { before: false, after: true } ],
55
+ '@stylistic/indent-binary-ops': [ 'error', indentSize ],
60
56
  '@stylistic/implicit-arrow-linebreak': 'off',
61
57
  '@stylistic/indent': [
62
58
  'error',
@@ -98,7 +94,7 @@ export const stylisticRuleSet = {
98
94
  after: true
99
95
  }
100
96
  ],
101
- '@stylistic/linebreak-style': ['error', 'unix'],
97
+ '@stylistic/linebreak-style': [ 'error', 'unix' ],
102
98
  '@stylistic/lines-between-class-members': [
103
99
  'error',
104
100
  'always',
@@ -120,7 +116,7 @@ export const stylisticRuleSet = {
120
116
  ignoreRegExpLiterals: true
121
117
  }
122
118
  ],
123
- '@stylistic/max-statements-per-line': ['error', { max: 1 }],
119
+ '@stylistic/max-statements-per-line': [ 'error', { max: 1 } ],
124
120
  '@stylistic/member-delimiter-style': [
125
121
  'error',
126
122
  {
@@ -138,23 +134,22 @@ export const stylisticRuleSet = {
138
134
  '@stylistic/new-parens': 'error',
139
135
  '@stylistic/newline-per-chained-call': 'off',
140
136
  '@stylistic/no-confusing-arrow': 'error',
141
- // Currently this rule conflicts with prettier, because in some cases prettier adds unnecessary extra parens. Unfortunately there is no way to turn this off yet. We should re-enable this rule once this has been fixed in prettier or once there is a better formatter that doesn’t add unnecessary parens. See https://github.com/prettier/prettier/issues/3089
142
- '@stylistic/no-extra-parens': 'off',
137
+ '@stylistic/no-extra-parens': 'error',
143
138
  '@stylistic/no-extra-semi': 'error',
144
139
  '@stylistic/no-floating-decimal': 'error',
145
140
  '@stylistic/no-mixed-operators': 'off',
146
141
  '@stylistic/no-mixed-spaces-and-tabs': 'error',
147
142
  '@stylistic/no-multi-spaces': 'error',
148
- '@stylistic/no-multiple-empty-lines': ['error', { max: 1 }],
143
+ '@stylistic/no-multiple-empty-lines': [ 'error', { max: 1 } ],
149
144
  '@stylistic/no-tabs': 'error',
150
145
  '@stylistic/no-trailing-spaces': 'error',
151
146
  '@stylistic/no-whitespace-before-property': 'error',
152
147
  '@stylistic/nonblock-statement-body-position': 'off',
153
148
  '@stylistic/object-curly-newline': 'off',
154
- '@stylistic/object-curly-spacing': ['error', 'always'],
149
+ '@stylistic/object-curly-spacing': [ 'error', 'always' ],
155
150
  '@stylistic/object-property-newline': 'off',
156
151
  '@stylistic/one-var-declaration-per-line': 'error',
157
- '@stylistic/operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before' } }],
152
+ '@stylistic/operator-linebreak': [ 'error', 'after', { overrides: { '?': 'before', ':': 'before' } } ],
158
153
  '@stylistic/padded-blocks': [
159
154
  'error',
160
155
  'never',
@@ -175,10 +170,10 @@ export const stylisticRuleSet = {
175
170
  next: 'directive'
176
171
  }
177
172
  ],
178
- '@stylistic/quote-props': ['error', 'as-needed'],
179
- '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
180
- '@stylistic/rest-spread-spacing': ['error', 'never'],
181
- '@stylistic/semi': ['error', 'always'],
173
+ '@stylistic/quote-props': [ 'error', 'as-needed' ],
174
+ '@stylistic/quotes': [ 'error', 'single', { avoidEscape: true } ],
175
+ '@stylistic/rest-spread-spacing': [ 'error', 'never' ],
176
+ '@stylistic/semi': [ 'error', 'always' ],
182
177
  '@stylistic/semi-spacing': [
183
178
  'error',
184
179
  {
@@ -186,8 +181,8 @@ export const stylisticRuleSet = {
186
181
  after: true
187
182
  }
188
183
  ],
189
- '@stylistic/semi-style': ['error', 'last'],
190
- '@stylistic/space-before-blocks': ['error', 'always'],
184
+ '@stylistic/semi-style': [ 'error', 'last' ],
185
+ '@stylistic/space-before-blocks': [ 'error', 'always' ],
191
186
  '@stylistic/space-before-function-paren': [
192
187
  'error',
193
188
  {
@@ -196,7 +191,7 @@ export const stylisticRuleSet = {
196
191
  asyncArrow: 'always'
197
192
  }
198
193
  ],
199
- '@stylistic/space-in-parens': ['error', 'never'],
194
+ '@stylistic/space-in-parens': [ 'error', 'never' ],
200
195
  '@stylistic/space-infix-ops': 'error',
201
196
  '@stylistic/space-unary-ops': 'error',
202
197
  '@stylistic/spaced-comment': [
@@ -204,12 +199,12 @@ export const stylisticRuleSet = {
204
199
  'always',
205
200
  {
206
201
  line: {
207
- exceptions: ['-', '+', '*'],
208
- markers: ['!', '/', '=>']
202
+ exceptions: [ '-', '+', '*' ],
203
+ markers: [ '!', '/', '=>' ]
209
204
  },
210
205
  block: {
211
- exceptions: ['-', '+', '*'],
212
- markers: ['!', '*'],
206
+ exceptions: [ '-', '+', '*' ],
207
+ markers: [ '!', '*' ],
213
208
  balanced: true
214
209
  }
215
210
  }
@@ -223,13 +218,13 @@ export const stylisticRuleSet = {
223
218
  ],
224
219
  '@stylistic/curly-newline': 'off',
225
220
  '@stylistic/template-curly-spacing': 'error',
226
- '@stylistic/template-tag-spacing': ['error', 'never'],
221
+ '@stylistic/template-tag-spacing': [ 'error', 'never' ],
227
222
  '@stylistic/type-annotation-spacing': 'error',
228
223
  '@stylistic/type-generic-spacing': 'error',
229
224
  '@stylistic/type-named-tuple-spacing': 'error',
230
- '@stylistic/wrap-iife': ['error', 'inside'],
225
+ '@stylistic/wrap-iife': [ 'error', 'inside' ],
231
226
  '@stylistic/wrap-regex': 'off',
232
- '@stylistic/yield-star-spacing': ['error', { before: false, after: true }],
227
+ '@stylistic/yield-star-spacing': [ 'error', { before: false, after: true } ],
233
228
  '@stylistic/jsx-pascal-case': 'off',
234
229
  '@stylistic/line-comment-position': 'off',
235
230
  '@stylistic/multiline-comment-style': 'off'
package/sbom.cdx.json ADDED
@@ -0,0 +1,271 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "metadata": {
7
+ "tools": {
8
+ "components": [
9
+ {
10
+ "type": "application",
11
+ "name": "packtory",
12
+ "version": "0.0.15"
13
+ }
14
+ ]
15
+ },
16
+ "component": {
17
+ "type": "library",
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"
22
+ }
23
+ },
24
+ "components": [
25
+ {
26
+ "type": "library",
27
+ "name": "@ben_12/eslint-plugin-dprint",
28
+ "version": "1.19.0",
29
+ "bom-ref": "pkg:npm/@ben_12/eslint-plugin-dprint@1.19.0",
30
+ "scope": "required",
31
+ "licenses": [
32
+ {
33
+ "expression": "MIT"
34
+ }
35
+ ],
36
+ "purl": "pkg:npm/@ben_12/eslint-plugin-dprint@1.19.0"
37
+ },
38
+ {
39
+ "type": "library",
40
+ "name": "@ben_12/eslint-simple-parser",
41
+ "version": "0.1.0",
42
+ "bom-ref": "pkg:npm/@ben_12/eslint-simple-parser@0.1.0",
43
+ "scope": "required",
44
+ "licenses": [
45
+ {
46
+ "expression": "MIT"
47
+ }
48
+ ],
49
+ "purl": "pkg:npm/@ben_12/eslint-simple-parser@0.1.0"
50
+ },
51
+ {
52
+ "type": "library",
53
+ "name": "@cspell/eslint-plugin",
54
+ "version": "10.0.0",
55
+ "bom-ref": "pkg:npm/@cspell/eslint-plugin@10.0.0",
56
+ "scope": "required",
57
+ "licenses": [
58
+ {
59
+ "expression": "MIT"
60
+ }
61
+ ],
62
+ "purl": "pkg:npm/@cspell/eslint-plugin@10.0.0"
63
+ },
64
+ {
65
+ "type": "library",
66
+ "name": "@eslint-community/eslint-plugin-eslint-comments",
67
+ "version": "4.7.1",
68
+ "bom-ref": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1",
69
+ "scope": "required",
70
+ "licenses": [
71
+ {
72
+ "expression": "MIT"
73
+ }
74
+ ],
75
+ "purl": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1"
76
+ },
77
+ {
78
+ "type": "library",
79
+ "name": "@stylistic/eslint-plugin",
80
+ "version": "5.10.0",
81
+ "bom-ref": "pkg:npm/@stylistic/eslint-plugin@5.10.0",
82
+ "scope": "required",
83
+ "licenses": [
84
+ {
85
+ "expression": "MIT"
86
+ }
87
+ ],
88
+ "purl": "pkg:npm/@stylistic/eslint-plugin@5.10.0"
89
+ },
90
+ {
91
+ "type": "library",
92
+ "name": "eslint-plugin-array-func",
93
+ "version": "5.1.1",
94
+ "bom-ref": "pkg:npm/eslint-plugin-array-func@5.1.1",
95
+ "scope": "required",
96
+ "licenses": [
97
+ {
98
+ "expression": "MIT"
99
+ }
100
+ ],
101
+ "purl": "pkg:npm/eslint-plugin-array-func@5.1.1"
102
+ },
103
+ {
104
+ "type": "library",
105
+ "name": "eslint-plugin-destructuring",
106
+ "version": "2.2.1",
107
+ "bom-ref": "pkg:npm/eslint-plugin-destructuring@2.2.1",
108
+ "scope": "required",
109
+ "licenses": [
110
+ {
111
+ "expression": "MIT"
112
+ }
113
+ ],
114
+ "purl": "pkg:npm/eslint-plugin-destructuring@2.2.1"
115
+ },
116
+ {
117
+ "type": "library",
118
+ "name": "eslint-plugin-import-x",
119
+ "version": "4.16.2",
120
+ "bom-ref": "pkg:npm/eslint-plugin-import-x@4.16.2",
121
+ "scope": "required",
122
+ "licenses": [
123
+ {
124
+ "expression": "MIT"
125
+ }
126
+ ],
127
+ "purl": "pkg:npm/eslint-plugin-import-x@4.16.2"
128
+ },
129
+ {
130
+ "type": "library",
131
+ "name": "eslint-plugin-no-barrel-files",
132
+ "version": "1.3.1",
133
+ "bom-ref": "pkg:npm/eslint-plugin-no-barrel-files@1.3.1",
134
+ "scope": "required",
135
+ "licenses": [
136
+ {
137
+ "expression": "ISC"
138
+ }
139
+ ],
140
+ "purl": "pkg:npm/eslint-plugin-no-barrel-files@1.3.1"
141
+ },
142
+ {
143
+ "type": "library",
144
+ "name": "eslint-plugin-no-secrets",
145
+ "version": "2.3.3",
146
+ "bom-ref": "pkg:npm/eslint-plugin-no-secrets@2.3.3",
147
+ "scope": "required",
148
+ "licenses": [
149
+ {
150
+ "expression": "MIT"
151
+ }
152
+ ],
153
+ "purl": "pkg:npm/eslint-plugin-no-secrets@2.3.3"
154
+ },
155
+ {
156
+ "type": "library",
157
+ "name": "eslint-plugin-promise",
158
+ "version": "7.3.0",
159
+ "bom-ref": "pkg:npm/eslint-plugin-promise@7.3.0",
160
+ "scope": "required",
161
+ "licenses": [
162
+ {
163
+ "expression": "ISC"
164
+ }
165
+ ],
166
+ "purl": "pkg:npm/eslint-plugin-promise@7.3.0"
167
+ },
168
+ {
169
+ "type": "library",
170
+ "name": "eslint-plugin-sonarjs",
171
+ "version": "4.0.3",
172
+ "bom-ref": "pkg:npm/eslint-plugin-sonarjs@4.0.3",
173
+ "scope": "required",
174
+ "licenses": [
175
+ {
176
+ "expression": "LGPL-3.0-only"
177
+ }
178
+ ],
179
+ "purl": "pkg:npm/eslint-plugin-sonarjs@4.0.3"
180
+ },
181
+ {
182
+ "type": "library",
183
+ "name": "eslint-plugin-unicorn",
184
+ "version": "64.0.0",
185
+ "bom-ref": "pkg:npm/eslint-plugin-unicorn@64.0.0",
186
+ "scope": "required",
187
+ "licenses": [
188
+ {
189
+ "expression": "MIT"
190
+ }
191
+ ],
192
+ "purl": "pkg:npm/eslint-plugin-unicorn@64.0.0"
193
+ },
194
+ {
195
+ "type": "library",
196
+ "name": "eslint",
197
+ "version": "^10.0.0",
198
+ "bom-ref": "pkg:npm/eslint@%5E10.0.0",
199
+ "scope": "optional",
200
+ "licenses": [
201
+ {
202
+ "expression": "MIT"
203
+ }
204
+ ],
205
+ "purl": "pkg:npm/eslint@%5E10.0.0"
206
+ }
207
+ ],
208
+ "dependencies": [
209
+ {
210
+ "ref": "pkg:npm/@ben_12/eslint-plugin-dprint@1.19.0"
211
+ },
212
+ {
213
+ "ref": "pkg:npm/@ben_12/eslint-simple-parser@0.1.0"
214
+ },
215
+ {
216
+ "ref": "pkg:npm/@cspell/eslint-plugin@10.0.0"
217
+ },
218
+ {
219
+ "ref": "pkg:npm/@enormora/eslint-config-base@0.0.32",
220
+ "dependsOn": [
221
+ "pkg:npm/@ben_12/eslint-plugin-dprint@1.19.0",
222
+ "pkg:npm/@ben_12/eslint-simple-parser@0.1.0",
223
+ "pkg:npm/@cspell/eslint-plugin@10.0.0",
224
+ "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1",
225
+ "pkg:npm/@stylistic/eslint-plugin@5.10.0",
226
+ "pkg:npm/eslint-plugin-array-func@5.1.1",
227
+ "pkg:npm/eslint-plugin-destructuring@2.2.1",
228
+ "pkg:npm/eslint-plugin-import-x@4.16.2",
229
+ "pkg:npm/eslint-plugin-no-barrel-files@1.3.1",
230
+ "pkg:npm/eslint-plugin-no-secrets@2.3.3",
231
+ "pkg:npm/eslint-plugin-promise@7.3.0",
232
+ "pkg:npm/eslint-plugin-sonarjs@4.0.3",
233
+ "pkg:npm/eslint-plugin-unicorn@64.0.0",
234
+ "pkg:npm/eslint@%5E10.0.0"
235
+ ]
236
+ },
237
+ {
238
+ "ref": "pkg:npm/@eslint-community/eslint-plugin-eslint-comments@4.7.1"
239
+ },
240
+ {
241
+ "ref": "pkg:npm/@stylistic/eslint-plugin@5.10.0"
242
+ },
243
+ {
244
+ "ref": "pkg:npm/eslint-plugin-array-func@5.1.1"
245
+ },
246
+ {
247
+ "ref": "pkg:npm/eslint-plugin-destructuring@2.2.1"
248
+ },
249
+ {
250
+ "ref": "pkg:npm/eslint-plugin-import-x@4.16.2"
251
+ },
252
+ {
253
+ "ref": "pkg:npm/eslint-plugin-no-barrel-files@1.3.1"
254
+ },
255
+ {
256
+ "ref": "pkg:npm/eslint-plugin-no-secrets@2.3.3"
257
+ },
258
+ {
259
+ "ref": "pkg:npm/eslint-plugin-promise@7.3.0"
260
+ },
261
+ {
262
+ "ref": "pkg:npm/eslint-plugin-sonarjs@4.0.3"
263
+ },
264
+ {
265
+ "ref": "pkg:npm/eslint-plugin-unicorn@64.0.0"
266
+ },
267
+ {
268
+ "ref": "pkg:npm/eslint@%5E10.0.0"
269
+ }
270
+ ]
271
+ }