@isentinel/eslint-config 6.1.0 → 6.3.0
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/README.md +106 -0
- package/dist/cli.mjs +231 -30
- package/dist/index.d.mts +55 -34
- package/dist/index.mjs +873 -209
- package/dist/lint-cli.mjs +234 -114
- package/dist/oxfmt.d.mts +132 -0
- package/dist/oxfmt.mjs +750 -0
- package/dist/oxlint.d.mts +14 -0
- package/dist/oxlint.mjs +417 -63
- package/package.json +8 -3
package/dist/index.d.mts
CHANGED
|
@@ -280,7 +280,9 @@ interface JsoncRuleDefaults {
|
|
|
280
280
|
"*": ["error", "last"];
|
|
281
281
|
};
|
|
282
282
|
"jsonc/indent": {
|
|
283
|
-
"*":
|
|
283
|
+
"*": {
|
|
284
|
+
"severityOnly": "error";
|
|
285
|
+
};
|
|
284
286
|
};
|
|
285
287
|
"jsonc/key-spacing": {
|
|
286
288
|
"*": ["error", {
|
|
@@ -2578,36 +2580,14 @@ interface MainRuleDefaults {
|
|
|
2578
2580
|
"*": ["off", "beside"];
|
|
2579
2581
|
};
|
|
2580
2582
|
"style/indent": {
|
|
2581
|
-
"*":
|
|
2582
|
-
"
|
|
2583
|
-
|
|
2584
|
-
"ignoredNodes": ["TSUnionType", "TSIntersectionType"];
|
|
2585
|
-
"ArrayExpression": 1;
|
|
2586
|
-
"CallExpression": {
|
|
2587
|
-
"arguments": 1;
|
|
2588
|
-
};
|
|
2589
|
-
"FunctionDeclaration": {
|
|
2590
|
-
"body": 1;
|
|
2591
|
-
"parameters": 1;
|
|
2592
|
-
"returnType": 1;
|
|
2593
|
-
};
|
|
2594
|
-
"FunctionExpression": {
|
|
2595
|
-
"body": 1;
|
|
2596
|
-
"parameters": 1;
|
|
2597
|
-
"returnType": 1;
|
|
2598
|
-
};
|
|
2599
|
-
"ignoreComments": false;
|
|
2600
|
-
"ImportDeclaration": 1;
|
|
2601
|
-
"MemberExpression": 1;
|
|
2602
|
-
"ObjectExpression": 1;
|
|
2603
|
-
"offsetTernaryExpressions": true;
|
|
2604
|
-
"outerIIFEBody": 1;
|
|
2605
|
-
"tabLength": 4;
|
|
2606
|
-
"VariableDeclarator": 1;
|
|
2607
|
-
}];
|
|
2583
|
+
"*": {
|
|
2584
|
+
"severityOnly": "off";
|
|
2585
|
+
};
|
|
2608
2586
|
};
|
|
2609
2587
|
"style/indent-binary-ops": {
|
|
2610
|
-
"*":
|
|
2588
|
+
"*": {
|
|
2589
|
+
"severityOnly": "off";
|
|
2590
|
+
};
|
|
2611
2591
|
};
|
|
2612
2592
|
"style/js/array-bracket-newline": {
|
|
2613
2593
|
"*": "off";
|
|
@@ -2839,7 +2819,9 @@ interface MainRuleDefaults {
|
|
|
2839
2819
|
"*": ["off", 4];
|
|
2840
2820
|
};
|
|
2841
2821
|
"style/jsx-indent-props": {
|
|
2842
|
-
"*":
|
|
2822
|
+
"*": {
|
|
2823
|
+
"severityOnly": "off";
|
|
2824
|
+
};
|
|
2843
2825
|
};
|
|
2844
2826
|
"style/jsx-max-props-per-line": {
|
|
2845
2827
|
"*": ["off", {
|
|
@@ -27288,7 +27270,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
27288
27270
|
onlyEquality?: boolean;
|
|
27289
27271
|
}];
|
|
27290
27272
|
// Names of all the configs
|
|
27291
|
-
type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/e18e/rules' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/flawless/setup' | 'isentinel/flawless/rules' | 'isentinel/flawless/
|
|
27273
|
+
type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/e18e/rules' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/flawless/setup' | 'isentinel/flawless/rules' | 'isentinel/flawless/rules-type-aware' | 'isentinel/gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/jsonc/tsconfig' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/naming/setup' | 'isentinel/naming/ts/rules-type-aware' | 'isentinel/naming/tsx/rules-type-aware' | 'isentinel/node/rules' | 'isentinel/oxfmt/setup' | 'isentinel/oxfmt/javascript' | 'isentinel/oxfmt/typescript' | 'isentinel/oxfmt/css' | 'isentinel/oxfmt/scss' | 'isentinel/oxfmt/less' | 'isentinel/oxfmt/html' | 'isentinel/oxfmt/markdown' | 'isentinel/oxfmt/graphql' | 'isentinel/oxfmt/json' | 'isentinel/oxfmt/json5' | 'isentinel/oxfmt/yaml' | 'isentinel/oxfmt/markdown-code/javascript' | 'isentinel/oxfmt/markdown-code/typescript' | 'isentinel/oxfmt/markdown-code/css' | 'isentinel/oxfmt/markdown-code/scss' | 'isentinel/oxfmt/markdown-code/less' | 'isentinel/oxfmt/markdown-code/html' | 'isentinel/oxfmt/markdown-code/graphql' | 'isentinel/oxfmt/markdown-code/json' | 'isentinel/oxfmt/markdown-code/json5' | 'isentinel/oxfmt/markdown-code/yaml' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/package-json/root' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/perfectionist/jsx' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/project-structure/setup' | 'isentinel/project-structure/rules' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/setup/naming' | 'isentinel/react/setup/testing-library' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox/parser' | 'isentinel/roblox/type-aware-parser' | 'isentinel/roblox' | 'isentinel/roblox/rules-type-aware' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/small-rules/setup' | 'isentinel/small-rules' | 'isentinel/sonarjs' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/test/jest/type-tests' | 'isentinel/test/vitest/setup' | 'isentinel/test/vitest/rules' | 'isentinel/test/vitest/type-tests' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/typescript/erasable-syntax-only' | 'isentinel/unicorn/setup' | 'isentinel/unicorn/rules' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
|
|
27292
27274
|
//#endregion
|
|
27293
27275
|
//#region src/utils.d.ts
|
|
27294
27276
|
type ExtractRuleOptions<T> = T extends Linter.RuleEntry<infer U> ? U : never;
|
|
@@ -27333,6 +27315,12 @@ type OxfmtOptions = Omit<FormatConfig, "jsdoc"> & {
|
|
|
27333
27315
|
lineWrappingStyle?: "balance" | "greedy";
|
|
27334
27316
|
});
|
|
27335
27317
|
};
|
|
27318
|
+
/** Where an oxfmt override applies, relative to the config directory. */
|
|
27319
|
+
interface OverrideScope {
|
|
27320
|
+
/** Globs it skips: its `excludeFiles` and its negated `files`. */
|
|
27321
|
+
excludeFiles: Array<string>;
|
|
27322
|
+
files: Array<string>;
|
|
27323
|
+
}
|
|
27336
27324
|
//#endregion
|
|
27337
27325
|
//#region src/types.d.ts
|
|
27338
27326
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -27885,6 +27873,20 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsProjectType {
|
|
|
27885
27873
|
* @requires eslint-plugin-eslint-plugin
|
|
27886
27874
|
*/
|
|
27887
27875
|
eslintPlugin?: boolean | OptionsOverrides;
|
|
27876
|
+
/**
|
|
27877
|
+
* Where formatting runs.
|
|
27878
|
+
*
|
|
27879
|
+
* - `"eslint"`: oxfmt runs inside the linter as the `oxfmt/oxfmt` rule.
|
|
27880
|
+
* - `"standalone"`: oxfmt runs as its own tool (`oxfmt`, with an
|
|
27881
|
+
* `oxfmt.config.ts` built by `isentinelOxfmt` from
|
|
27882
|
+
* `@isentinel/eslint-config/oxfmt`). The linter keeps the
|
|
27883
|
+
* formatter-conflict disables and still reads the oxfmt config so
|
|
27884
|
+
* width-aware rules agree with it, but enables `oxfmt/oxfmt` nowhere.
|
|
27885
|
+
* Lua formatting (Stylua) stays in ESLint, as oxfmt does not format Lua.
|
|
27886
|
+
*
|
|
27887
|
+
* @default "eslint"
|
|
27888
|
+
*/
|
|
27889
|
+
formatter?: "eslint" | "standalone";
|
|
27888
27890
|
/**
|
|
27889
27891
|
* Use external formatters to format files.
|
|
27890
27892
|
*
|
|
@@ -28399,9 +28401,16 @@ interface FlawlessRuleOptions extends OptionsHasRoblox {
|
|
|
28399
28401
|
declare function oxfmt(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & {
|
|
28400
28402
|
formatters?: OptionsFormatters | true;
|
|
28401
28403
|
oxfmtConfigOptions?: OxfmtOptions;
|
|
28404
|
+
/** The oxfmt config's ignore patterns, for Markdown code blocks. */
|
|
28405
|
+
oxfmtIgnorePatterns?: Array<string>;
|
|
28402
28406
|
oxfmtOptions?: OxfmtOptions;
|
|
28403
28407
|
oxlint?: boolean;
|
|
28404
28408
|
prettierOptions?: Options;
|
|
28409
|
+
/**
|
|
28410
|
+
* Oxfmt runs as its own tool: keep the formatter-conflict
|
|
28411
|
+
* disables and the plain parsers but enable `oxfmt/oxfmt` nowhere.
|
|
28412
|
+
*/
|
|
28413
|
+
standalone?: boolean;
|
|
28405
28414
|
}): Promise<Array<TypedFlatConfigItem>>;
|
|
28406
28415
|
//#endregion
|
|
28407
28416
|
//#region src/eslint/configs/flawless.d.ts
|
|
@@ -28419,7 +28428,7 @@ interface GitignoreOptions {
|
|
|
28419
28428
|
config?: boolean | FlatGitignoreOptions;
|
|
28420
28429
|
explicit?: boolean;
|
|
28421
28430
|
}
|
|
28422
|
-
declare function gitignore({ config, explicit }?: GitignoreOptions): Promise<Array<TypedFlatConfigItem>>;
|
|
28431
|
+
declare function gitignore$1({ config, explicit }?: GitignoreOptions): Promise<Array<TypedFlatConfigItem>>;
|
|
28423
28432
|
//#endregion
|
|
28424
28433
|
//#region src/eslint/configs/ignores.d.ts
|
|
28425
28434
|
declare function ignores$1(userIgnores?: ((originals: Array<string>) => Array<string>) | Array<string>): Array<TypedFlatConfigItem>;
|
|
@@ -28441,7 +28450,19 @@ declare function javascript({ complementIgnores, isInEditor, overrides, roblox,
|
|
|
28441
28450
|
declare function jsdoc({ full, stylistic, type }?: JsdocOptions & OptionsProjectType & OptionsStylistic): Array<TypedFlatConfigItem>;
|
|
28442
28451
|
//#endregion
|
|
28443
28452
|
//#region src/eslint/configs/jsonc.d.ts
|
|
28444
|
-
declare function jsonc({ files, overrides, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic
|
|
28453
|
+
declare function jsonc({ bracketSpacing, files, formatIndent, layoutOverrides, overrides, singleQuote, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic & {
|
|
28454
|
+
/** Space inside braces; follows the formatter's `bracketSpacing`. */
|
|
28455
|
+
bracketSpacing?: boolean;
|
|
28456
|
+
/** The indent oxfmt writes, used unless `stylistic.indent` is set. */
|
|
28457
|
+
formatIndent?: "tab" | number;
|
|
28458
|
+
/**
|
|
28459
|
+
* Overrides that change oxfmt's JSON layout. The layout rules are off
|
|
28460
|
+
* where they apply.
|
|
28461
|
+
*/
|
|
28462
|
+
layoutOverrides?: Array<OverrideScope>;
|
|
28463
|
+
/** JSON5 quotes; follows the formatter's `singleQuote`. */
|
|
28464
|
+
singleQuote?: boolean;
|
|
28465
|
+
}): Promise<Array<TypedFlatConfigItem>>;
|
|
28445
28466
|
//#endregion
|
|
28446
28467
|
//#region src/eslint/configs/markdown.d.ts
|
|
28447
28468
|
/**
|
|
@@ -28591,4 +28612,4 @@ declare function unicorn({ complementIgnores, nameReplacements, roblox, root: cu
|
|
|
28591
28612
|
//#region src/eslint/configs/yaml.d.ts
|
|
28592
28613
|
declare function yaml({ files, overrides, stylistic }?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
28593
28614
|
//#endregion
|
|
28594
|
-
export { type Awaitable, type ConfigNames, type ConfigSettings, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BIN, GLOB_BUILD_CONFIGS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LINTABLE_EXTENSIONS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_PACKAGE_JSON, GLOB_PACKAGE_JSON_ROOT, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_SRC_EXTENSIONS, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_TYPE_TESTS, GLOB_XML, GLOB_YAML, GitignoreOptions, type JsdocOptions, MARKDOWN_PROCESSOR_NAME, type NamedFlatConfigItem, type NamedOptionsConfig, type NamingConfig, type NamingSelector, type OptionsComponentExtensions, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFilesTypeAware, type OptionsFormatters, type OptionsHasRoblox, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsJest, type OptionsOverrides, type OptionsOverridesTypeAware, type OptionsPnpm, type OptionsProjectType, type OptionsStylistic, type OptionsTestFramework, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsVitest, type OxfmtOptions, type PerfectionistConfig, type PrettierOptions, type ProjectStructureConfig, ROBLOX_ALLOWED_WORDS, type ReactConfig, type ReactSettings, type Rules, type SpellCheckConfig, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores$1 as ignores, imports, isAgentAutofixDisabled, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, loadSmallRulesPlugin, markdown, naming, node, oxfmt, packageJson, perfectionist, pnpm, projectStructure, promise, react, roblox$1 as roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic$1 as stylistic, test, toml, typescript, unicorn, yaml };
|
|
28615
|
+
export { type Awaitable, type ConfigNames, type ConfigSettings, type FlatConfigComposer, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BIN, GLOB_BUILD_CONFIGS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LINTABLE_EXTENSIONS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_PACKAGE_JSON, GLOB_PACKAGE_JSON_ROOT, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_SRC_EXTENSIONS, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_TYPE_TESTS, GLOB_XML, GLOB_YAML, GitignoreOptions, type JsdocOptions, MARKDOWN_PROCESSOR_NAME, type NamedFlatConfigItem, type NamedOptionsConfig, type NamingConfig, type NamingSelector, type OptionsComponentExtensions, type OptionsConfig, type OptionsE18e, type OptionsFiles, type OptionsFilesTypeAware, type OptionsFormatters, type OptionsHasRoblox, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsJest, type OptionsOverrides, type OptionsOverridesTypeAware, type OptionsPnpm, type OptionsProjectType, type OptionsStylistic, type OptionsTestFramework, type OptionsTypeScriptErasableOnly, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsVitest, type OxfmtOptions, type PerfectionistConfig, type PrettierOptions, type ProjectStructureConfig, ROBLOX_ALLOWED_WORDS, type ReactConfig, type ReactSettings, type Rules, type SpellCheckConfig, type StylisticConfig, StylisticConfigDefaults, type TypedFlatConfigItem, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore$1 as gitignore, ignores$1 as ignores, imports, isAgentAutofixDisabled, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, loadSmallRulesPlugin, markdown, naming, node, oxfmt, packageJson, perfectionist, pnpm, projectStructure, promise, react, roblox$1 as roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic$1 as stylistic, test, toml, typescript, unicorn, yaml };
|