@open-xchange/linter-presets 0.8.2 → 0.8.3
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 +4 -0
- package/dist/eslint/config/base.d.ts +2 -2
- package/dist/eslint/config/directives.d.ts +2 -2
- package/dist/eslint/config/imports.d.ts +2 -2
- package/dist/eslint/config/js.d.ts +2 -2
- package/dist/eslint/config/jsdoc.d.ts +2 -2
- package/dist/eslint/config/json.d.ts +2 -2
- package/dist/eslint/config/json.js +6 -0
- package/dist/eslint/config/license.d.ts +2 -2
- package/dist/eslint/config/markdown.d.ts +2 -2
- package/dist/eslint/config/promises.d.ts +2 -2
- package/dist/eslint/config/stylistic.d.ts +2 -2
- package/dist/eslint/config/stylistic.js +1 -1
- package/dist/eslint/config/ts.d.ts +2 -2
- package/dist/eslint/config/ts.js +1 -1
- package/dist/eslint/config/yaml.d.ts +2 -2
- package/dist/eslint/env/browser.d.ts +2 -2
- package/dist/eslint/env/codecept.d.ts +2 -2
- package/dist/eslint/env/eslint.d.ts +2 -2
- package/dist/eslint/env/jest.d.ts +2 -2
- package/dist/eslint/env/node.d.ts +2 -2
- package/dist/eslint/env/project.d.ts +2 -2
- package/dist/eslint/env/project.js +1 -1
- package/dist/eslint/env/react.d.ts +2 -2
- package/dist/eslint/env/tsconfig.d.ts +2 -2
- package/dist/eslint/env/vitest.d.ts +2 -2
- package/dist/eslint/index.d.ts +3 -3
- package/dist/eslint/shared/env-utils.d.ts +6 -6
- package/dist/eslint/shared/restricted.d.ts +3 -3
- package/dist/eslint/shared/unittest.d.ts +2 -2
- package/dist/eslint/shared/unittest.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import { type LanguageOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Defines standard module settings and additional rules targeting JavaScript
|
|
@@ -13,4 +13,4 @@ import { type LanguageOptions } from "../shared/env-utils.js";
|
|
|
13
13
|
* @returns
|
|
14
14
|
* An array of configuration objects to be added to the flat configuration.
|
|
15
15
|
*/
|
|
16
|
-
export default function base(options: Required<LanguageOptions>):
|
|
16
|
+
export default function base(options: Required<LanguageOptions>): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Checks inline linter directives.
|
|
4
4
|
*
|
|
@@ -8,4 +8,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
8
8
|
* @returns
|
|
9
9
|
* An array of configuration objects to be added to the flat configuration.
|
|
10
10
|
*/
|
|
11
|
-
export default function directives():
|
|
11
|
+
export default function directives(): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { LanguageOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Adds linter rules for `import` and `export` statements.
|
|
@@ -12,4 +12,4 @@ import type { LanguageOptions } from "../shared/env-utils.js";
|
|
|
12
12
|
* @returns
|
|
13
13
|
* An array of configuration objects to be added to the flat configuration.
|
|
14
14
|
*/
|
|
15
|
-
export default function importConfig(options: Required<LanguageOptions>):
|
|
15
|
+
export default function importConfig(options: Required<LanguageOptions>): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Defines additional standard rules targeting JavaScript but _not_ TypeScript
|
|
4
4
|
* source files.
|
|
@@ -6,4 +6,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
6
6
|
* @returns
|
|
7
7
|
* An array of configuration objects to be added to the flat configuration.
|
|
8
8
|
*/
|
|
9
|
-
export default function js():
|
|
9
|
+
export default function js(): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Checks the JSDoc comments in source files.
|
|
4
4
|
*
|
|
@@ -8,4 +8,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
8
8
|
* @returns
|
|
9
9
|
* An array of configuration objects to be added to the flat configuration.
|
|
10
10
|
*/
|
|
11
|
-
export default function jsdoc():
|
|
11
|
+
export default function jsdoc(): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { StylisticOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Defines standard linting rules for JSON files.
|
|
@@ -12,4 +12,4 @@ import type { StylisticOptions } from "../shared/env-utils.js";
|
|
|
12
12
|
* @returns
|
|
13
13
|
* An array of configuration objects to be added to the flat configuration.
|
|
14
14
|
*/
|
|
15
|
-
export default function json(options: Required<StylisticOptions>):
|
|
15
|
+
export default function json(options: Required<StylisticOptions>): Linter.Config[];
|
|
@@ -27,6 +27,12 @@ export default function json(options) {
|
|
|
27
27
|
"jsonc/no-octal-escape": "error",
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
32
|
+
rules: {
|
|
33
|
+
"jsonc/no-comments": "off",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
30
36
|
];
|
|
31
37
|
// add missing "files" property in configurations with rules (otherwise, plugin conflicts with "@eslint/markdown")
|
|
32
38
|
const files = configs.find(config => config.files)?.files;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Checks the existence of license headers in source files.
|
|
4
4
|
*
|
|
@@ -11,4 +11,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
11
11
|
* @returns
|
|
12
12
|
* An array of configuration objects to be added to the flat configuration.
|
|
13
13
|
*/
|
|
14
|
-
export default function license(path: string):
|
|
14
|
+
export default function license(path: string): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Defines standard linting rules for Markdown files.
|
|
4
4
|
*
|
|
@@ -8,4 +8,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
8
8
|
* @returns
|
|
9
9
|
* An array of configuration objects to be added to the flat configuration.
|
|
10
10
|
*/
|
|
11
|
-
export default function markdown():
|
|
11
|
+
export default function markdown(): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Checks for correct usage of native promises.
|
|
4
4
|
*
|
|
@@ -8,4 +8,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
8
8
|
* @returns
|
|
9
9
|
* An array of configuration objects to be added to the flat configuration.
|
|
10
10
|
*/
|
|
11
|
-
export default function promises():
|
|
11
|
+
export default function promises(): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { StylisticOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Defines standard (opinionated) linter rules for source code style.
|
|
@@ -13,4 +13,4 @@ import type { StylisticOptions } from "../shared/env-utils.js";
|
|
|
13
13
|
* @returns
|
|
14
14
|
* An array of configuration objects to be added to the flat configuration.
|
|
15
15
|
*/
|
|
16
|
-
export default function stylistic(options: Required<StylisticOptions>):
|
|
16
|
+
export default function stylistic(options: Required<StylisticOptions>): Linter.Config[];
|
|
@@ -19,7 +19,7 @@ export default function stylistic(options) {
|
|
|
19
19
|
const { indent, semi, quotes, dangle } = options;
|
|
20
20
|
return [
|
|
21
21
|
// globally disable all deprecated stylistic core rules
|
|
22
|
-
stylisticPlugin.configs["disable-legacy"],
|
|
22
|
+
stylisticPlugin.configs["disable-legacy"], // outdated typings in plugin
|
|
23
23
|
// "@stylistic" plugin
|
|
24
24
|
{
|
|
25
25
|
// do not lint markdown files
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Defines standard rules for TypeScript source files.
|
|
4
4
|
*
|
|
@@ -8,4 +8,4 @@ import type { TSESLint } from "@typescript-eslint/utils";
|
|
|
8
8
|
* @returns
|
|
9
9
|
* An array of configuration objects to be added to the flat configuration.
|
|
10
10
|
*/
|
|
11
|
-
export default function ts():
|
|
11
|
+
export default function ts(): Linter.Config[];
|
package/dist/eslint/config/ts.js
CHANGED
|
@@ -76,5 +76,5 @@ export default function ts() {
|
|
|
76
76
|
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "no-type-imports", disallowTypeAnnotations: false }],
|
|
77
77
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
78
78
|
},
|
|
79
|
-
});
|
|
79
|
+
}); // TODO: type incompatibility between Linter and TSESLint
|
|
80
80
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { StylisticOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Defines standard linting rules for YAML files.
|
|
@@ -12,4 +12,4 @@ import type { StylisticOptions } from "../shared/env-utils.js";
|
|
|
12
12
|
* @returns
|
|
13
13
|
* An array of configuration objects to be added to the flat configuration.
|
|
14
14
|
*/
|
|
15
|
-
export default function yaml(options: Required<StylisticOptions>):
|
|
15
|
+
export default function yaml(options: Required<StylisticOptions>): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { EnvRestrictedOptions } from "../shared/restricted.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.browser".
|
|
@@ -19,4 +19,4 @@ export interface EnvBrowserOptions extends EnvRestrictedOptions {
|
|
|
19
19
|
* @returns
|
|
20
20
|
* An array of configuration objects to be added to the flat configuration.
|
|
21
21
|
*/
|
|
22
|
-
export default function browser(envOptions: EnvBrowserOptions):
|
|
22
|
+
export default function browser(envOptions: EnvBrowserOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { EnvBaseOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.codecept".
|
|
@@ -19,4 +19,4 @@ export interface EnvCodeceptOptions extends EnvBaseOptions {
|
|
|
19
19
|
* @returns
|
|
20
20
|
* An array of configuration objects to be added to the flat configuration.
|
|
21
21
|
*/
|
|
22
|
-
export default function codecept(envOptions: EnvCodeceptOptions):
|
|
22
|
+
export default function codecept(envOptions: EnvCodeceptOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { EnvBaseOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.eslint".
|
|
@@ -17,4 +17,4 @@ export interface EnvEslintOptions extends EnvBaseOptions {
|
|
|
17
17
|
* @returns
|
|
18
18
|
* An array of configuration objects to be added to the flat configuration.
|
|
19
19
|
*/
|
|
20
|
-
export default function eslint(envOptions: EnvEslintOptions):
|
|
20
|
+
export default function eslint(envOptions: EnvEslintOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import { type EnvUnitTestOptions } from "../shared/unittest.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.jest".
|
|
@@ -19,4 +19,4 @@ export interface EnvJestOptions extends EnvUnitTestOptions {
|
|
|
19
19
|
* @returns
|
|
20
20
|
* An array of configuration objects to be added to the flat configuration.
|
|
21
21
|
*/
|
|
22
|
-
export default function jest(envOptions: EnvJestOptions):
|
|
22
|
+
export default function jest(envOptions: EnvJestOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type ts from "typescript";
|
|
3
3
|
import type { LanguageOptions } from "../shared/env-utils.js";
|
|
4
4
|
import { type EnvRestrictedOptions } from "../shared/restricted.js";
|
|
@@ -45,4 +45,4 @@ export interface EnvNodeOptions extends EnvRestrictedOptions {
|
|
|
45
45
|
* @returns
|
|
46
46
|
* An array of configuration objects to be added to the flat configuration.
|
|
47
47
|
*/
|
|
48
|
-
export default function node(envOptions: EnvNodeOptions):
|
|
48
|
+
export default function node(envOptions: EnvNodeOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { EnvBaseOptions } from "../shared/env-utils.js";
|
|
3
3
|
import type { SharedRuleSettings } from "../shared/rule-utils.js";
|
|
4
4
|
import { type RuleNoInvalidModulesOptions } from "../rules/no-invalid-modules.js";
|
|
@@ -29,4 +29,4 @@ export interface EnvProjectOptions extends EnvBaseOptions {
|
|
|
29
29
|
* @returns
|
|
30
30
|
* An array of configuration objects to be added to the flat configuration.
|
|
31
31
|
*/
|
|
32
|
-
export default function project(envOptions: EnvProjectOptions):
|
|
32
|
+
export default function project(envOptions: EnvProjectOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import { type EnvBaseOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.react".
|
|
@@ -26,4 +26,4 @@ export interface EnvReactOptions extends EnvBaseOptions {
|
|
|
26
26
|
* @returns
|
|
27
27
|
* An array of configuration objects to be added to the flat configuration.
|
|
28
28
|
*/
|
|
29
|
-
export default function react(envOptions: EnvReactOptions):
|
|
29
|
+
export default function react(envOptions: EnvReactOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { EnvBaseOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.tsconfig".
|
|
@@ -18,4 +18,4 @@ export interface EnvTSConfigOptions extends EnvBaseOptions {
|
|
|
18
18
|
* @returns
|
|
19
19
|
* An array of configuration objects to be added to the flat configuration.
|
|
20
20
|
*/
|
|
21
|
-
export default function tsconfig(envOptions: EnvTSConfigOptions):
|
|
21
|
+
export default function tsconfig(envOptions: EnvTSConfigOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import { type EnvUnitTestOptions } from "../shared/unittest.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the environment preset "env.vitest".
|
|
@@ -20,4 +20,4 @@ export interface EnvVitestOptions extends EnvUnitTestOptions {
|
|
|
20
20
|
* @returns
|
|
21
21
|
* An array of configuration objects to be added to the flat configuration.
|
|
22
22
|
*/
|
|
23
|
-
export default function vitest(envOptions: EnvVitestOptions):
|
|
23
|
+
export default function vitest(envOptions: EnvVitestOptions): Linter.Config[];
|
package/dist/eslint/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { LanguageOptions, StylisticOptions } from "./shared/env-utils.js";
|
|
3
3
|
import node from "./env/node.js";
|
|
4
4
|
import browser from "./env/browser.js";
|
|
@@ -34,7 +34,7 @@ export interface ConfigureOptions {
|
|
|
34
34
|
/**
|
|
35
35
|
* Additional linter rules to be added to the global configuration.
|
|
36
36
|
*/
|
|
37
|
-
rules?:
|
|
37
|
+
rules?: Linter.RulesRecord;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* A collection with all available environment presets.
|
|
@@ -60,4 +60,4 @@ export declare const env: {
|
|
|
60
60
|
* @returns
|
|
61
61
|
* An array of configuration objects to be added to the flat configuration.
|
|
62
62
|
*/
|
|
63
|
-
export declare function configure(options?: ConfigureOptions):
|
|
63
|
+
export declare function configure(options?: ConfigureOptions): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
/**
|
|
3
3
|
* Configuration options for language and project setup.
|
|
4
4
|
*/
|
|
@@ -7,7 +7,7 @@ export interface LanguageOptions {
|
|
|
7
7
|
* The ECMAScript version to be used in the project (version or year).
|
|
8
8
|
* Default value is `2022`.
|
|
9
9
|
*/
|
|
10
|
-
ecmaVersion?:
|
|
10
|
+
ecmaVersion?: Linter.EcmaVersion;
|
|
11
11
|
/**
|
|
12
12
|
* Specifies how to treat `.js`, `.jsx`, `.ts`, and `.tsx` files.
|
|
13
13
|
*
|
|
@@ -82,7 +82,7 @@ export interface EnvBaseOptions extends EnvFilesOptions {
|
|
|
82
82
|
/**
|
|
83
83
|
* Additional linter rules to be added to the configuration.
|
|
84
84
|
*/
|
|
85
|
-
rules?:
|
|
85
|
+
rules?: Linter.RulesRecord;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* File extensions for JavaScript source files.
|
|
@@ -158,7 +158,7 @@ export declare function flatArray<T>(...entries: Array<T | T[] | false | null |
|
|
|
158
158
|
* @returns
|
|
159
159
|
* The concatenated configuration array.
|
|
160
160
|
*/
|
|
161
|
-
export declare const concatConfigs: (...entries: (false |
|
|
161
|
+
export declare const concatConfigs: (...entries: (false | Linter.Config<Linter.RulesRecord> | Linter.Config<Linter.RulesRecord>[] | null | undefined)[]) => Linter.Config<Linter.RulesRecord>[];
|
|
162
162
|
/**
|
|
163
163
|
* Creates a flat configuration object with "files" and "ignores" settings from
|
|
164
164
|
* an environment's "envOptions" object.
|
|
@@ -176,7 +176,7 @@ export declare const concatConfigs: (...entries: (false | TSESLint.FlatConfig.Co
|
|
|
176
176
|
* @returns
|
|
177
177
|
* The resulting flat configuration object.
|
|
178
178
|
*/
|
|
179
|
-
export declare function createConfig(envOptions: EnvFilesOptions, flatConfig:
|
|
179
|
+
export declare function createConfig(envOptions: EnvFilesOptions, flatConfig: Linter.Config, rules?: Linter.RulesRecord): Linter.Config;
|
|
180
180
|
/**
|
|
181
181
|
* Creates a flat configuration object with "files", "ignores", and "rules"
|
|
182
182
|
* settings from an environment's "envOptions" object.
|
|
@@ -194,4 +194,4 @@ export declare function createConfig(envOptions: EnvFilesOptions, flatConfig: TS
|
|
|
194
194
|
* The resulting flat configuration object, if the environment options contain
|
|
195
195
|
* custom rule settings, otherwise `undefined`.
|
|
196
196
|
*/
|
|
197
|
-
export declare function customRules(envOptions: EnvBaseOptions, rules?:
|
|
197
|
+
export declare function customRules(envOptions: EnvBaseOptions, rules?: Linter.RulesRecord): Linter.Config | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import type { LanguageOptions, EnvFilesOptions, EnvBaseOptions } from "../shared/env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration for a single banned global or import.
|
|
@@ -82,7 +82,7 @@ export interface EnvRestrictedOptions extends EnvBaseOptions {
|
|
|
82
82
|
* @returns
|
|
83
83
|
* The rules dictionary with all needed restricted rules.
|
|
84
84
|
*/
|
|
85
|
-
export declare function builtinRestrictedRules(languageOptions: LanguageOptions):
|
|
85
|
+
export declare function builtinRestrictedRules(languageOptions: LanguageOptions): Linter.RulesRecord;
|
|
86
86
|
/**
|
|
87
87
|
* Generates various "no-restricted-?" rules from the passed configuration.
|
|
88
88
|
*
|
|
@@ -96,4 +96,4 @@ export declare function builtinRestrictedRules(languageOptions: LanguageOptions)
|
|
|
96
96
|
* @returns
|
|
97
97
|
* The flat configuration objects needed to forbid the restricted items.
|
|
98
98
|
*/
|
|
99
|
-
export declare function restrictedRulesConfig(envOptions: EnvRestrictedOptions, fixed?: EnvRestrictedItems):
|
|
99
|
+
export declare function restrictedRulesConfig(envOptions: EnvRestrictedOptions, fixed?: EnvRestrictedItems): Linter.Config[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
2
|
import { type EnvBaseOptions } from "./env-utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Shared options for environment presets for unit tests.
|
|
@@ -26,4 +26,4 @@ export interface EnvUnitTestOptions extends EnvBaseOptions {
|
|
|
26
26
|
* @returns
|
|
27
27
|
* The resulting flat configuration objects.
|
|
28
28
|
*/
|
|
29
|
-
export declare function createUnitTestPluginConfigs(envOptions: EnvUnitTestOptions):
|
|
29
|
+
export declare function createUnitTestPluginConfigs(envOptions: EnvUnitTestOptions): Linter.Config[];
|
|
@@ -25,7 +25,7 @@ export function createUnitTestPluginConfigs(envOptions) {
|
|
|
25
25
|
},
|
|
26
26
|
// recommended rules
|
|
27
27
|
rules: {
|
|
28
|
-
...testingLibraryPlugin.configs
|
|
28
|
+
...testingLibraryPlugin.configs["flat/react"].rules,
|
|
29
29
|
"testing-library/no-node-access": ["error", { allowContainerFirstChild: true }],
|
|
30
30
|
},
|
|
31
31
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/linter-presets",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Configuration presets for ESLint and StyleLint",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@babel/plugin-proposal-decorators": "7.24.7",
|
|
27
27
|
"@eslint-community/eslint-plugin-eslint-comments": "4.4.0",
|
|
28
28
|
"@eslint/compat": "1.1.1",
|
|
29
|
-
"@eslint/js": "9.
|
|
30
|
-
"@eslint/markdown": "6.
|
|
29
|
+
"@eslint/js": "9.10.0",
|
|
30
|
+
"@eslint/markdown": "6.1.0",
|
|
31
31
|
"@stylistic/eslint-plugin": "2.3.0",
|
|
32
32
|
"@stylistic/eslint-plugin-migrate": "2.3.0",
|
|
33
33
|
"@stylistic/stylelint-config": "2.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-license-header": "0.6.1",
|
|
48
48
|
"eslint-plugin-n": "17.10.2",
|
|
49
49
|
"eslint-plugin-promise": "7.1.0",
|
|
50
|
-
"eslint-plugin-react": "7.
|
|
50
|
+
"eslint-plugin-react": "7.36.1",
|
|
51
51
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
52
52
|
"eslint-plugin-react-hooks-static-deps": "1.0.7",
|
|
53
53
|
"eslint-plugin-react-refresh": "0.4.11",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
"stylelint-config-standard-less": "3.0.1",
|
|
62
62
|
"stylelint-config-standard-scss": "13.1.0",
|
|
63
63
|
"stylelint-plugin-license-header": "1.0.3",
|
|
64
|
-
"typescript-eslint": "8.
|
|
64
|
+
"typescript-eslint": "8.5.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@eslint/core": "0.6.0",
|
|
68
68
|
"@types/confusing-browser-globals": "1.0.3",
|
|
69
69
|
"@types/eslint__js": "8.42.3",
|
|
70
70
|
"@types/picomatch": "3.0.1",
|
|
71
|
-
"@typescript-eslint/utils": "8.
|
|
72
|
-
"eslint": "9.
|
|
71
|
+
"@typescript-eslint/utils": "8.5.0",
|
|
72
|
+
"eslint": "9.10.0",
|
|
73
73
|
"jest": "29.7.0",
|
|
74
74
|
"rimraf": "6.0.1",
|
|
75
75
|
"stylelint": "16.9.0",
|
|
76
|
-
"typescript": "5.
|
|
76
|
+
"typescript": "5.6.2"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"eslint": "^9.8",
|