katon-labs-eslint-config 0.0.3 → 0.0.5-alpha.1
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/dist/index.cjs +22 -4
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +21 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -62,6 +62,7 @@ __export(src_exports, {
|
|
|
62
62
|
GLOB_YAML: () => GLOB_YAML,
|
|
63
63
|
StylisticConfigDefaults: () => StylisticConfigDefaults,
|
|
64
64
|
default: () => src_default,
|
|
65
|
+
ignores: () => ignores,
|
|
65
66
|
imports: () => imports,
|
|
66
67
|
katonlabs: () => katonlabs,
|
|
67
68
|
node: () => node,
|
|
@@ -185,10 +186,10 @@ function typescript(options) {
|
|
|
185
186
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
186
187
|
"@typescript-eslint/strict-boolean-expressions": ["error", { allowNullableBoolean: true, allowNullableObject: true }]
|
|
187
188
|
};
|
|
188
|
-
function makeParser(typeAware, files2,
|
|
189
|
+
function makeParser(typeAware, files2, ignores2) {
|
|
189
190
|
return {
|
|
190
191
|
files: files2,
|
|
191
|
-
...
|
|
192
|
+
...ignores2 ? { ignores: ignores2 } : {},
|
|
192
193
|
languageOptions: {
|
|
193
194
|
parser: import_parser.default,
|
|
194
195
|
parserOptions: {
|
|
@@ -533,8 +534,20 @@ function stylistic() {
|
|
|
533
534
|
];
|
|
534
535
|
}
|
|
535
536
|
|
|
537
|
+
// src/configs/ignores.ts
|
|
538
|
+
function ignores() {
|
|
539
|
+
return [
|
|
540
|
+
{
|
|
541
|
+
name: "katon-labs/ignores",
|
|
542
|
+
ignores: [
|
|
543
|
+
...GLOB_EXCLUDE
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
];
|
|
547
|
+
}
|
|
548
|
+
|
|
536
549
|
// src/factory.ts
|
|
537
|
-
function katonlabs(options = {}) {
|
|
550
|
+
function katonlabs(options = {}, ...userConfigs) {
|
|
538
551
|
const { ts } = options;
|
|
539
552
|
const configs = [];
|
|
540
553
|
configs.push(typescript(ts));
|
|
@@ -544,8 +557,12 @@ function katonlabs(options = {}) {
|
|
|
544
557
|
configs.push(perfectionist());
|
|
545
558
|
configs.push(node());
|
|
546
559
|
configs.push(stylistic());
|
|
560
|
+
configs.push(ignores());
|
|
547
561
|
let composer = new import_eslint_flat_config_utils.FlatConfigComposer();
|
|
548
|
-
composer.append(
|
|
562
|
+
composer.append(
|
|
563
|
+
...configs,
|
|
564
|
+
...userConfigs
|
|
565
|
+
);
|
|
549
566
|
return composer;
|
|
550
567
|
}
|
|
551
568
|
|
|
@@ -584,6 +601,7 @@ var src_default = katonlabs;
|
|
|
584
601
|
GLOB_XML,
|
|
585
602
|
GLOB_YAML,
|
|
586
603
|
StylisticConfigDefaults,
|
|
604
|
+
ignores,
|
|
587
605
|
imports,
|
|
588
606
|
katonlabs,
|
|
589
607
|
node,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
1
|
+
import { Awaitable, FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
3
|
import { StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
|
|
4
4
|
|
|
@@ -8332,10 +8332,12 @@ declare function node(): TypedFlatConfigItem[];
|
|
|
8332
8332
|
declare const StylisticConfigDefaults: StylisticConfig;
|
|
8333
8333
|
declare function stylistic(): TypedFlatConfigItem[];
|
|
8334
8334
|
|
|
8335
|
+
declare function ignores(): TypedFlatConfigItem[];
|
|
8336
|
+
|
|
8335
8337
|
interface FactoryOptions {
|
|
8336
8338
|
ts?: TypescriptOptionsFile;
|
|
8337
8339
|
}
|
|
8338
|
-
declare function katonlabs(options?: FactoryOptions): FlatConfigComposer;
|
|
8340
|
+
declare function katonlabs(options?: FactoryOptions, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | Linter.Config[]>[]): FlatConfigComposer;
|
|
8339
8341
|
|
|
8340
8342
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
8341
8343
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -8368,4 +8370,4 @@ declare const GLOB_TESTS: string[];
|
|
|
8368
8370
|
declare const GLOB_ALL_SRC: string[];
|
|
8369
8371
|
declare const GLOB_EXCLUDE: string[];
|
|
8370
8372
|
|
|
8371
|
-
export { type FactoryOptions, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, type TypescriptOptionsFile, katonlabs as default, imports, katonlabs, node, perfectionist, stylistic, typescript, unicorn, vue };
|
|
8373
|
+
export { type FactoryOptions, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, type TypescriptOptionsFile, katonlabs as default, ignores, imports, katonlabs, node, perfectionist, stylistic, typescript, unicorn, vue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
1
|
+
import { Awaitable, FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
3
|
import { StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
|
|
4
4
|
|
|
@@ -8332,10 +8332,12 @@ declare function node(): TypedFlatConfigItem[];
|
|
|
8332
8332
|
declare const StylisticConfigDefaults: StylisticConfig;
|
|
8333
8333
|
declare function stylistic(): TypedFlatConfigItem[];
|
|
8334
8334
|
|
|
8335
|
+
declare function ignores(): TypedFlatConfigItem[];
|
|
8336
|
+
|
|
8335
8337
|
interface FactoryOptions {
|
|
8336
8338
|
ts?: TypescriptOptionsFile;
|
|
8337
8339
|
}
|
|
8338
|
-
declare function katonlabs(options?: FactoryOptions): FlatConfigComposer;
|
|
8340
|
+
declare function katonlabs(options?: FactoryOptions, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | Linter.Config[]>[]): FlatConfigComposer;
|
|
8339
8341
|
|
|
8340
8342
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
8341
8343
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -8368,4 +8370,4 @@ declare const GLOB_TESTS: string[];
|
|
|
8368
8370
|
declare const GLOB_ALL_SRC: string[];
|
|
8369
8371
|
declare const GLOB_EXCLUDE: string[];
|
|
8370
8372
|
|
|
8371
|
-
export { type FactoryOptions, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, type TypescriptOptionsFile, katonlabs as default, imports, katonlabs, node, perfectionist, stylistic, typescript, unicorn, vue };
|
|
8373
|
+
export { type FactoryOptions, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type Rules, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, type TypescriptOptionsFile, katonlabs as default, ignores, imports, katonlabs, node, perfectionist, stylistic, typescript, unicorn, vue };
|
package/dist/index.js
CHANGED
|
@@ -110,10 +110,10 @@ function typescript(options) {
|
|
|
110
110
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
111
111
|
"@typescript-eslint/strict-boolean-expressions": ["error", { allowNullableBoolean: true, allowNullableObject: true }]
|
|
112
112
|
};
|
|
113
|
-
function makeParser(typeAware, files2,
|
|
113
|
+
function makeParser(typeAware, files2, ignores2) {
|
|
114
114
|
return {
|
|
115
115
|
files: files2,
|
|
116
|
-
...
|
|
116
|
+
...ignores2 ? { ignores: ignores2 } : {},
|
|
117
117
|
languageOptions: {
|
|
118
118
|
parser: parserTS,
|
|
119
119
|
parserOptions: {
|
|
@@ -458,8 +458,20 @@ function stylistic() {
|
|
|
458
458
|
];
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
// src/configs/ignores.ts
|
|
462
|
+
function ignores() {
|
|
463
|
+
return [
|
|
464
|
+
{
|
|
465
|
+
name: "katon-labs/ignores",
|
|
466
|
+
ignores: [
|
|
467
|
+
...GLOB_EXCLUDE
|
|
468
|
+
]
|
|
469
|
+
}
|
|
470
|
+
];
|
|
471
|
+
}
|
|
472
|
+
|
|
461
473
|
// src/factory.ts
|
|
462
|
-
function katonlabs(options = {}) {
|
|
474
|
+
function katonlabs(options = {}, ...userConfigs) {
|
|
463
475
|
const { ts } = options;
|
|
464
476
|
const configs = [];
|
|
465
477
|
configs.push(typescript(ts));
|
|
@@ -469,8 +481,12 @@ function katonlabs(options = {}) {
|
|
|
469
481
|
configs.push(perfectionist());
|
|
470
482
|
configs.push(node());
|
|
471
483
|
configs.push(stylistic());
|
|
484
|
+
configs.push(ignores());
|
|
472
485
|
let composer = new FlatConfigComposer();
|
|
473
|
-
composer.append(
|
|
486
|
+
composer.append(
|
|
487
|
+
...configs,
|
|
488
|
+
...userConfigs
|
|
489
|
+
);
|
|
474
490
|
return composer;
|
|
475
491
|
}
|
|
476
492
|
|
|
@@ -509,6 +525,7 @@ export {
|
|
|
509
525
|
GLOB_YAML,
|
|
510
526
|
StylisticConfigDefaults,
|
|
511
527
|
src_default as default,
|
|
528
|
+
ignores,
|
|
512
529
|
imports,
|
|
513
530
|
katonlabs,
|
|
514
531
|
node,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "katon-labs-eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5-alpha.1",
|
|
5
5
|
"packageManager": "bun@1.1.27",
|
|
6
6
|
"description": "Katon Labs's ESLint config",
|
|
7
7
|
"author": "Alam Esa Wikanning Katon <naturaatom@gmail.com> (https://github.com/wikanonymous-dev/)",
|