@anolilab/eslint-config 16.0.0 → 16.1.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/CHANGELOG.md +16 -0
- package/README.md +75 -0
- package/dist/index.cjs +10 -8
- package/dist/index.d.cts +42 -1
- package/dist/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- 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 +14 -11
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[]
|
|
@@ -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;
|
|
@@ -16361,10 +16399,13 @@ type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plug
|
|
|
16361
16399
|
plugins?: Record<string, any>;
|
|
16362
16400
|
};
|
|
16363
16401
|
|
|
16402
|
+
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";
|
|
16403
|
+
declare const getFilesGlobs: (fileType: FileType) => string[];
|
|
16404
|
+
|
|
16364
16405
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
16365
16406
|
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
16366
16407
|
declare const getOverrides: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => Partial<Linter.RulesRecord & RuleOptions>;
|
|
16367
16408
|
declare const getFiles: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => string[] | undefined;
|
|
16368
16409
|
declare const createConfig: (options?: Omit<TypedFlatConfigItem, "files"> & OptionsConfig, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
16369
16410
|
|
|
16370
|
-
export { type ResolvedOptions, createConfig, getFiles, getOverrides, resolveSubOptions };
|
|
16411
|
+
export { type ResolvedOptions, 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[]
|
|
@@ -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;
|
|
@@ -16361,10 +16399,13 @@ type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plug
|
|
|
16361
16399
|
plugins?: Record<string, any>;
|
|
16362
16400
|
};
|
|
16363
16401
|
|
|
16402
|
+
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";
|
|
16403
|
+
declare const getFilesGlobs: (fileType: FileType) => string[];
|
|
16404
|
+
|
|
16364
16405
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
16365
16406
|
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
16366
16407
|
declare const getOverrides: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => Partial<Linter.RulesRecord & RuleOptions>;
|
|
16367
16408
|
declare const getFiles: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => string[] | undefined;
|
|
16368
16409
|
declare const createConfig: (options?: Omit<TypedFlatConfigItem, "files"> & OptionsConfig, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
16369
16410
|
|
|
16370
|
-
export { type ResolvedOptions, createConfig, getFiles, getOverrides, resolveSubOptions };
|
|
16411
|
+
export { type ResolvedOptions, 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[]
|
|
@@ -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;
|
|
@@ -16361,10 +16399,13 @@ type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plug
|
|
|
16361
16399
|
plugins?: Record<string, any>;
|
|
16362
16400
|
};
|
|
16363
16401
|
|
|
16402
|
+
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";
|
|
16403
|
+
declare const getFilesGlobs: (fileType: FileType) => string[];
|
|
16404
|
+
|
|
16364
16405
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
16365
16406
|
declare const resolveSubOptions: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => ResolvedOptions<OptionsConfig[K]>;
|
|
16366
16407
|
declare const getOverrides: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => Partial<Linter.RulesRecord & RuleOptions>;
|
|
16367
16408
|
declare const getFiles: <K extends keyof OptionsConfig>(options: OptionsConfig, key: K) => string[] | undefined;
|
|
16368
16409
|
declare const createConfig: (options?: Omit<TypedFlatConfigItem, "files"> & OptionsConfig, ...userConfigs: Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>[]) => Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
16369
16410
|
|
|
16370
|
-
export { type ResolvedOptions, createConfig, getFiles, getOverrides, resolveSubOptions };
|
|
16411
|
+
export { type ResolvedOptions, createConfig, getFiles, getFilesGlobs, getOverrides, resolveSubOptions };
|