@enormora/eslint-config-base 0.0.37 → 0.0.39

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,5 @@
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'];
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../configs/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC"}
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  }
8
8
  ],
9
9
  "dependencies": {
10
- "@ben_12/eslint-plugin-dprint": "1.21.0",
10
+ "@ben_12/eslint-plugin-dprint": "1.21.1",
11
11
  "@ben_12/eslint-simple-parser": "0.1.0",
12
12
  "@cspell/eslint-plugin": "10.0.1",
13
13
  "@dprint/json": "0.21.3",
@@ -17,6 +17,7 @@
17
17
  "@eslint-community/eslint-plugin-eslint-comments": "4.7.2",
18
18
  "@eslint/markdown": "8.0.2",
19
19
  "@stylistic/eslint-plugin": "5.10.0",
20
+ "@typescript-eslint/utils": "8.61.0",
20
21
  "dprint-plugin-yaml": "0.6.0",
21
22
  "eslint-plugin-array-func": "5.1.1",
22
23
  "eslint-plugin-destructuring": "2.2.1",
@@ -61,6 +62,7 @@
61
62
  "url": "git://github.com/enormora/eslint-config.git"
62
63
  },
63
64
  "sideEffects": [
65
+ "./plugins/restricted-syntax/no-unnecessary-arrow-function.js",
64
66
  "./presets/base/base-shared.js",
65
67
  "./presets/base/base.js",
66
68
  "./presets/base/dprint-formatters.js",
@@ -69,5 +71,5 @@
69
71
  "./rule-sets/restricted-syntax.js"
70
72
  ],
71
73
  "type": "module",
72
- "version": "0.0.37"
74
+ "version": "0.0.39"
73
75
  }
@@ -0,0 +1,89 @@
1
+ import { AST_NODE_TYPES, AST_TOKEN_TYPES, ESLintUtils } from '@typescript-eslint/utils';
2
+ function ruleUrl(name) {
3
+ return `https://github.com/enormora/eslint-config/blob/main/configs/plugins/restricted-syntax/${name}.ts`;
4
+ }
5
+ const { RuleCreator: ruleCreator } = ESLintUtils;
6
+ const buildRule = ruleCreator(ruleUrl);
7
+ const lexicalBindingSelectors = [
8
+ 'ThisExpression',
9
+ 'Super',
10
+ 'MetaProperty[meta.name="new"]',
11
+ 'Identifier[name="arguments"]'
12
+ ]
13
+ .join(', ');
14
+ const arrowFunctionSelector = `ArrowFunctionExpression:not(:has(${lexicalBindingSelectors}))`;
15
+ const unnecessaryArrowMessage = 'Arrow functions are only allowed when they use lexical `this`, `super`, `new.target`, or `arguments`.';
16
+ function findArrowToken(sourceCode, node) {
17
+ const arrowToken = sourceCode.getTokenBefore(node.body, {
18
+ filter(candidate) {
19
+ return candidate.type === AST_TOKEN_TYPES.Punctuator && candidate.value === '=>';
20
+ }
21
+ });
22
+ if (arrowToken === null) {
23
+ throw new Error('Expected an arrow function to contain a `=>` token before its body.');
24
+ }
25
+ return arrowToken;
26
+ }
27
+ function findAsyncTokenEnd(sourceCode, node) {
28
+ if (!node.async) {
29
+ return node.range[0];
30
+ }
31
+ const firstToken = sourceCode.getFirstToken(node);
32
+ if (firstToken?.value !== 'async') {
33
+ return node.range[0];
34
+ }
35
+ return firstToken.range[1];
36
+ }
37
+ function paramsAreParenthesized(sourceCode, node) {
38
+ if (node.params.length !== 1 || node.typeParameters !== undefined) {
39
+ return true;
40
+ }
41
+ const firstParamToken = sourceCode.getFirstToken(node.params[0]);
42
+ if (firstParamToken === null) {
43
+ return true;
44
+ }
45
+ const tokenBefore = sourceCode.getTokenBefore(firstParamToken);
46
+ return tokenBefore !== null && tokenBefore.value === '(';
47
+ }
48
+ function buildBodyText(sourceCode, node) {
49
+ if (node.body.type === AST_NODE_TYPES.BlockStatement) {
50
+ return sourceCode.getText(node.body);
51
+ }
52
+ return `{ return ${sourceCode.getText(node.body)}; }`;
53
+ }
54
+ function buildReplacement(sourceCode, node) {
55
+ const arrowToken = findArrowToken(sourceCode, node);
56
+ const signatureStart = findAsyncTokenEnd(sourceCode, node);
57
+ const rawSignature = sourceCode.getText().slice(signatureStart, arrowToken.range[0]).trim();
58
+ const signatureText = paramsAreParenthesized(sourceCode, node) ? rawSignature : `(${rawSignature})`;
59
+ const bodyText = buildBodyText(sourceCode, node);
60
+ const asyncPrefix = node.async ? 'async ' : '';
61
+ return `${asyncPrefix}function ${signatureText} ${bodyText}`;
62
+ }
63
+ export const noUnnecessaryArrowFunctionRule = buildRule({
64
+ name: 'no-unnecessary-arrow-function',
65
+ meta: {
66
+ type: 'problem',
67
+ docs: { description: unnecessaryArrowMessage },
68
+ fixable: 'code',
69
+ messages: {
70
+ unnecessaryArrow: unnecessaryArrowMessage
71
+ },
72
+ schema: []
73
+ },
74
+ defaultOptions: [],
75
+ create(context) {
76
+ return {
77
+ [arrowFunctionSelector](node) {
78
+ context.report({
79
+ node,
80
+ messageId: 'unnecessaryArrow',
81
+ fix(fixer) {
82
+ return fixer.replaceText(node, buildReplacement(context.sourceCode, node));
83
+ }
84
+ });
85
+ }
86
+ };
87
+ }
88
+ });
89
+ //# sourceMappingURL=no-unnecessary-arrow-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-unnecessary-arrow-function.js","sourceRoot":"","sources":["../../../../../configs/plugins/restricted-syntax/no-unnecessary-arrow-function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AAC;IAC5F,MAAM,aAAa,GAAG,sBAAsB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,YAAY,GAAG,CAAC;IACpG,MAAM,QAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,OAAO,GAAG,WAAW,YAAY,aAAa,IAAI,QAAQ,EAAE,CAAC;AACjE,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,SAAS,CAAC;IACpD,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE;QAC9C,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACN,gBAAgB,EAAE,uBAAuB;SAC5C;QACD,MAAM,EAAE,EAAE;KACb;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACV,OAAO;YACH,CAAC,qBAAqB,CAAC,CAAC,IAAsC;gBAC1D,OAAO,CAAC,MAAM,CAAC;oBACX,IAAI;oBACJ,SAAS,EAAE,kBAAkB;oBAC7B,GAAG,CAAC,KAAK;wBACL,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;oBAC/E,CAAC;iBACJ,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;CACJ,CAAC,CAAC"}
@@ -2,26 +2,19 @@ import codeSpellChecker from '@cspell/eslint-plugin';
2
2
  import eslintCommentsPlugin from '@eslint-community/eslint-plugin-eslint-comments';
3
3
  import importPlugin, { createNodeResolver } from 'eslint-plugin-import-x';
4
4
  import noSecretsPlugin from 'eslint-plugin-no-secrets';
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
- noInOperatorRestriction,
12
- noSwitchStatementRestriction,
13
- noUnnecessaryArrowFunctionRestriction
14
- } from '../../rule-sets/restricted-syntax.js';
15
- import { stylisticRuleSet } from '../../rule-sets/stylistic.js';
16
-
17
- const restrictedSyntaxPlugin = createRestrictedSyntaxPlugin([
5
+ import { ecmaVersion, javascriptExtensions } from "../../constants.js";
6
+ import { noUnnecessaryArrowFunctionRule } from "../../plugins/restricted-syntax/no-unnecessary-arrow-function.js";
7
+ import { bestPracticesRuleSet } from "../../rule-sets/best-practices.js";
8
+ import { createRestrictedSyntaxPlugin, noClassDeclarationRestriction, noEmptyFunctionBodyRestriction, noInOperatorRestriction, noSwitchStatementRestriction } from "../../rule-sets/restricted-syntax.js";
9
+ import { stylisticRuleSet } from "../../rule-sets/stylistic.js";
10
+ const noRestrictedSyntaxWrappers = createRestrictedSyntaxPlugin([
18
11
  'no-class-declaration',
19
12
  'no-switch-statement',
20
13
  'no-empty-function-body',
21
- 'no-in-operator',
22
- 'no-unnecessary-arrow-function'
23
- ]);
24
-
14
+ 'no-in-operator'
15
+ ], {
16
+ 'no-unnecessary-arrow-function': noUnnecessaryArrowFunctionRule
17
+ });
25
18
  export const cspellSpellcheckerOptions = {
26
19
  autoFix: false,
27
20
  numSuggestions: 3,
@@ -46,7 +39,6 @@ export const cspellSpellcheckerOptions = {
46
39
  customWordListFile: undefined,
47
40
  debugMode: false
48
41
  };
49
-
50
42
  export const baseSharedConfig = {
51
43
  languageOptions: {
52
44
  ecmaVersion,
@@ -71,7 +63,7 @@ export const baseSharedConfig = {
71
63
  'eslint-comments': eslintCommentsPlugin,
72
64
  'no-secrets': noSecretsPlugin,
73
65
  '@cspell': codeSpellChecker,
74
- 'restricted-syntax': restrictedSyntaxPlugin
66
+ 'restricted-syntax': noRestrictedSyntaxWrappers
75
67
  },
76
68
  settings: {
77
69
  ...stylisticRuleSet.settings,
@@ -79,12 +71,11 @@ export const baseSharedConfig = {
79
71
  'import/parsers': {
80
72
  espree: javascriptExtensions
81
73
  },
82
- 'import-x/resolver-next': [ createNodeResolver() ]
74
+ 'import-x/resolver-next': [createNodeResolver()]
83
75
  },
84
76
  rules: {
85
77
  ...stylisticRuleSet.rules,
86
78
  ...bestPracticesRuleSet.rules,
87
-
88
79
  'array-callback-return': 'error',
89
80
  camelcase: 'off',
90
81
  'no-array-constructor': 'error',
@@ -106,8 +97,8 @@ export const baseSharedConfig = {
106
97
  'no-dupe-args': 'error',
107
98
  'no-duplicate-case': 'error',
108
99
  'no-duplicate-imports': 'error',
109
- 'no-else-return': [ 'error', { allowElseIf: false } ],
110
- 'no-empty': [ 'error', { allowEmptyCatch: true } ],
100
+ 'no-else-return': ['error', { allowElseIf: false }],
101
+ 'no-empty': ['error', { allowEmptyCatch: true }],
111
102
  'no-empty-character-class': 'error',
112
103
  'no-empty-function': 'off',
113
104
  'no-empty-pattern': 'error',
@@ -125,7 +116,7 @@ export const baseSharedConfig = {
125
116
  'no-implicit-globals': 'error',
126
117
  'no-implied-eval': 'error',
127
118
  'no-inline-comments': 'off',
128
- 'no-inner-declarations': [ 'error', 'functions' ],
119
+ 'no-inner-declarations': ['error', 'functions'],
129
120
  'no-invalid-regexp': 'error',
130
121
  'no-invalid-this': 'off',
131
122
  'no-irregular-whitespace': 'error',
@@ -147,30 +138,30 @@ export const baseSharedConfig = {
147
138
  'no-object-constructor': 'error',
148
139
  'no-octal': 'error',
149
140
  'no-octal-escape': 'error',
150
- 'no-param-reassign': [ 'error', { props: true } ],
141
+ 'no-param-reassign': ['error', { props: true }],
151
142
  'no-plusplus': 'error',
152
143
  'no-proto': 'error',
153
144
  'no-prototype-builtins': 'error',
154
- 'no-redeclare': [ 'error', { builtinGlobals: true } ],
145
+ 'no-redeclare': ['error', { builtinGlobals: true }],
155
146
  'no-regex-spaces': 'error',
156
147
  'no-restricted-syntax': 'off',
157
- 'restricted-syntax/no-class-declaration': [ 'error', noClassDeclarationRestriction ],
158
- 'restricted-syntax/no-switch-statement': [ 'error', noSwitchStatementRestriction ],
159
- 'restricted-syntax/no-empty-function-body': [ 'error', noEmptyFunctionBodyRestriction ],
160
- 'restricted-syntax/no-in-operator': [ 'error', noInOperatorRestriction ],
161
- 'restricted-syntax/no-unnecessary-arrow-function': [ 'error', noUnnecessaryArrowFunctionRestriction ],
162
- 'no-return-assign': [ 'error', 'always' ],
163
- 'no-self-assign': [ 'error', { props: true } ],
148
+ 'restricted-syntax/no-class-declaration': ['error', noClassDeclarationRestriction],
149
+ 'restricted-syntax/no-switch-statement': ['error', noSwitchStatementRestriction],
150
+ 'restricted-syntax/no-empty-function-body': ['error', noEmptyFunctionBodyRestriction],
151
+ 'restricted-syntax/no-in-operator': ['error', noInOperatorRestriction],
152
+ 'restricted-syntax/no-unnecessary-arrow-function': 'error',
153
+ 'no-return-assign': ['error', 'always'],
154
+ 'no-self-assign': ['error', { props: true }],
164
155
  'no-self-compare': 'error',
165
156
  'no-sequences': 'error',
166
- 'no-shadow': [ 'error', { builtinGlobals: true } ],
157
+ 'no-shadow': ['error', { builtinGlobals: true }],
167
158
  'no-shadow-restricted-names': 'error',
168
159
  'no-sparse-arrays': 'error',
169
160
  'no-ternary': 'off',
170
161
  'no-this-before-super': 'error',
171
162
  'no-throw-literal': 'error',
172
163
  'no-unassigned-vars': 'error',
173
- 'no-undef': [ 'error', { typeof: true } ],
164
+ 'no-undef': ['error', { typeof: true }],
174
165
  'no-undef-init': 'error',
175
166
  'no-undefined': 'off',
176
167
  'no-unexpected-multiline': 'error',
@@ -242,10 +233,10 @@ export const baseSharedConfig = {
242
233
  detectObjects: false,
243
234
  enforceConst: false,
244
235
  ignoreClassFieldInitialValues: false,
245
- ignore: [ -1, 0, 1 ]
236
+ ignore: [-1, 0, 1]
246
237
  }
247
238
  ],
248
- 'arrow-body-style': [ 'error', 'always' ],
239
+ 'arrow-body-style': ['error', 'always'],
249
240
  'accessor-pairs': [
250
241
  'error',
251
242
  {
@@ -253,24 +244,24 @@ export const baseSharedConfig = {
253
244
  }
254
245
  ],
255
246
  'block-scoped-var': 'off',
256
- complexity: [ 'error', { max: 6 } ],
247
+ complexity: ['error', { max: 6 }],
257
248
  'consistent-return': 'error',
258
- 'consistent-this': [ 'error', 'self' ],
249
+ 'consistent-this': ['error', 'self'],
259
250
  'constructor-super': 'error',
260
- curly: [ 'error', 'all' ],
251
+ curly: ['error', 'all'],
261
252
  'default-case': 'error',
262
253
  'dot-notation': 'error',
263
254
  eqeqeq: 'error',
264
255
  'func-names': 'off',
265
256
  'func-style': 'off',
266
257
  'guard-for-in': 'error',
267
- 'id-length': [ 'error', { min: 2, properties: 'never' } ],
268
- 'init-declarations': [ 'error', 'always' ],
269
- 'max-depth': [ 'error', { max: 5 } ],
270
- 'max-lines': [ 'error', { max: 500, skipBlankLines: true, skipComments: true } ],
271
- 'max-nested-callbacks': [ 'error', { max: 4 } ],
272
- 'max-params': [ 'error', { max: 4 } ],
273
- 'max-statements': [ 'error', { max: 10 } ],
258
+ 'id-length': ['error', { min: 2, properties: 'never' }],
259
+ 'init-declarations': ['error', 'always'],
260
+ 'max-depth': ['error', { max: 5 }],
261
+ 'max-lines': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
262
+ 'max-nested-callbacks': ['error', { max: 4 }],
263
+ 'max-params': ['error', { max: 4 }],
264
+ 'max-statements': ['error', { max: 10 }],
274
265
  'new-cap': [
275
266
  'error',
276
267
  {
@@ -278,9 +269,9 @@ export const baseSharedConfig = {
278
269
  capIsNew: true
279
270
  }
280
271
  ],
281
- 'object-shorthand': [ 'error', 'always' ],
282
- 'one-var': [ 'error', 'never' ],
283
- 'operator-assignment': [ 'error', 'always' ],
272
+ 'object-shorthand': ['error', 'always'],
273
+ 'one-var': ['error', 'never'],
274
+ 'operator-assignment': ['error', 'always'],
284
275
  'prefer-arrow-callback': 'off',
285
276
  'prefer-rest-params': 'error',
286
277
  radix: 'error',
@@ -288,12 +279,12 @@ export const baseSharedConfig = {
288
279
  'require-yield': 'error',
289
280
  'sort-vars': 'off',
290
281
  'sort-imports': 'off',
291
- strict: [ 'error', 'safe' ],
292
- 'unicode-bom': [ 'error', 'never' ],
282
+ strict: ['error', 'safe'],
283
+ 'unicode-bom': ['error', 'never'],
293
284
  'use-isnan': 'error',
294
285
  'valid-typeof': 'error',
295
286
  'vars-on-top': 'error',
296
- yoda: [ 'error', 'never' ],
287
+ yoda: ['error', 'never'],
297
288
  'capitalized-comments': 'off',
298
289
  'class-methods-use-this': 'error',
299
290
  'func-name-matching': 'off',
@@ -349,19 +340,15 @@ export const baseSharedConfig = {
349
340
  'prefer-named-capture-group': 'error',
350
341
  'no-import-assign': 'error',
351
342
  'require-atomic-updates': 'error',
352
-
353
343
  'no-restricted-imports': 'off',
354
-
355
344
  'no-alert': 'off',
356
345
  'no-script-url': 'off',
357
346
  'no-restricted-globals': 'off',
358
-
359
- 'grouped-accessor-pairs': [ 'error', 'getBeforeSet' ],
347
+ 'grouped-accessor-pairs': ['error', 'getBeforeSet'],
360
348
  'no-constructor-return': 'error',
361
349
  'no-dupe-else-if': 'error',
362
350
  'no-setter-return': 'error',
363
351
  'prefer-exponentiation-operator': 'error',
364
-
365
352
  'default-case-last': 'error',
366
353
  'no-restricted-exports': 'off',
367
354
  'no-useless-backreference': 'error',
@@ -373,13 +360,11 @@ export const baseSharedConfig = {
373
360
  'no-unsafe-optional-chaining': 'error',
374
361
  'no-unused-private-class-members': 'error',
375
362
  'no-constant-binary-expression': 'error',
376
- 'logical-assignment-operators': [ 'error', 'never' ],
363
+ 'logical-assignment-operators': ['error', 'never'],
377
364
  'prefer-object-has-own': 'error',
378
365
  'no-useless-assignment': 'error',
379
-
380
- 'no-secrets/no-secrets': [ 'error', { tolerance: 5 } ],
366
+ 'no-secrets/no-secrets': ['error', { tolerance: 5 }],
381
367
  'no-secrets/no-pattern-match': 'off',
382
-
383
368
  'eslint-comments/disable-enable-pair': [
384
369
  'error',
385
370
  {
@@ -393,7 +378,6 @@ export const baseSharedConfig = {
393
378
  'eslint-comments/no-unlimited-disable': 'error',
394
379
  'eslint-comments/no-use': 'off',
395
380
  'eslint-comments/require-description': 'error',
396
-
397
381
  'import/no-deprecated': 'error',
398
382
  'import/exports-last': 'off',
399
383
  'import/dynamic-import-chunkname': 'off',
@@ -404,9 +388,9 @@ export const baseSharedConfig = {
404
388
  'import/prefer-default-export': 'off',
405
389
  'import/newline-after-import': 'error',
406
390
  'import/no-nodejs-modules': 'off',
407
- 'import/max-dependencies': [ 'error', { max: 10 } ],
391
+ 'import/max-dependencies': ['error', { max: 10 }],
408
392
  'import/first': 'error',
409
- 'import/no-unused-modules': [ 'error', { unusedExports: true, suppressMissingFileEnumeratorAPIWarning: true } ],
393
+ 'import/no-unused-modules': ['error', { unusedExports: true, suppressMissingFileEnumeratorAPIWarning: true }],
410
394
  'import/no-anonymous-default-export': 'off',
411
395
  'import/no-named-default': 'off',
412
396
  'import/no-cycle': 'error',
@@ -463,7 +447,7 @@ export const baseSharedConfig = {
463
447
  'import/consistent-type-specifier-style': 'off',
464
448
  'import/no-rename-default': 'off',
465
449
  'import/prefer-namespace-import': 'off',
466
-
467
- '@cspell/spellchecker': [ 'error', cspellSpellcheckerOptions ]
450
+ '@cspell/spellchecker': ['error', cspellSpellcheckerOptions]
468
451
  }
469
452
  };
453
+ //# sourceMappingURL=base-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-shared.js","sourceRoot":"","sources":["../../../../../configs/presets/base/base-shared.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,OAAO,oBAAoB,MAAM,iDAAiD,CAAC;AACnF,OAAO,YAAY,EAAE,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OA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C,EAAE,OAAO;QAC5C,2BAA2B,EAAE,OAAO;QACpC,mCAAmC,EAAE,OAAO;QAC5C,4BAA4B,EAAE,OAAO;QACrC,cAAc,EAAE,OAAO;QACvB,6BAA6B,EAAE;YAC3B,OAAO;YACP;gBACI,KAAK,EAAE,EAAE;aACZ;SACJ;QACD,uLAAuL;QACvL,sBAAsB,EAAE,KAAK;QAC7B,6BAA6B,EAAE,KAAK;QACpC,iCAAiC,EAAE,KAAK;QACxC,8BAA8B,EAAE,OAAO;QACvC,wCAAwC,EAAE,KAAK;QAC/C,0BAA0B,EAAE,KAAK;QACjC,gCAAgC,EAAE,KAAK;QAEvC,sBAAsB,EAAE,CAAE,OAAO,EAAE,yBAAyB,CAAE;KACjE;CACJ,CAAC"}
@@ -1,13 +1,12 @@
1
1
  import dprintPlugin from '@ben_12/eslint-plugin-dprint';
2
2
  import simpleParser from '@ben_12/eslint-simple-parser';
3
- import { baseSharedConfig } from './base-shared.js';
4
- import { jsonDprintConfig, tomlDprintConfig, typescriptDprintConfig, yamlDprintConfig } from './dprint-config.js';
5
- import { dprintSettings } from './dprint-formatters.js';
6
- import { markdownConfig } from './markdown.js';
7
- import { packageJsonConfig } from './package-json.js';
8
-
3
+ import { baseSharedConfig } from "./base-shared.js";
4
+ import { jsonDprintConfig, tomlDprintConfig, typescriptDprintConfig, yamlDprintConfig } from "./dprint-config.js";
5
+ import { dprintSettings } from "./dprint-formatters.js";
6
+ import { markdownConfig } from "./markdown.js";
7
+ import { packageJsonConfig } from "./package-json.js";
9
8
  const baseJsConfig = {
10
- files: [ '**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}' ],
9
+ files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}'],
11
10
  ...baseSharedConfig,
12
11
  plugins: {
13
12
  ...baseSharedConfig.plugins,
@@ -16,8 +15,7 @@ const baseJsConfig = {
16
15
  settings: { ...baseSharedConfig.settings, ...dprintSettings },
17
16
  rules: {
18
17
  ...baseSharedConfig.rules,
19
-
20
- 'dprint/typescript': [ 'error', { config: typescriptDprintConfig } ],
18
+ 'dprint/typescript': ['error', { config: typescriptDprintConfig }],
21
19
  'dprint/json': 'off',
22
20
  'dprint/markdown': 'off',
23
21
  'dprint/toml': 'off',
@@ -26,35 +24,30 @@ const baseJsConfig = {
26
24
  'dprint/markup': 'off',
27
25
  'dprint/yaml': 'off',
28
26
  'dprint/graphql': 'off',
29
-
30
27
  '@stylistic/member-delimiter-style': 'off'
31
28
  }
32
29
  };
33
-
34
30
  const dprintJsonConfig = {
35
- files: [ '**/*.json' ],
31
+ files: ['**/*.json'],
36
32
  languageOptions: { parser: simpleParser },
37
33
  plugins: { dprint: dprintPlugin },
38
34
  settings: dprintSettings,
39
- rules: { 'dprint/json': [ 'error', { config: jsonDprintConfig } ] }
35
+ rules: { 'dprint/json': ['error', { config: jsonDprintConfig }] }
40
36
  };
41
-
42
37
  const dprintYamlConfig = {
43
- files: [ '**/*.{yml,yaml}' ],
38
+ files: ['**/*.{yml,yaml}'],
44
39
  languageOptions: { parser: simpleParser },
45
40
  plugins: { dprint: dprintPlugin },
46
41
  settings: dprintSettings,
47
- rules: { 'dprint/yaml': [ 'error', { config: yamlDprintConfig } ] }
42
+ rules: { 'dprint/yaml': ['error', { config: yamlDprintConfig }] }
48
43
  };
49
-
50
44
  const dprintTomlConfig = {
51
- files: [ '**/*.toml' ],
45
+ files: ['**/*.toml'],
52
46
  languageOptions: { parser: simpleParser },
53
47
  plugins: { dprint: dprintPlugin },
54
48
  settings: dprintSettings,
55
- rules: { 'dprint/toml': [ 'error', { config: tomlDprintConfig } ] }
49
+ rules: { 'dprint/toml': ['error', { config: tomlDprintConfig }] }
56
50
  };
57
-
58
51
  export const baseConfig = [
59
52
  baseJsConfig,
60
53
  dprintJsonConfig,
@@ -63,14 +56,8 @@ export const baseConfig = [
63
56
  dprintYamlConfig,
64
57
  dprintTomlConfig
65
58
  ];
66
-
67
59
  /* eslint-disable no-barrel-files/no-barrel-files -- expose dprint configs and cspell helper as public API so consumers can spread or call them when customizing */
68
- export {
69
- jsonDprintConfig,
70
- markdownDprintConfig,
71
- tomlDprintConfig,
72
- typescriptDprintConfig,
73
- yamlDprintConfig
74
- } from './dprint-config.js';
75
- export { withCspellWords } from './cspell-config.js';
60
+ export { jsonDprintConfig, markdownDprintConfig, tomlDprintConfig, typescriptDprintConfig, yamlDprintConfig } from "./dprint-config.js";
61
+ export { withCspellWords } from "./cspell-config.js";
76
62
  /* eslint-enable no-barrel-files/no-barrel-files -- end of public re-exports */
63
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../configs/presets/base/base.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,YAAY,GAAG;IACjB,KAAK,EAAE,CAAE,0CAA0C,CAAE;IACrD,GAAG,gBAAgB;IACnB,OAAO,EAAE;QACL,GAAG,gBAAgB,CAAC,OAAO;QAC3B,MAAM,EAAE,YAAY;KACvB;IACD,QAAQ,EAAE,EAAE,GAAG,gBAAgB,CAAC,QAAQ,EAAE,GAAG,cAAc,EAAE;IAC7D,KAAK,EAAE;QACH,GAAG,gBAAgB,CAAC,KAAK;QAEzB,mBAAmB,EAAE,CAAE,OAAO,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAE;QACpE,aAAa,EAAE,KAAK;QACpB,i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AAEhC,mKAAmK;AACnK,OAAO,EACH,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,+EAA+E"}
@@ -1 +1,18 @@
1
- import { cspellSpellcheckerOptions } from './base-shared.js';
1
+ import { cspellSpellcheckerOptions } from "./base-shared.js";
2
+ export function withCspellWords(words) {
3
+ return {
4
+ rules: {
5
+ '@cspell/spellchecker': [
6
+ 'error',
7
+ {
8
+ ...cspellSpellcheckerOptions,
9
+ cspell: {
10
+ ...cspellSpellcheckerOptions.cspell,
11
+ words: [...cspellSpellcheckerOptions.cspell.words, ...words]
12
+ }
13
+ }
14
+ ]
15
+ }
16
+ };
17
+ }
18
+ //# sourceMappingURL=cspell-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cspell-config.js","sourceRoot":"","sources":["../../../../../configs/presets/base/cspell-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAU7D,MAAM,UAAU,eAAe,CAAC,KAAwB;IACpD,OAAO;QACH,KAAK,EAAE;YACH,sBAAsB,EAAE;gBACpB,OAAO;gBACP;oBACI,GAAG,yBAAyB;oBAC5B,MAAM,EAAE;wBACJ,GAAG,yBAAyB,CAAC,MAAM;wBACnC,KAAK,EAAE,CAAE,GAAG,yBAAyB,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,KAAK,CAAE;qBACjE;iBACJ;aACJ;SACJ;KACJ,CAAC;AACN,CAAC"}
@@ -1,6 +1,5 @@
1
1
  const lineWidth = 120;
2
2
  const indentWidth = 4;
3
-
4
3
  export const typescriptDprintConfig = {
5
4
  lineWidth,
6
5
  indentWidth,
@@ -63,14 +62,12 @@ export const typescriptDprintConfig = {
63
62
  'exportDeclaration.forceMultiLine': 'never',
64
63
  'importDeclaration.forceMultiLine': 'never'
65
64
  };
66
-
67
65
  export const jsonDprintConfig = {
68
66
  lineWidth,
69
67
  indentWidth,
70
68
  newLineKind: 'lf',
71
69
  useTabs: false
72
70
  };
73
-
74
71
  export const markdownDprintConfig = {
75
72
  lineWidth,
76
73
  newLineKind: 'lf',
@@ -78,16 +75,15 @@ export const markdownDprintConfig = {
78
75
  emphasisKind: 'underscores',
79
76
  strongKind: 'asterisks'
80
77
  };
81
-
82
78
  export const yamlDprintConfig = {
83
79
  printWidth: lineWidth,
84
80
  indentWidth,
85
81
  lineBreak: 'lf'
86
82
  };
87
-
88
83
  export const tomlDprintConfig = {
89
84
  lineWidth,
90
85
  indentWidth,
91
86
  newLineKind: 'lf',
92
87
  useTabs: false
93
88
  };
89
+ //# sourceMappingURL=dprint-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dprint-config.js","sourceRoot":"","sources":["../../../../../configs/presets/base/dprint-config.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,QAAQ;IACnB,aAAa,EAAE,UAAU;IACzB,kBAAkB,EAAE,UAAU;IAC9B,uBAAuB,EAAE,UAAU;IACnC,cAAc,EAAE,OAAO;IACvB,gBAAgB,EAAE,UAAU;IAC5B,aAAa,EAAE,KAAK;IACpB,gBAAgB,EAAE,KAAK;IACvB,8BAA8B,EAAE,OAAO;IACvC,oCAAoC,EAAE,KAAK;IAC3C,qBAAqB,EAAE,UAAU;IACjC,qCAAqC,EAAE,KAAK;IAC5C,qBAAqB,EAAE,QAAQ;IAC/B,oCAAoC,EAAE,IAAI;IAC1C,2BAA2B,EAAE,WAA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IAAI;IACjB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,aAAa;IAC3B,UAAU,EAAE,WAAW;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,UAAU,EAAE,SAAS;IACrB,WAAW;IACX,SAAS,EAAE,IAAI;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;CACjB,CAAC"}
@@ -3,20 +3,17 @@ import dprintJsonFormatter from '@dprint/json';
3
3
  import dprintMarkdownFormatter from '@dprint/markdown';
4
4
  import dprintTomlFormatter from '@dprint/toml';
5
5
  import dprintTypescriptFormatter from '@dprint/typescript';
6
-
7
6
  // `dprint-plugin-yaml` ships only `plugin.wasm` and `package.json` — there is no JS entry to import
8
7
  // from. Packtory's dependency scanner records `import.meta.resolve('<pkg>/plugin.wasm')` call sites
9
8
  // (since `@packtory/cli@0.0.31`), so this call is what makes the package land in the published
10
9
  // `dependencies`. The dprint plugin reads the bytes itself when it resolves a `getPath`-shaped
11
10
  // formatter, so we just hand it the path.
12
11
  const dprintYamlWasmPath = fileURLToPath(import.meta.resolve('dprint-plugin-yaml/plugin.wasm'));
13
-
14
12
  const dprintYamlFormatter = {
15
13
  getPath() {
16
14
  return dprintYamlWasmPath;
17
15
  }
18
16
  };
19
-
20
17
  export const dprintSettings = {
21
18
  '@ben_12/dprint': {
22
19
  formatters: {
@@ -28,3 +25,4 @@ export const dprintSettings = {
28
25
  }
29
26
  }
30
27
  };
28
+ //# sourceMappingURL=dprint-formatters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dprint-formatters.js","sourceRoot":"","sources":["../../../../../configs/presets/base/dprint-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAC/C,OAAO,uBAAuB,MAAM,kBAAkB,CAAC;AACvD,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAC/C,OAAO,yBAAyB,MAAM,oBAAoB,CAAC;AAE3D,oGAAoG;AACpG,oGAAoG;AACpG,+FAA+F;AAC/F,+FAA+F;AAC/F,0CAA0C;AAC1C,MAAM,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC;AAEhG,MAAM,mBAAmB,GAAG;IACxB,OAAO;QACH,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,gBAAgB,EAAE;QACd,UAAU,EAAE;YACR,UAAU,EAAE,yBAAyB;YACrC,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE,uBAAuB;YACjC,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,mBAAmB;SAC5B;KACJ;CACJ,CAAC"}