eslint-plugin-mgw-eslint-rules 2.2.45 → 2.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +19 -6
- package/dist/index.js +15 -16
- package/dist/rules/avoid-backtick-without-interpolation.d.ts +6 -2
- package/dist/rules/avoid-backtick-without-interpolation.js +4 -3
- package/dist/rules/enforce-angular-signal-call.d.ts +6 -2
- package/dist/rules/enforce-angular-signal-call.js +4 -3
- package/dist/rules/enforce-template-literal-use.d.ts +6 -2
- package/dist/rules/enforce-template-literal-use.js +4 -3
- package/dist/rules/no-inferrable-types-readonly-properties.d.ts +6 -2
- package/dist/rules/no-inferrable-types-readonly-properties.js +4 -3
- package/dist/rules/prefer-const-enum.d.ts +6 -2
- package/dist/rules/prefer-const-enum.js +4 -4
- package/package.json +6 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const plugin: {
|
|
2
|
+
rules: {
|
|
3
|
+
"prefer-const-enum": import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferConstEnum", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
"no-inferrable-types-readonly-properties": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noInferrableTypesReadonlyProperties", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
"enforce-angular-signal-call": import("@typescript-eslint/utils/ts-eslint").RuleModule<"useGetter", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
"enforce-template-literal-use": import("@typescript-eslint/utils/ts-eslint").RuleModule<"useTemplateLiteral", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
"avoid-backtick-without-interpolation": import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidBacktickWithoutInterpolation", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
7
19
|
};
|
|
20
|
+
export = plugin;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const prefer_const_enum_1 =
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'enforce-template-literal-use': enforce_template_literal_use_1.default,
|
|
17
|
-
'avoid-backtick-without-interpolation': avoid_backtick_without_interpolation_1.default
|
|
2
|
+
// index.ts
|
|
3
|
+
const avoid_backtick_without_interpolation_1 = require("./rules/avoid-backtick-without-interpolation");
|
|
4
|
+
const enforce_angular_signal_call_1 = require("./rules/enforce-angular-signal-call");
|
|
5
|
+
const enforce_template_literal_use_1 = require("./rules/enforce-template-literal-use");
|
|
6
|
+
const no_inferrable_types_readonly_properties_1 = require("./rules/no-inferrable-types-readonly-properties");
|
|
7
|
+
const prefer_const_enum_1 = require("./rules/prefer-const-enum");
|
|
8
|
+
const plugin = {
|
|
9
|
+
rules: {
|
|
10
|
+
[prefer_const_enum_1.RULE_NAME]: prefer_const_enum_1.rule,
|
|
11
|
+
[no_inferrable_types_readonly_properties_1.RULE_NAME]: no_inferrable_types_readonly_properties_1.rule,
|
|
12
|
+
[enforce_angular_signal_call_1.RULE_NAME]: enforce_angular_signal_call_1.rule,
|
|
13
|
+
[enforce_template_literal_use_1.RULE_NAME]: enforce_template_literal_use_1.rule,
|
|
14
|
+
[avoid_backtick_without_interpolation_1.RULE_NAME]: avoid_backtick_without_interpolation_1.rule
|
|
15
|
+
}
|
|
18
16
|
};
|
|
17
|
+
module.exports = plugin;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
export type MessageIds = 'avoidBacktickWithoutInterpolation';
|
|
3
|
+
export type Options = [];
|
|
4
|
+
export declare const RULE_NAME = "avoid-backtick-without-interpolation";
|
|
5
|
+
export declare const rule: ESLintUtils.RuleModule<"avoidBacktickWithoutInterpolation", [], unknown, ESLintUtils.RuleListener> & {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rule = exports.RULE_NAME = void 0;
|
|
3
4
|
// rules/avoid-backtick-without-interpolation.ts
|
|
4
5
|
const utils_1 = require("@typescript-eslint/utils");
|
|
6
|
+
exports.RULE_NAME = 'avoid-backtick-without-interpolation';
|
|
5
7
|
const createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://github.com/developpement-megao/mgw-eslint-rules/docs/rules/${name}.md`);
|
|
6
|
-
|
|
7
|
-
name:
|
|
8
|
+
exports.rule = createRule({
|
|
9
|
+
name: exports.RULE_NAME,
|
|
8
10
|
meta: {
|
|
9
11
|
type: 'suggestion',
|
|
10
12
|
docs: {
|
|
@@ -37,4 +39,3 @@ const rule = createRule({
|
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
|
-
exports.default = rule;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
export type MessageIds = 'useGetter';
|
|
3
|
+
export type Options = [];
|
|
4
|
+
export declare const RULE_NAME = "enforce-angular-signal-call";
|
|
5
|
+
export declare const rule: ESLintUtils.RuleModule<"useGetter", [], unknown, ESLintUtils.RuleListener> & {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rule = exports.RULE_NAME = void 0;
|
|
3
4
|
// rules/enforce-angular-signal-call.ts
|
|
4
5
|
const utils_1 = require("@typescript-eslint/utils");
|
|
6
|
+
exports.RULE_NAME = 'enforce-angular-signal-call';
|
|
5
7
|
const createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://github.com/developpement-megao/mgw-eslint-rules/docs/rules/${name}.md`);
|
|
6
|
-
|
|
7
|
-
name:
|
|
8
|
+
exports.rule = createRule({
|
|
9
|
+
name: exports.RULE_NAME,
|
|
8
10
|
meta: {
|
|
9
11
|
type: 'suggestion',
|
|
10
12
|
docs: {
|
|
@@ -52,4 +54,3 @@ const rule = createRule({
|
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
});
|
|
55
|
-
exports.default = rule;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
export type MessageIds = 'useTemplateLiteral';
|
|
3
|
+
export type Options = [];
|
|
4
|
+
export declare const RULE_NAME = "enforce-template-literal-use";
|
|
5
|
+
export declare const rule: ESLintUtils.RuleModule<"useTemplateLiteral", [], unknown, ESLintUtils.RuleListener> & {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rule = exports.RULE_NAME = void 0;
|
|
3
4
|
// rules/enforce-template-literal-use.ts
|
|
4
5
|
const utils_1 = require("@typescript-eslint/utils");
|
|
6
|
+
exports.RULE_NAME = 'enforce-template-literal-use';
|
|
5
7
|
const createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://github.com/developpement-megao/mgw-eslint-rules/docs/rules/${name}.md`);
|
|
6
|
-
|
|
7
|
-
name:
|
|
8
|
+
exports.rule = createRule({
|
|
9
|
+
name: exports.RULE_NAME,
|
|
8
10
|
meta: {
|
|
9
11
|
type: 'suggestion',
|
|
10
12
|
docs: {
|
|
@@ -41,4 +43,3 @@ const rule = createRule({
|
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
|
-
exports.default = rule;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
export type MessageIds = 'noInferrableTypesReadonlyProperties';
|
|
3
|
+
export type Options = [];
|
|
4
|
+
export declare const RULE_NAME = "no-inferrable-types-readonly-properties";
|
|
5
|
+
export declare const rule: ESLintUtils.RuleModule<"noInferrableTypesReadonlyProperties", [], unknown, ESLintUtils.RuleListener> & {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rule = exports.RULE_NAME = void 0;
|
|
3
4
|
// rules/no-inferrable-types-readonly-properties.ts
|
|
4
5
|
const utils_1 = require("@typescript-eslint/utils");
|
|
6
|
+
exports.RULE_NAME = 'no-inferrable-types-readonly-properties';
|
|
5
7
|
const createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://github.com/developpement-megao/mgw-eslint-rules/docs/rules/${name}.md`);
|
|
6
|
-
|
|
7
|
-
name:
|
|
8
|
+
exports.rule = createRule({
|
|
9
|
+
name: exports.RULE_NAME,
|
|
8
10
|
meta: {
|
|
9
11
|
type: 'suggestion',
|
|
10
12
|
docs: {
|
|
@@ -75,4 +77,3 @@ const rule = createRule({
|
|
|
75
77
|
};
|
|
76
78
|
}
|
|
77
79
|
});
|
|
78
|
-
exports.default = rule;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
export type MessageIds = 'preferConstEnum';
|
|
3
|
+
export type Options = [];
|
|
4
|
+
export declare const RULE_NAME = "prefer-const-enum";
|
|
5
|
+
export declare const rule: ESLintUtils.RuleModule<"preferConstEnum", [], unknown, ESLintUtils.RuleListener> & {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rule = exports.RULE_NAME = void 0;
|
|
3
4
|
// rules/prefer-const-enum.ts
|
|
4
5
|
const utils_1 = require("@typescript-eslint/utils");
|
|
5
6
|
// {
|
|
6
7
|
// preferredCase?: 'lower' | 'upper';
|
|
7
8
|
// }
|
|
8
9
|
// ];
|
|
9
|
-
|
|
10
|
+
exports.RULE_NAME = 'prefer-const-enum';
|
|
10
11
|
// const createRule = ESLintUtils.RuleCreator<MyPluginDocs>((name) => `https://github.com/developpement-megao/mgw-eslint-rules/docs/rules/${name}.md`);
|
|
11
12
|
const createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://github.com/developpement-megao/mgw-eslint-rules/docs/rules/${name}.md`);
|
|
12
|
-
|
|
13
|
-
name: RULE_NAME,
|
|
13
|
+
exports.rule = createRule({
|
|
14
|
+
name: exports.RULE_NAME,
|
|
14
15
|
meta: {
|
|
15
16
|
type: 'suggestion',
|
|
16
17
|
docs: {
|
|
@@ -55,4 +56,3 @@ const rule = createRule({
|
|
|
55
56
|
};
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
|
-
exports.default = rule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-mgw-eslint-rules",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.47",
|
|
4
4
|
"description": "Custom eslint rules of MegaO",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -42,12 +42,10 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/developpement-megao/mgw-eslint-rules#readme",
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@typescript-eslint/
|
|
48
|
-
"
|
|
49
|
-
"@typescript-eslint/utils": "^8.42.0",
|
|
50
|
-
"eslint": "^9.34.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.55.0",
|
|
47
|
+
"@typescript-eslint/utils": "^8.55.0",
|
|
48
|
+
"eslint": "^9.39.2",
|
|
51
49
|
"eslint-config-prettier": "^10.1.8",
|
|
52
50
|
"eslint-plugin-prettier": "^5.5.4",
|
|
53
51
|
"jest": "^30.2.0",
|
|
@@ -56,7 +54,7 @@
|
|
|
56
54
|
"ts-node": "^10.9.2",
|
|
57
55
|
"tsup": "^8.5.0",
|
|
58
56
|
"typescript": "^5.9.2",
|
|
59
|
-
"typescript-eslint": "^8.
|
|
57
|
+
"typescript-eslint": "^8.55.0"
|
|
60
58
|
},
|
|
61
59
|
"peerDependencies": {
|
|
62
60
|
"eslint": ">=9.0.0"
|