@akinon/eslint-plugin-projectzero 2.0.10-beta.0 → 2.0.10-rc.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 +5 -1
- package/package.json +1 -1
- package/rules/check-locale.ts +4 -1
- package/rules/check-menu-depth.ts +4 -1
- package/rules/check-middleware-order.ts +4 -1
- package/rules/check-sentry-options.ts +4 -1
- package/rules/client-url.ts +4 -1
- package/rules/image-import.ts +4 -1
- package/rules/invalid-imports.ts +4 -1
- package/rules/link-import.ts +4 -1
- package/rules/meta-data-import.ts +4 -1
- package/rules/router-import.ts +4 -1
- package/rules/skip-trailing-slash-redirect.ts +4 -1
- package/rules/urls-without-slash.ts +4 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/rules/check-locale.ts
CHANGED
|
@@ -22,7 +22,8 @@ const getAllKeysFromObject = (obj: any, prefix = ''): string[] => {
|
|
|
22
22
|
}, [] as string[]);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
26
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
26
27
|
create(context: any) {
|
|
27
28
|
return {
|
|
28
29
|
CallExpression(node: any) {
|
|
@@ -76,3 +77,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
76
77
|
},
|
|
77
78
|
defaultOptions: []
|
|
78
79
|
});
|
|
80
|
+
|
|
81
|
+
export default rule;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
5
6
|
create: function (context) {
|
|
6
7
|
return {
|
|
7
8
|
CallExpression(node) {
|
|
@@ -46,3 +47,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
46
47
|
},
|
|
47
48
|
defaultOptions: []
|
|
48
49
|
});
|
|
50
|
+
|
|
51
|
+
export default rule;
|
|
@@ -13,7 +13,8 @@ const correctOrder = [
|
|
|
13
13
|
'withCompleteMasterpass'
|
|
14
14
|
];
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
17
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
17
18
|
create(context: any) {
|
|
18
19
|
return {
|
|
19
20
|
CallExpression(node: any) {
|
|
@@ -65,3 +66,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
65
66
|
},
|
|
66
67
|
defaultOptions: []
|
|
67
68
|
});
|
|
69
|
+
|
|
70
|
+
export default rule;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils, TSESTree } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
4
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
5
|
create(context) {
|
|
5
6
|
return {
|
|
6
7
|
CallExpression(node: TSESTree.CallExpression) {
|
|
@@ -59,3 +60,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
59
60
|
},
|
|
60
61
|
defaultOptions: []
|
|
61
62
|
});
|
|
63
|
+
|
|
64
|
+
export default rule;
|
package/rules/client-url.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
4
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
5
|
create(context) {
|
|
5
6
|
if (!context.getFilename().includes('urls.ts')) {
|
|
6
7
|
return {};
|
|
@@ -42,3 +43,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
42
43
|
},
|
|
43
44
|
defaultOptions: []
|
|
44
45
|
});
|
|
46
|
+
|
|
47
|
+
export default rule;
|
package/rules/image-import.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
4
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
5
|
create(context) {
|
|
5
6
|
if (context.getFilename().includes('components/image.tsx')) {
|
|
6
7
|
return {};
|
|
@@ -42,3 +43,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
42
43
|
},
|
|
43
44
|
defaultOptions: []
|
|
44
45
|
});
|
|
46
|
+
|
|
47
|
+
export default rule;
|
package/rules/invalid-imports.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
4
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
5
|
create(context) {
|
|
5
6
|
if (!context.getFilename().includes('akinon-next')) {
|
|
6
7
|
return {};
|
|
@@ -41,3 +42,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
41
42
|
},
|
|
42
43
|
defaultOptions: []
|
|
43
44
|
});
|
|
45
|
+
|
|
46
|
+
export default rule;
|
package/rules/link-import.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
5
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
5
6
|
create(context) {
|
|
6
7
|
const currentFilePath = path.normalize(context.getFilename());
|
|
7
8
|
const linkComponentPath = path.normalize(
|
|
@@ -48,3 +49,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
48
49
|
},
|
|
49
50
|
defaultOptions: []
|
|
50
51
|
});
|
|
52
|
+
|
|
53
|
+
export default rule;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
4
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
5
|
create(context) {
|
|
5
6
|
return {
|
|
6
7
|
ImportDeclaration(node) {
|
|
@@ -48,3 +49,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
48
49
|
},
|
|
49
50
|
defaultOptions: []
|
|
50
51
|
});
|
|
52
|
+
|
|
53
|
+
export default rule;
|
package/rules/router-import.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
4
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
5
|
create(context) {
|
|
5
6
|
if (context.getFilename().includes('@akinon/next/hooks/use-router.ts')) {
|
|
6
7
|
return {};
|
|
@@ -42,3 +43,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
42
43
|
},
|
|
43
44
|
defaultOptions: []
|
|
44
45
|
});
|
|
46
|
+
|
|
47
|
+
export default rule;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
2
2
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
5
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
5
6
|
create(context) {
|
|
6
7
|
return {
|
|
7
8
|
VariableDeclarator(node) {
|
|
@@ -58,3 +59,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
58
59
|
},
|
|
59
60
|
defaultOptions: []
|
|
60
61
|
});
|
|
62
|
+
|
|
63
|
+
export default rule;
|
|
@@ -4,7 +4,8 @@ const URLS = [
|
|
|
4
4
|
'/users/logout/'
|
|
5
5
|
];
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// eslint-disable-next-line -eslint/no-explicit-any
|
|
8
|
+
const rule: any = ESLintUtils.RuleCreator.withoutDocs({
|
|
8
9
|
create(context) {
|
|
9
10
|
if (!context.getFilename().includes('urls.ts')) {
|
|
10
11
|
return {};
|
|
@@ -42,3 +43,5 @@ export default ESLintUtils.RuleCreator.withoutDocs({
|
|
|
42
43
|
},
|
|
43
44
|
defaultOptions: []
|
|
44
45
|
});
|
|
46
|
+
|
|
47
|
+
export default rule;
|