@anolilab/eslint-config 16.0.1 → 16.1.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/CHANGELOG.md +18 -0
- package/README.md +173 -97
- package/dist/index.cjs +11 -9
- package/dist/index.d.cts +55 -2
- package/dist/index.d.mts +55 -2
- package/dist/index.d.ts +55 -2
- package/dist/index.mjs +11 -9
- package/dist/packem_shared/getFilesGlobs-BbIYwP6s.mjs +1 -0
- package/dist/packem_shared/getFilesGlobs-llCT-8Ra.cjs +1 -0
- package/package.json +5 -2
package/dist/index.d.cts
CHANGED
|
@@ -3254,6 +3254,22 @@ interface RuleOptions {
|
|
|
3254
3254
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
3255
3255
|
*/
|
|
3256
3256
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
3257
|
+
/**
|
|
3258
|
+
* Prevent JSX as JSX prop value
|
|
3259
|
+
*/
|
|
3260
|
+
'react-perf/jsx-no-jsx-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoJsxAsProp>
|
|
3261
|
+
/**
|
|
3262
|
+
* Prevent [...] as JSX prop value
|
|
3263
|
+
*/
|
|
3264
|
+
'react-perf/jsx-no-new-array-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewArrayAsProp>
|
|
3265
|
+
/**
|
|
3266
|
+
* Prevent `function` as JSX prop value
|
|
3267
|
+
*/
|
|
3268
|
+
'react-perf/jsx-no-new-function-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewFunctionAsProp>
|
|
3269
|
+
/**
|
|
3270
|
+
* Prevent {...} as JSX prop value
|
|
3271
|
+
*/
|
|
3272
|
+
'react-perf/jsx-no-new-object-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewObjectAsProp>
|
|
3257
3273
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
3258
3274
|
/**
|
|
3259
3275
|
* Prevents leaked `addEventListener` in a component or custom Hook.
|
|
@@ -3585,6 +3601,11 @@ interface RuleOptions {
|
|
|
3585
3601
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3586
3602
|
*/
|
|
3587
3603
|
'react-x/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3604
|
+
/**
|
|
3605
|
+
* Catch unnecessary React useEffect hooks.
|
|
3606
|
+
* @see https://react.dev/learn/you-might-not-need-an-effect
|
|
3607
|
+
*/
|
|
3608
|
+
'react-you-might-not-need-an-effect/you-might-not-need-an-effect'?: Linter.RuleEntry<[]>
|
|
3588
3609
|
/**
|
|
3589
3610
|
* Enforces consistent naming for boolean props
|
|
3590
3611
|
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
|
|
@@ -14519,6 +14540,22 @@ type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
|
|
|
14519
14540
|
extensions?: string[]
|
|
14520
14541
|
ignoreFilesWithoutCode?: boolean
|
|
14521
14542
|
})]
|
|
14543
|
+
// ----- react-perf/jsx-no-jsx-as-prop -----
|
|
14544
|
+
type ReactPerfJsxNoJsxAsProp = []|[{
|
|
14545
|
+
nativeAllowList?: ("all" | string[])
|
|
14546
|
+
}]
|
|
14547
|
+
// ----- react-perf/jsx-no-new-array-as-prop -----
|
|
14548
|
+
type ReactPerfJsxNoNewArrayAsProp = []|[{
|
|
14549
|
+
nativeAllowList?: ("all" | string[])
|
|
14550
|
+
}]
|
|
14551
|
+
// ----- react-perf/jsx-no-new-function-as-prop -----
|
|
14552
|
+
type ReactPerfJsxNoNewFunctionAsProp = []|[{
|
|
14553
|
+
nativeAllowList?: ("all" | string[])
|
|
14554
|
+
}]
|
|
14555
|
+
// ----- react-perf/jsx-no-new-object-as-prop -----
|
|
14556
|
+
type ReactPerfJsxNoNewObjectAsProp = []|[{
|
|
14557
|
+
nativeAllowList?: ("all" | string[])
|
|
14558
|
+
}]
|
|
14522
14559
|
// ----- react-refresh/only-export-components -----
|
|
14523
14560
|
type ReactRefreshOnlyExportComponents = []|[{
|
|
14524
14561
|
allowExportNames?: string[]
|
|
@@ -16197,7 +16234,7 @@ type ZodRequireStrict = []|[{
|
|
|
16197
16234
|
allowPassthrough?: boolean
|
|
16198
16235
|
}]
|
|
16199
16236
|
// Names of all the configs
|
|
16200
|
-
type ConfigNames = 'anolilab/antfu' | 'anolilab/astro/setup' | 'anolilab/astro/rules' | 'anolilab/best-practices/rules' | 'anolilab/best-practices/ts-rules' | 'compat/flat/recommended' | 'anolilab/errors/rules' | 'anolilab/errors/ts-rules' | 'anolilab/html/setup' | 'anolilab/no-secrets' | 'anolilab/no-unsanitized/setup' | 'anolilab/promise/rules' | 'anolilab/simple-import-sort' | 'anolilab/sonarjs/plugin' | 'anolilab/sonarjs/rules' | 'anolilab/sonarjs/js-and-ts-rules' | 'anolilab/sonarjs/js-rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'anolilab/validate-jsx-nesting/setup' | 'anolilab/variables/rules' | 'anolilab/variables/ts-rules' | 'anolilab/style/rules' | 'anolilab/style/ts-rules' | 'anolilab/eslint-comments/rules' | 'anolilab/formatter/setup' | 'anolilab/imports/setup' | 'anolilab/imports/rules' | 'anolilab/imports/d.ts-rules' | 'anolilab/javascript/setup' | 'anolilab/jsx-a11y/setup' | 'anolilab/jsdoc/setup' | 'anolilab/jsdoc/js-rules' | 'anolilab/jsonc/json5-rules' | 'anolilab/jsonc/jsonc-rules' | 'anolilab/jsonc/json-rules' | 'anolilab/jsonc/package.json-rules' | 'anolilab/jsonc/tsconfig-json' | 'anolilab/markdown/setup' | 'anolilab/markdown/processor' | 'anolilab/markdown/parser' | 'anolilab/markdown/disables' | 'anolilab/perfectionist/setup' | 'anolilab/perfectionist/rules' | 'anolilab/perfectionist/typescript' | 'anolilab/perfectionist/postcss' | 'anolilab/react/setup' | 'anolilab/react/rules' | 'anolilab/react/jsx' | 'anolilab/react/tsx' | 'anolilab/react/storybook' | 'anolilab/node/setup' | 'anolilab/node/rules' | 'anolilab/stylistic/rules' | 'anolilab/vitest/setup' | 'anolilab/vitest/rules' | 'anolilab/toml' | 'anolilab/regexp/rules' | 'anolilab/typescript/setup' | 'anolilab/typescript/parser' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/strict' | '
|
|
16237
|
+
type ConfigNames = 'anolilab/antfu' | 'anolilab/astro/setup' | 'anolilab/astro/rules' | 'anolilab/best-practices/rules' | 'anolilab/best-practices/ts-rules' | 'compat/flat/recommended' | 'anolilab/errors/rules' | 'anolilab/errors/ts-rules' | 'anolilab/html/setup' | 'anolilab/no-secrets' | 'anolilab/no-unsanitized/setup' | 'anolilab/promise/rules' | 'anolilab/simple-import-sort' | 'anolilab/sonarjs/plugin' | 'anolilab/sonarjs/rules' | 'anolilab/sonarjs/js-and-ts-rules' | 'anolilab/sonarjs/js-rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'anolilab/validate-jsx-nesting/setup' | 'anolilab/variables/rules' | 'anolilab/variables/ts-rules' | 'anolilab/style/rules' | 'anolilab/style/ts-rules' | 'anolilab/eslint-comments/rules' | 'anolilab/formatter/setup' | 'anolilab/imports/setup' | 'anolilab/imports/rules' | 'anolilab/imports/d.ts-rules' | 'anolilab/javascript/setup' | 'anolilab/jsx-a11y/setup' | 'anolilab/jsdoc/setup' | 'anolilab/jsdoc/js-rules' | 'anolilab/jsonc/json5-rules' | 'anolilab/jsonc/jsonc-rules' | 'anolilab/jsonc/json-rules' | 'anolilab/jsonc/package.json-rules' | 'anolilab/jsonc/tsconfig-json' | 'anolilab/markdown/setup' | 'anolilab/markdown/processor' | 'anolilab/markdown/parser' | 'anolilab/markdown/disables' | 'anolilab/perfectionist/setup' | 'anolilab/perfectionist/rules' | 'anolilab/perfectionist/typescript' | 'anolilab/perfectionist/postcss' | 'anolilab/react/setup' | 'anolilab/react/rules' | 'anolilab/react/jsx' | 'anolilab/react/tsx' | 'anolilab/react/storybook' | 'anolilab/node/setup' | 'anolilab/node/rules' | 'anolilab/stylistic/rules' | 'anolilab/vitest/setup' | 'anolilab/vitest/rules' | 'anolilab/toml' | 'anolilab/regexp/rules' | 'anolilab/typescript/setup' | 'anolilab/typescript/parser' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/strict' | 'anolilab/typescript/rules' | 'anolilab/unicorn/plugin' | 'anolilab/unicorn/rules' | 'anolilab/unicorn/tsconfig-overrides' | 'anolilab/unicorn/ts-overrides' | 'anolilab/unocss' | 'anolilab/yaml' | 'anolilab/yaml/pnpm-workspace'
|
|
16201
16238
|
|
|
16202
16239
|
type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
|
|
16203
16240
|
interface VendoredPrettierOptionsRequired {
|
|
@@ -16284,6 +16321,7 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16284
16321
|
playwright?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16285
16322
|
promise?: OptionsFiles & OptionsOverrides;
|
|
16286
16323
|
react?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16324
|
+
reactCompiler?: boolean;
|
|
16287
16325
|
regexp?: boolean | (OptionsFiles & OptionsOverrides & OptionsRegExp);
|
|
16288
16326
|
simpleImportSort?: OptionsFiles & OptionsOverrides;
|
|
16289
16327
|
sonarjs?: OptionsFiles & OptionsOverrides;
|
|
@@ -16303,6 +16341,9 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16303
16341
|
yaml?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16304
16342
|
zod?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16305
16343
|
}
|
|
16344
|
+
interface OptionsCwd {
|
|
16345
|
+
cwd: string;
|
|
16346
|
+
}
|
|
16306
16347
|
interface OptionsFiles {
|
|
16307
16348
|
files?: string[];
|
|
16308
16349
|
}
|
|
@@ -16325,6 +16366,12 @@ interface OptionsFormatters {
|
|
|
16325
16366
|
svg?: boolean | "prettier";
|
|
16326
16367
|
xml?: boolean | "prettier";
|
|
16327
16368
|
}
|
|
16369
|
+
interface OptionsHasPrettier {
|
|
16370
|
+
prettier?: boolean;
|
|
16371
|
+
}
|
|
16372
|
+
interface OptionsIsInEditor {
|
|
16373
|
+
isInEditor?: boolean;
|
|
16374
|
+
}
|
|
16328
16375
|
interface OptionsOverrides {
|
|
16329
16376
|
overrides?: TypedFlatConfigItem["rules"];
|
|
16330
16377
|
}
|
|
@@ -16337,6 +16384,9 @@ interface OptionsRegExp {
|
|
|
16337
16384
|
interface OptionsSilentConsoleLogs {
|
|
16338
16385
|
silent?: boolean;
|
|
16339
16386
|
}
|
|
16387
|
+
interface OptionsStylistic {
|
|
16388
|
+
stylistic?: StylisticConfig | boolean;
|
|
16389
|
+
}
|
|
16340
16390
|
type OptionsTypescript = (OptionsOverrides & OptionsTypeScriptParserOptions) | (OptionsOverrides & OptionsTypeScriptWithTypes);
|
|
16341
16391
|
interface OptionsTypeScriptParserOptions {
|
|
16342
16392
|
filesTypeAware?: string[];
|
|
@@ -16361,10 +16411,13 @@ type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plug
|
|
|
16361
16411
|
plugins?: Record<string, any>;
|
|
16362
16412
|
};
|
|
16363
16413
|
|
|
16414
|
+
type FileType = "all" | "astro_ts" | "astro" | "css" | "d.ts" | "e2e" | "graphql" | "html" | "js_and_ts" | "js" | "jsx_and_tsx" | "less" | "markdown_in_markdown" | "markdown_inline_js_jsx" | "markdown" | "postcss" | "scss" | "storybook" | "svg" | "toml" | "ts" | "vitest" | "xml" | "yaml";
|
|
16415
|
+
declare const getFilesGlobs: (fileType: FileType) => string[];
|
|
16416
|
+
|
|
16364
16417
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
16365
16418
|
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
16366
16419
|
declare const getOverrides: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => Partial<Linter.RulesRecord & RuleOptions>;
|
|
16367
16420
|
declare const getFiles: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => string[] | undefined;
|
|
16368
16421
|
declare const createConfig: (options?: Omit<TypedFlatConfigItem, "files"> & OptionsConfig, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
16369
16422
|
|
|
16370
|
-
export { type ResolvedOptions, createConfig, getFiles, getOverrides, resolveSubOptions };
|
|
16423
|
+
export { type Awaitable, type ConfigNames, type OptionsComponentExtensions, type OptionsConfig, type OptionsCwd, type OptionsFiles, type OptionsFormatters, type OptionsHasPrettier, type OptionsIsInEditor, type OptionsOverrides, type OptionsPackageJson, type OptionsRegExp, type OptionsSilentConsoleLogs, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type ResolvedOptions, type Rules, type StylisticConfig, type TypedFlatConfigItem, createConfig, getFiles, getFilesGlobs, getOverrides, resolveSubOptions };
|
package/dist/index.d.mts
CHANGED
|
@@ -3254,6 +3254,22 @@ interface RuleOptions {
|
|
|
3254
3254
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
3255
3255
|
*/
|
|
3256
3256
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
3257
|
+
/**
|
|
3258
|
+
* Prevent JSX as JSX prop value
|
|
3259
|
+
*/
|
|
3260
|
+
'react-perf/jsx-no-jsx-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoJsxAsProp>
|
|
3261
|
+
/**
|
|
3262
|
+
* Prevent [...] as JSX prop value
|
|
3263
|
+
*/
|
|
3264
|
+
'react-perf/jsx-no-new-array-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewArrayAsProp>
|
|
3265
|
+
/**
|
|
3266
|
+
* Prevent `function` as JSX prop value
|
|
3267
|
+
*/
|
|
3268
|
+
'react-perf/jsx-no-new-function-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewFunctionAsProp>
|
|
3269
|
+
/**
|
|
3270
|
+
* Prevent {...} as JSX prop value
|
|
3271
|
+
*/
|
|
3272
|
+
'react-perf/jsx-no-new-object-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewObjectAsProp>
|
|
3257
3273
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
3258
3274
|
/**
|
|
3259
3275
|
* Prevents leaked `addEventListener` in a component or custom Hook.
|
|
@@ -3585,6 +3601,11 @@ interface RuleOptions {
|
|
|
3585
3601
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3586
3602
|
*/
|
|
3587
3603
|
'react-x/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3604
|
+
/**
|
|
3605
|
+
* Catch unnecessary React useEffect hooks.
|
|
3606
|
+
* @see https://react.dev/learn/you-might-not-need-an-effect
|
|
3607
|
+
*/
|
|
3608
|
+
'react-you-might-not-need-an-effect/you-might-not-need-an-effect'?: Linter.RuleEntry<[]>
|
|
3588
3609
|
/**
|
|
3589
3610
|
* Enforces consistent naming for boolean props
|
|
3590
3611
|
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
|
|
@@ -14519,6 +14540,22 @@ type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
|
|
|
14519
14540
|
extensions?: string[]
|
|
14520
14541
|
ignoreFilesWithoutCode?: boolean
|
|
14521
14542
|
})]
|
|
14543
|
+
// ----- react-perf/jsx-no-jsx-as-prop -----
|
|
14544
|
+
type ReactPerfJsxNoJsxAsProp = []|[{
|
|
14545
|
+
nativeAllowList?: ("all" | string[])
|
|
14546
|
+
}]
|
|
14547
|
+
// ----- react-perf/jsx-no-new-array-as-prop -----
|
|
14548
|
+
type ReactPerfJsxNoNewArrayAsProp = []|[{
|
|
14549
|
+
nativeAllowList?: ("all" | string[])
|
|
14550
|
+
}]
|
|
14551
|
+
// ----- react-perf/jsx-no-new-function-as-prop -----
|
|
14552
|
+
type ReactPerfJsxNoNewFunctionAsProp = []|[{
|
|
14553
|
+
nativeAllowList?: ("all" | string[])
|
|
14554
|
+
}]
|
|
14555
|
+
// ----- react-perf/jsx-no-new-object-as-prop -----
|
|
14556
|
+
type ReactPerfJsxNoNewObjectAsProp = []|[{
|
|
14557
|
+
nativeAllowList?: ("all" | string[])
|
|
14558
|
+
}]
|
|
14522
14559
|
// ----- react-refresh/only-export-components -----
|
|
14523
14560
|
type ReactRefreshOnlyExportComponents = []|[{
|
|
14524
14561
|
allowExportNames?: string[]
|
|
@@ -16197,7 +16234,7 @@ type ZodRequireStrict = []|[{
|
|
|
16197
16234
|
allowPassthrough?: boolean
|
|
16198
16235
|
}]
|
|
16199
16236
|
// Names of all the configs
|
|
16200
|
-
type ConfigNames = 'anolilab/antfu' | 'anolilab/astro/setup' | 'anolilab/astro/rules' | 'anolilab/best-practices/rules' | 'anolilab/best-practices/ts-rules' | 'compat/flat/recommended' | 'anolilab/errors/rules' | 'anolilab/errors/ts-rules' | 'anolilab/html/setup' | 'anolilab/no-secrets' | 'anolilab/no-unsanitized/setup' | 'anolilab/promise/rules' | 'anolilab/simple-import-sort' | 'anolilab/sonarjs/plugin' | 'anolilab/sonarjs/rules' | 'anolilab/sonarjs/js-and-ts-rules' | 'anolilab/sonarjs/js-rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'anolilab/validate-jsx-nesting/setup' | 'anolilab/variables/rules' | 'anolilab/variables/ts-rules' | 'anolilab/style/rules' | 'anolilab/style/ts-rules' | 'anolilab/eslint-comments/rules' | 'anolilab/formatter/setup' | 'anolilab/imports/setup' | 'anolilab/imports/rules' | 'anolilab/imports/d.ts-rules' | 'anolilab/javascript/setup' | 'anolilab/jsx-a11y/setup' | 'anolilab/jsdoc/setup' | 'anolilab/jsdoc/js-rules' | 'anolilab/jsonc/json5-rules' | 'anolilab/jsonc/jsonc-rules' | 'anolilab/jsonc/json-rules' | 'anolilab/jsonc/package.json-rules' | 'anolilab/jsonc/tsconfig-json' | 'anolilab/markdown/setup' | 'anolilab/markdown/processor' | 'anolilab/markdown/parser' | 'anolilab/markdown/disables' | 'anolilab/perfectionist/setup' | 'anolilab/perfectionist/rules' | 'anolilab/perfectionist/typescript' | 'anolilab/perfectionist/postcss' | 'anolilab/react/setup' | 'anolilab/react/rules' | 'anolilab/react/jsx' | 'anolilab/react/tsx' | 'anolilab/react/storybook' | 'anolilab/node/setup' | 'anolilab/node/rules' | 'anolilab/stylistic/rules' | 'anolilab/vitest/setup' | 'anolilab/vitest/rules' | 'anolilab/toml' | 'anolilab/regexp/rules' | 'anolilab/typescript/setup' | 'anolilab/typescript/parser' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/strict' | '
|
|
16237
|
+
type ConfigNames = 'anolilab/antfu' | 'anolilab/astro/setup' | 'anolilab/astro/rules' | 'anolilab/best-practices/rules' | 'anolilab/best-practices/ts-rules' | 'compat/flat/recommended' | 'anolilab/errors/rules' | 'anolilab/errors/ts-rules' | 'anolilab/html/setup' | 'anolilab/no-secrets' | 'anolilab/no-unsanitized/setup' | 'anolilab/promise/rules' | 'anolilab/simple-import-sort' | 'anolilab/sonarjs/plugin' | 'anolilab/sonarjs/rules' | 'anolilab/sonarjs/js-and-ts-rules' | 'anolilab/sonarjs/js-rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'anolilab/validate-jsx-nesting/setup' | 'anolilab/variables/rules' | 'anolilab/variables/ts-rules' | 'anolilab/style/rules' | 'anolilab/style/ts-rules' | 'anolilab/eslint-comments/rules' | 'anolilab/formatter/setup' | 'anolilab/imports/setup' | 'anolilab/imports/rules' | 'anolilab/imports/d.ts-rules' | 'anolilab/javascript/setup' | 'anolilab/jsx-a11y/setup' | 'anolilab/jsdoc/setup' | 'anolilab/jsdoc/js-rules' | 'anolilab/jsonc/json5-rules' | 'anolilab/jsonc/jsonc-rules' | 'anolilab/jsonc/json-rules' | 'anolilab/jsonc/package.json-rules' | 'anolilab/jsonc/tsconfig-json' | 'anolilab/markdown/setup' | 'anolilab/markdown/processor' | 'anolilab/markdown/parser' | 'anolilab/markdown/disables' | 'anolilab/perfectionist/setup' | 'anolilab/perfectionist/rules' | 'anolilab/perfectionist/typescript' | 'anolilab/perfectionist/postcss' | 'anolilab/react/setup' | 'anolilab/react/rules' | 'anolilab/react/jsx' | 'anolilab/react/tsx' | 'anolilab/react/storybook' | 'anolilab/node/setup' | 'anolilab/node/rules' | 'anolilab/stylistic/rules' | 'anolilab/vitest/setup' | 'anolilab/vitest/rules' | 'anolilab/toml' | 'anolilab/regexp/rules' | 'anolilab/typescript/setup' | 'anolilab/typescript/parser' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/strict' | 'anolilab/typescript/rules' | 'anolilab/unicorn/plugin' | 'anolilab/unicorn/rules' | 'anolilab/unicorn/tsconfig-overrides' | 'anolilab/unicorn/ts-overrides' | 'anolilab/unocss' | 'anolilab/yaml' | 'anolilab/yaml/pnpm-workspace'
|
|
16201
16238
|
|
|
16202
16239
|
type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
|
|
16203
16240
|
interface VendoredPrettierOptionsRequired {
|
|
@@ -16284,6 +16321,7 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16284
16321
|
playwright?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16285
16322
|
promise?: OptionsFiles & OptionsOverrides;
|
|
16286
16323
|
react?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16324
|
+
reactCompiler?: boolean;
|
|
16287
16325
|
regexp?: boolean | (OptionsFiles & OptionsOverrides & OptionsRegExp);
|
|
16288
16326
|
simpleImportSort?: OptionsFiles & OptionsOverrides;
|
|
16289
16327
|
sonarjs?: OptionsFiles & OptionsOverrides;
|
|
@@ -16303,6 +16341,9 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16303
16341
|
yaml?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16304
16342
|
zod?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16305
16343
|
}
|
|
16344
|
+
interface OptionsCwd {
|
|
16345
|
+
cwd: string;
|
|
16346
|
+
}
|
|
16306
16347
|
interface OptionsFiles {
|
|
16307
16348
|
files?: string[];
|
|
16308
16349
|
}
|
|
@@ -16325,6 +16366,12 @@ interface OptionsFormatters {
|
|
|
16325
16366
|
svg?: boolean | "prettier";
|
|
16326
16367
|
xml?: boolean | "prettier";
|
|
16327
16368
|
}
|
|
16369
|
+
interface OptionsHasPrettier {
|
|
16370
|
+
prettier?: boolean;
|
|
16371
|
+
}
|
|
16372
|
+
interface OptionsIsInEditor {
|
|
16373
|
+
isInEditor?: boolean;
|
|
16374
|
+
}
|
|
16328
16375
|
interface OptionsOverrides {
|
|
16329
16376
|
overrides?: TypedFlatConfigItem["rules"];
|
|
16330
16377
|
}
|
|
@@ -16337,6 +16384,9 @@ interface OptionsRegExp {
|
|
|
16337
16384
|
interface OptionsSilentConsoleLogs {
|
|
16338
16385
|
silent?: boolean;
|
|
16339
16386
|
}
|
|
16387
|
+
interface OptionsStylistic {
|
|
16388
|
+
stylistic?: StylisticConfig | boolean;
|
|
16389
|
+
}
|
|
16340
16390
|
type OptionsTypescript = (OptionsOverrides & OptionsTypeScriptParserOptions) | (OptionsOverrides & OptionsTypeScriptWithTypes);
|
|
16341
16391
|
interface OptionsTypeScriptParserOptions {
|
|
16342
16392
|
filesTypeAware?: string[];
|
|
@@ -16361,10 +16411,13 @@ type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plug
|
|
|
16361
16411
|
plugins?: Record<string, any>;
|
|
16362
16412
|
};
|
|
16363
16413
|
|
|
16414
|
+
type FileType = "all" | "astro_ts" | "astro" | "css" | "d.ts" | "e2e" | "graphql" | "html" | "js_and_ts" | "js" | "jsx_and_tsx" | "less" | "markdown_in_markdown" | "markdown_inline_js_jsx" | "markdown" | "postcss" | "scss" | "storybook" | "svg" | "toml" | "ts" | "vitest" | "xml" | "yaml";
|
|
16415
|
+
declare const getFilesGlobs: (fileType: FileType) => string[];
|
|
16416
|
+
|
|
16364
16417
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
16365
16418
|
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
16366
16419
|
declare const getOverrides: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => Partial<Linter.RulesRecord & RuleOptions>;
|
|
16367
16420
|
declare const getFiles: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => string[] | undefined;
|
|
16368
16421
|
declare const createConfig: (options?: Omit<TypedFlatConfigItem, "files"> & OptionsConfig, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
16369
16422
|
|
|
16370
|
-
export { type ResolvedOptions, createConfig, getFiles, getOverrides, resolveSubOptions };
|
|
16423
|
+
export { type Awaitable, type ConfigNames, type OptionsComponentExtensions, type OptionsConfig, type OptionsCwd, type OptionsFiles, type OptionsFormatters, type OptionsHasPrettier, type OptionsIsInEditor, type OptionsOverrides, type OptionsPackageJson, type OptionsRegExp, type OptionsSilentConsoleLogs, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type ResolvedOptions, type Rules, type StylisticConfig, type TypedFlatConfigItem, createConfig, getFiles, getFilesGlobs, getOverrides, resolveSubOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -3254,6 +3254,22 @@ interface RuleOptions {
|
|
|
3254
3254
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
3255
3255
|
*/
|
|
3256
3256
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
3257
|
+
/**
|
|
3258
|
+
* Prevent JSX as JSX prop value
|
|
3259
|
+
*/
|
|
3260
|
+
'react-perf/jsx-no-jsx-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoJsxAsProp>
|
|
3261
|
+
/**
|
|
3262
|
+
* Prevent [...] as JSX prop value
|
|
3263
|
+
*/
|
|
3264
|
+
'react-perf/jsx-no-new-array-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewArrayAsProp>
|
|
3265
|
+
/**
|
|
3266
|
+
* Prevent `function` as JSX prop value
|
|
3267
|
+
*/
|
|
3268
|
+
'react-perf/jsx-no-new-function-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewFunctionAsProp>
|
|
3269
|
+
/**
|
|
3270
|
+
* Prevent {...} as JSX prop value
|
|
3271
|
+
*/
|
|
3272
|
+
'react-perf/jsx-no-new-object-as-prop'?: Linter.RuleEntry<ReactPerfJsxNoNewObjectAsProp>
|
|
3257
3273
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
3258
3274
|
/**
|
|
3259
3275
|
* Prevents leaked `addEventListener` in a component or custom Hook.
|
|
@@ -3585,6 +3601,11 @@ interface RuleOptions {
|
|
|
3585
3601
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3586
3602
|
*/
|
|
3587
3603
|
'react-x/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3604
|
+
/**
|
|
3605
|
+
* Catch unnecessary React useEffect hooks.
|
|
3606
|
+
* @see https://react.dev/learn/you-might-not-need-an-effect
|
|
3607
|
+
*/
|
|
3608
|
+
'react-you-might-not-need-an-effect/you-might-not-need-an-effect'?: Linter.RuleEntry<[]>
|
|
3588
3609
|
/**
|
|
3589
3610
|
* Enforces consistent naming for boolean props
|
|
3590
3611
|
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
|
|
@@ -14519,6 +14540,22 @@ type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
|
|
|
14519
14540
|
extensions?: string[]
|
|
14520
14541
|
ignoreFilesWithoutCode?: boolean
|
|
14521
14542
|
})]
|
|
14543
|
+
// ----- react-perf/jsx-no-jsx-as-prop -----
|
|
14544
|
+
type ReactPerfJsxNoJsxAsProp = []|[{
|
|
14545
|
+
nativeAllowList?: ("all" | string[])
|
|
14546
|
+
}]
|
|
14547
|
+
// ----- react-perf/jsx-no-new-array-as-prop -----
|
|
14548
|
+
type ReactPerfJsxNoNewArrayAsProp = []|[{
|
|
14549
|
+
nativeAllowList?: ("all" | string[])
|
|
14550
|
+
}]
|
|
14551
|
+
// ----- react-perf/jsx-no-new-function-as-prop -----
|
|
14552
|
+
type ReactPerfJsxNoNewFunctionAsProp = []|[{
|
|
14553
|
+
nativeAllowList?: ("all" | string[])
|
|
14554
|
+
}]
|
|
14555
|
+
// ----- react-perf/jsx-no-new-object-as-prop -----
|
|
14556
|
+
type ReactPerfJsxNoNewObjectAsProp = []|[{
|
|
14557
|
+
nativeAllowList?: ("all" | string[])
|
|
14558
|
+
}]
|
|
14522
14559
|
// ----- react-refresh/only-export-components -----
|
|
14523
14560
|
type ReactRefreshOnlyExportComponents = []|[{
|
|
14524
14561
|
allowExportNames?: string[]
|
|
@@ -16197,7 +16234,7 @@ type ZodRequireStrict = []|[{
|
|
|
16197
16234
|
allowPassthrough?: boolean
|
|
16198
16235
|
}]
|
|
16199
16236
|
// Names of all the configs
|
|
16200
|
-
type ConfigNames = 'anolilab/antfu' | 'anolilab/astro/setup' | 'anolilab/astro/rules' | 'anolilab/best-practices/rules' | 'anolilab/best-practices/ts-rules' | 'compat/flat/recommended' | 'anolilab/errors/rules' | 'anolilab/errors/ts-rules' | 'anolilab/html/setup' | 'anolilab/no-secrets' | 'anolilab/no-unsanitized/setup' | 'anolilab/promise/rules' | 'anolilab/simple-import-sort' | 'anolilab/sonarjs/plugin' | 'anolilab/sonarjs/rules' | 'anolilab/sonarjs/js-and-ts-rules' | 'anolilab/sonarjs/js-rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'anolilab/validate-jsx-nesting/setup' | 'anolilab/variables/rules' | 'anolilab/variables/ts-rules' | 'anolilab/style/rules' | 'anolilab/style/ts-rules' | 'anolilab/eslint-comments/rules' | 'anolilab/formatter/setup' | 'anolilab/imports/setup' | 'anolilab/imports/rules' | 'anolilab/imports/d.ts-rules' | 'anolilab/javascript/setup' | 'anolilab/jsx-a11y/setup' | 'anolilab/jsdoc/setup' | 'anolilab/jsdoc/js-rules' | 'anolilab/jsonc/json5-rules' | 'anolilab/jsonc/jsonc-rules' | 'anolilab/jsonc/json-rules' | 'anolilab/jsonc/package.json-rules' | 'anolilab/jsonc/tsconfig-json' | 'anolilab/markdown/setup' | 'anolilab/markdown/processor' | 'anolilab/markdown/parser' | 'anolilab/markdown/disables' | 'anolilab/perfectionist/setup' | 'anolilab/perfectionist/rules' | 'anolilab/perfectionist/typescript' | 'anolilab/perfectionist/postcss' | 'anolilab/react/setup' | 'anolilab/react/rules' | 'anolilab/react/jsx' | 'anolilab/react/tsx' | 'anolilab/react/storybook' | 'anolilab/node/setup' | 'anolilab/node/rules' | 'anolilab/stylistic/rules' | 'anolilab/vitest/setup' | 'anolilab/vitest/rules' | 'anolilab/toml' | 'anolilab/regexp/rules' | 'anolilab/typescript/setup' | 'anolilab/typescript/parser' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/strict' | '
|
|
16237
|
+
type ConfigNames = 'anolilab/antfu' | 'anolilab/astro/setup' | 'anolilab/astro/rules' | 'anolilab/best-practices/rules' | 'anolilab/best-practices/ts-rules' | 'compat/flat/recommended' | 'anolilab/errors/rules' | 'anolilab/errors/ts-rules' | 'anolilab/html/setup' | 'anolilab/no-secrets' | 'anolilab/no-unsanitized/setup' | 'anolilab/promise/rules' | 'anolilab/simple-import-sort' | 'anolilab/sonarjs/plugin' | 'anolilab/sonarjs/rules' | 'anolilab/sonarjs/js-and-ts-rules' | 'anolilab/sonarjs/js-rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'anolilab/validate-jsx-nesting/setup' | 'anolilab/variables/rules' | 'anolilab/variables/ts-rules' | 'anolilab/style/rules' | 'anolilab/style/ts-rules' | 'anolilab/eslint-comments/rules' | 'anolilab/formatter/setup' | 'anolilab/imports/setup' | 'anolilab/imports/rules' | 'anolilab/imports/d.ts-rules' | 'anolilab/javascript/setup' | 'anolilab/jsx-a11y/setup' | 'anolilab/jsdoc/setup' | 'anolilab/jsdoc/js-rules' | 'anolilab/jsonc/json5-rules' | 'anolilab/jsonc/jsonc-rules' | 'anolilab/jsonc/json-rules' | 'anolilab/jsonc/package.json-rules' | 'anolilab/jsonc/tsconfig-json' | 'anolilab/markdown/setup' | 'anolilab/markdown/processor' | 'anolilab/markdown/parser' | 'anolilab/markdown/disables' | 'anolilab/perfectionist/setup' | 'anolilab/perfectionist/rules' | 'anolilab/perfectionist/typescript' | 'anolilab/perfectionist/postcss' | 'anolilab/react/setup' | 'anolilab/react/rules' | 'anolilab/react/jsx' | 'anolilab/react/tsx' | 'anolilab/react/storybook' | 'anolilab/node/setup' | 'anolilab/node/rules' | 'anolilab/stylistic/rules' | 'anolilab/vitest/setup' | 'anolilab/vitest/rules' | 'anolilab/toml' | 'anolilab/regexp/rules' | 'anolilab/typescript/setup' | 'anolilab/typescript/parser' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/strict' | 'anolilab/typescript/rules' | 'anolilab/unicorn/plugin' | 'anolilab/unicorn/rules' | 'anolilab/unicorn/tsconfig-overrides' | 'anolilab/unicorn/ts-overrides' | 'anolilab/unocss' | 'anolilab/yaml' | 'anolilab/yaml/pnpm-workspace'
|
|
16201
16238
|
|
|
16202
16239
|
type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
|
|
16203
16240
|
interface VendoredPrettierOptionsRequired {
|
|
@@ -16284,6 +16321,7 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16284
16321
|
playwright?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16285
16322
|
promise?: OptionsFiles & OptionsOverrides;
|
|
16286
16323
|
react?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16324
|
+
reactCompiler?: boolean;
|
|
16287
16325
|
regexp?: boolean | (OptionsFiles & OptionsOverrides & OptionsRegExp);
|
|
16288
16326
|
simpleImportSort?: OptionsFiles & OptionsOverrides;
|
|
16289
16327
|
sonarjs?: OptionsFiles & OptionsOverrides;
|
|
@@ -16303,6 +16341,9 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
16303
16341
|
yaml?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16304
16342
|
zod?: boolean | (OptionsFiles & OptionsOverrides);
|
|
16305
16343
|
}
|
|
16344
|
+
interface OptionsCwd {
|
|
16345
|
+
cwd: string;
|
|
16346
|
+
}
|
|
16306
16347
|
interface OptionsFiles {
|
|
16307
16348
|
files?: string[];
|
|
16308
16349
|
}
|
|
@@ -16325,6 +16366,12 @@ interface OptionsFormatters {
|
|
|
16325
16366
|
svg?: boolean | "prettier";
|
|
16326
16367
|
xml?: boolean | "prettier";
|
|
16327
16368
|
}
|
|
16369
|
+
interface OptionsHasPrettier {
|
|
16370
|
+
prettier?: boolean;
|
|
16371
|
+
}
|
|
16372
|
+
interface OptionsIsInEditor {
|
|
16373
|
+
isInEditor?: boolean;
|
|
16374
|
+
}
|
|
16328
16375
|
interface OptionsOverrides {
|
|
16329
16376
|
overrides?: TypedFlatConfigItem["rules"];
|
|
16330
16377
|
}
|
|
@@ -16337,6 +16384,9 @@ interface OptionsRegExp {
|
|
|
16337
16384
|
interface OptionsSilentConsoleLogs {
|
|
16338
16385
|
silent?: boolean;
|
|
16339
16386
|
}
|
|
16387
|
+
interface OptionsStylistic {
|
|
16388
|
+
stylistic?: StylisticConfig | boolean;
|
|
16389
|
+
}
|
|
16340
16390
|
type OptionsTypescript = (OptionsOverrides & OptionsTypeScriptParserOptions) | (OptionsOverrides & OptionsTypeScriptWithTypes);
|
|
16341
16391
|
interface OptionsTypeScriptParserOptions {
|
|
16342
16392
|
filesTypeAware?: string[];
|
|
@@ -16361,10 +16411,13 @@ type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plug
|
|
|
16361
16411
|
plugins?: Record<string, any>;
|
|
16362
16412
|
};
|
|
16363
16413
|
|
|
16414
|
+
type FileType = "all" | "astro_ts" | "astro" | "css" | "d.ts" | "e2e" | "graphql" | "html" | "js_and_ts" | "js" | "jsx_and_tsx" | "less" | "markdown_in_markdown" | "markdown_inline_js_jsx" | "markdown" | "postcss" | "scss" | "storybook" | "svg" | "toml" | "ts" | "vitest" | "xml" | "yaml";
|
|
16415
|
+
declare const getFilesGlobs: (fileType: FileType) => string[];
|
|
16416
|
+
|
|
16364
16417
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
16365
16418
|
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
16366
16419
|
declare const getOverrides: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => Partial<Linter.RulesRecord & RuleOptions>;
|
|
16367
16420
|
declare const getFiles: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => string[] | undefined;
|
|
16368
16421
|
declare const createConfig: (options?: Omit<TypedFlatConfigItem, "files"> & OptionsConfig, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
16369
16422
|
|
|
16370
|
-
export { type ResolvedOptions, createConfig, getFiles, getOverrides, resolveSubOptions };
|
|
16423
|
+
export { type Awaitable, type ConfigNames, type OptionsComponentExtensions, type OptionsConfig, type OptionsCwd, type OptionsFiles, type OptionsFormatters, type OptionsHasPrettier, type OptionsIsInEditor, type OptionsOverrides, type OptionsPackageJson, type OptionsRegExp, type OptionsSilentConsoleLogs, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type ResolvedOptions, type Rules, type StylisticConfig, type TypedFlatConfigItem, createConfig, getFiles, getFilesGlobs, getOverrides, resolveSubOptions };
|