@akinon/eslint-plugin-projectzero 2.0.6-rc.2 → 2.0.6

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 CHANGED
@@ -1,18 +1,6 @@
1
1
  # @akinon/eslint-plugin-projectzero
2
2
 
3
- ## 2.0.6-rc.2
4
-
5
- ### Patch Changes
6
-
7
- - 89ed4e03: ZERO-4394: Add Next.js 16 ESLint migration v9 + flat config
8
-
9
- ## 2.0.6-rc.1
10
-
11
- ## 2.0.6-rc.0
12
-
13
- ### Patch Changes
14
-
15
- - c0228aff: ZERO-4159: Upgrade the package versions
3
+ ## 2.0.6
16
4
 
17
5
  ## 2.0.5
18
6
 
@@ -74,7 +74,8 @@ exports.default = utils_1.ESLintUtils.RuleCreator.withoutDocs({
74
74
  meta: {
75
75
  type: 'problem',
76
76
  docs: {
77
- description: 'Enforces the correct order of pre-order middlewares'
77
+ description: 'Enforces the correct order of pre-order middlewares',
78
+ recommended: 'error'
78
79
  },
79
80
  schema: [],
80
81
  messages: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/eslint-plugin-projectzero",
3
- "version": "2.0.6-rc.2",
3
+ "version": "2.0.6",
4
4
  "private": false,
5
5
  "description": "ESLint plugin for Project Zero Next",
6
6
  "main": "dist/index.js",
@@ -12,11 +12,8 @@
12
12
  "keywords": [],
13
13
  "author": "",
14
14
  "license": "ISC",
15
- "peerDependencies": {
16
- "@typescript-eslint/utils": "^8.0.0",
17
- "eslint": "^9.0.0"
18
- },
19
15
  "devDependencies": {
20
- "@typescript-eslint/utils": "8.58.2"
16
+ "@typescript-eslint/eslint-plugin": "5.44.0",
17
+ "@typescript-eslint/parser": "5.44.0"
21
18
  }
22
19
  }
@@ -22,8 +22,7 @@ const getAllKeysFromObject = (obj: any, prefix = ''): string[] => {
22
22
  }, [] as string[]);
23
23
  };
24
24
 
25
- // eslint-disable-next-line -eslint/no-explicit-any
26
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
25
+ export default ESLintUtils.RuleCreator.withoutDocs({
27
26
  create(context: any) {
28
27
  return {
29
28
  CallExpression(node: any) {
@@ -77,5 +76,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
77
76
  },
78
77
  defaultOptions: []
79
78
  });
80
-
81
- export default rule;
@@ -1,8 +1,7 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
3
3
 
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
4
+ export default ESLintUtils.RuleCreator.withoutDocs({
6
5
  create: function (context) {
7
6
  return {
8
7
  CallExpression(node) {
@@ -47,5 +46,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
47
46
  },
48
47
  defaultOptions: []
49
48
  });
50
-
51
- export default rule;
@@ -13,8 +13,7 @@ const correctOrder = [
13
13
  'withCompleteMasterpass'
14
14
  ];
15
15
 
16
- // eslint-disable-next-line -eslint/no-explicit-any
17
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
16
+ export default ESLintUtils.RuleCreator.withoutDocs({
18
17
  create(context: any) {
19
18
  return {
20
19
  CallExpression(node: any) {
@@ -66,5 +65,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
66
65
  },
67
66
  defaultOptions: []
68
67
  });
69
-
70
- export default rule;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AST_NODE_TYPES,
3
3
  ESLintUtils,
4
- TSESLint,
5
4
  TSESTree
6
5
  } from '@typescript-eslint/utils';
6
+ import { RuleContext } from '@typescript-eslint/utils/dist/ts-eslint';
7
7
 
8
8
  const CORRECT_PRE_ORDER_MIDDLEWARE_ORDER = [
9
9
  'shippingStepMiddleware',
@@ -24,7 +24,7 @@ type MessageIds = 'incorrectPreOrderMiddlewarePosition' | 'unknownMiddleware';
24
24
  type Options = [];
25
25
 
26
26
  export default ESLintUtils.RuleCreator.withoutDocs({
27
- create(context: TSESLint.RuleContext<MessageIds, Options>) {
27
+ create(context: RuleContext<MessageIds, Options>) {
28
28
  function checkPreOrderMiddlewareOrder(
29
29
  node: TSESTree.VariableDeclarator
30
30
  ): void {
@@ -101,7 +101,8 @@ export default ESLintUtils.RuleCreator.withoutDocs({
101
101
  meta: {
102
102
  type: 'problem',
103
103
  docs: {
104
- description: 'Enforces the correct order of pre-order middlewares'
104
+ description: 'Enforces the correct order of pre-order middlewares',
105
+ recommended: 'error'
105
106
  },
106
107
  schema: [],
107
108
  messages: {
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils, TSESTree } from '@typescript-eslint/utils';
2
2
 
3
- // eslint-disable-next-line -eslint/no-explicit-any
4
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
3
+ export default ESLintUtils.RuleCreator.withoutDocs({
5
4
  create(context) {
6
5
  return {
7
6
  CallExpression(node: TSESTree.CallExpression) {
@@ -60,5 +59,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
60
59
  },
61
60
  defaultOptions: []
62
61
  });
63
-
64
- export default rule;
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
 
3
- // eslint-disable-next-line -eslint/no-explicit-any
4
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
3
+ export default ESLintUtils.RuleCreator.withoutDocs({
5
4
  create(context) {
6
5
  if (!context.getFilename().includes('urls.ts')) {
7
6
  return {};
@@ -43,5 +42,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
43
42
  },
44
43
  defaultOptions: []
45
44
  });
46
-
47
- export default rule;
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
 
3
- // eslint-disable-next-line -eslint/no-explicit-any
4
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
3
+ export default ESLintUtils.RuleCreator.withoutDocs({
5
4
  create(context) {
6
5
  if (context.getFilename().includes('components/image.tsx')) {
7
6
  return {};
@@ -43,5 +42,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
43
42
  },
44
43
  defaultOptions: []
45
44
  });
46
-
47
- export default rule;
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
 
3
- // eslint-disable-next-line -eslint/no-explicit-any
4
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
3
+ export default ESLintUtils.RuleCreator.withoutDocs({
5
4
  create(context) {
6
5
  if (!context.getFilename().includes('akinon-next')) {
7
6
  return {};
@@ -42,5 +41,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
42
41
  },
43
42
  defaultOptions: []
44
43
  });
45
-
46
- export default rule;
@@ -1,8 +1,7 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
  import * as path from 'path';
3
3
 
4
- // eslint-disable-next-line -eslint/no-explicit-any
5
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
4
+ export default ESLintUtils.RuleCreator.withoutDocs({
6
5
  create(context) {
7
6
  const currentFilePath = path.normalize(context.getFilename());
8
7
  const linkComponentPath = path.normalize(
@@ -49,5 +48,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
49
48
  },
50
49
  defaultOptions: []
51
50
  });
52
-
53
- export default rule;
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
 
3
- // eslint-disable-next-line -eslint/no-explicit-any
4
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
3
+ export default ESLintUtils.RuleCreator.withoutDocs({
5
4
  create(context) {
6
5
  return {
7
6
  ImportDeclaration(node) {
@@ -49,5 +48,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
49
48
  },
50
49
  defaultOptions: []
51
50
  });
52
-
53
- export default rule;
@@ -1,7 +1,6 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
2
 
3
- // eslint-disable-next-line -eslint/no-explicit-any
4
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
3
+ export default ESLintUtils.RuleCreator.withoutDocs({
5
4
  create(context) {
6
5
  if (context.getFilename().includes('@akinon/next/hooks/use-router.ts')) {
7
6
  return {};
@@ -43,5 +42,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
43
42
  },
44
43
  defaultOptions: []
45
44
  });
46
-
47
- export default rule;
@@ -1,8 +1,7 @@
1
1
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
2
2
  import { ESLintUtils } from '@typescript-eslint/utils';
3
3
 
4
- // eslint-disable-next-line -eslint/no-explicit-any
5
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
4
+ export default ESLintUtils.RuleCreator.withoutDocs({
6
5
  create(context) {
7
6
  return {
8
7
  VariableDeclarator(node) {
@@ -59,5 +58,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
59
58
  },
60
59
  defaultOptions: []
61
60
  });
62
-
63
- export default rule;
@@ -4,8 +4,7 @@ const URLS = [
4
4
  '/users/logout/'
5
5
  ];
6
6
 
7
- // eslint-disable-next-line -eslint/no-explicit-any
8
- const rule: any = ESLintUtils.RuleCreator.withoutDocs({
7
+ export default ESLintUtils.RuleCreator.withoutDocs({
9
8
  create(context) {
10
9
  if (!context.getFilename().includes('urls.ts')) {
11
10
  return {};
@@ -43,5 +42,3 @@ const rule: any = ESLintUtils.RuleCreator.withoutDocs({
43
42
  },
44
43
  defaultOptions: []
45
44
  });
46
-
47
- export default rule;