eslint-plugin-nextfriday 1.2.3 → 1.3.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 +6 -0
- package/README.md +3 -0
- package/docs/rules/PREFER_NAMED_PARAM_TYPES.md +172 -0
- package/lib/index.cjs +85 -20
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +14 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +85 -20
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# eslint-plugin-nextfriday
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#24](https://github.com/next-friday/eslint-plugin-nextfriday/pull/24) [`59d1932`](https://github.com/next-friday/eslint-plugin-nextfriday/commit/59d193258d6ffd19d6fd90515626d826732e30b3) Thanks [@nextfridaydeveloper](https://github.com/nextfridaydeveloper)! - Add new prefer-named-param-types rule that enforces using named interfaces or type aliases instead of inline object type literals for function
|
|
8
|
+
|
|
3
9
|
## 1.2.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ export default [
|
|
|
65
65
|
"nextfriday/prefer-destructuring-params": "error",
|
|
66
66
|
"nextfriday/no-explicit-return-type": "error",
|
|
67
67
|
"nextfriday/prefer-import-type": "error",
|
|
68
|
+
"nextfriday/prefer-named-param-types": "error",
|
|
68
69
|
"nextfriday/prefer-react-import-types": "error",
|
|
69
70
|
"nextfriday/jsx-pascal-case": "error",
|
|
70
71
|
"nextfriday/prefer-interface-over-inline-types": "error",
|
|
@@ -115,6 +116,7 @@ module.exports = {
|
|
|
115
116
|
| [prefer-destructuring-params](docs/rules/PREFER_DESTRUCTURING_PARAMS.md) | Enforce destructuring for functions with multiple parameters | ❌ |
|
|
116
117
|
| [no-explicit-return-type](docs/rules/NO_EXPLICIT_RETURN_TYPE.md) | Disallow explicit return types on functions | ✅ |
|
|
117
118
|
| [prefer-import-type](docs/rules/PREFER_IMPORT_TYPE.md) | Enforce using 'import type' for type-only imports | ✅ |
|
|
119
|
+
| [prefer-named-param-types](docs/rules/PREFER_NAMED_PARAM_TYPES.md) | Enforce named types for function parameters with object types | ❌ |
|
|
118
120
|
| [prefer-interface-over-inline-types](docs/rules/PREFER_INTERFACE_OVER_INLINE_TYPES.md) | Enforce interface declarations over inline types for React props | ❌ |
|
|
119
121
|
| [prefer-react-import-types](docs/rules/PREFER_REACT_IMPORT_TYPES.md) | Enforce direct imports from 'react' instead of React.X | ✅ |
|
|
120
122
|
| [react-props-destructure](docs/rules/REACT_PROPS_DESTRUCTURE.md) | Enforce destructuring props inside React component body | ❌ |
|
|
@@ -134,6 +136,7 @@ Basic configuration without JSX-specific rules:
|
|
|
134
136
|
- `nextfriday/prefer-destructuring-params`: `"error"`
|
|
135
137
|
- `nextfriday/no-explicit-return-type`: `"error"`
|
|
136
138
|
- `nextfriday/prefer-import-type`: `"error"`
|
|
139
|
+
- `nextfriday/prefer-named-param-types`: `"error"`
|
|
137
140
|
- `nextfriday/prefer-react-import-types`: `"error"`
|
|
138
141
|
|
|
139
142
|
#### `base/recommended`
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# prefer-named-param-types
|
|
2
|
+
|
|
3
|
+
Enforce named interfaces or types instead of inline object types for function parameters.
|
|
4
|
+
|
|
5
|
+
## Rule Details
|
|
6
|
+
|
|
7
|
+
This rule enforces extracting inline object type annotations for function parameters into named interfaces or type aliases. This promotes better code organization, reusability, and readability across your codebase.
|
|
8
|
+
|
|
9
|
+
Examples of **incorrect** code for this rule:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// Destructured parameter with inline type
|
|
13
|
+
const foo = ({ bar, baz }: { bar: string; baz: number }) => {
|
|
14
|
+
console.log(bar, baz);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// Regular parameter with inline type
|
|
18
|
+
const foo = (params: { bar: string; baz: number }) => {
|
|
19
|
+
const { bar, baz } = params;
|
|
20
|
+
console.log(bar, baz);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Function declaration
|
|
24
|
+
function createUser(data: { name: string; email: string; role: "admin" | "user" }) {
|
|
25
|
+
return { ...data, createdAt: Date.now() };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Function expression
|
|
29
|
+
const handler = function (data: { id: number; name: string }) {
|
|
30
|
+
return data.id;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// Multiple parameters with inline types
|
|
34
|
+
const foo = (first: { a: string; b: number }, second: { x: boolean; y: string }) => {
|
|
35
|
+
return { first, second };
|
|
36
|
+
};
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Examples of **correct** code for this rule:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
// Using interface
|
|
43
|
+
interface Params {
|
|
44
|
+
bar: string;
|
|
45
|
+
baz: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const foo = (params: Params) => {
|
|
49
|
+
const { bar, baz } = params;
|
|
50
|
+
console.log(bar, baz);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Using type alias
|
|
54
|
+
type UserData = {
|
|
55
|
+
name: string;
|
|
56
|
+
email: string;
|
|
57
|
+
role: "admin" | "user";
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const createUser = (data: UserData) => {
|
|
61
|
+
return { ...data, createdAt: Date.now() };
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Primitive types are allowed
|
|
65
|
+
const foo = (value: string) => {
|
|
66
|
+
return value;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const bar = (count: number, enabled: boolean) => {
|
|
70
|
+
return count > 0 && enabled;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Functions with no parameters
|
|
74
|
+
const baz = () => {
|
|
75
|
+
return "no params";
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// Named types with destructuring
|
|
79
|
+
interface Config {
|
|
80
|
+
theme: string;
|
|
81
|
+
locale: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const setup = (config: Config) => {
|
|
85
|
+
const { theme, locale } = config;
|
|
86
|
+
console.log(theme, locale);
|
|
87
|
+
};
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Why?
|
|
91
|
+
|
|
92
|
+
### Benefits of named parameter types:
|
|
93
|
+
|
|
94
|
+
1. **Reusability**: Named types can be reused across multiple functions
|
|
95
|
+
2. **Better organization**: Separates type definitions from function logic
|
|
96
|
+
3. **Improved readability**: Makes function signatures cleaner and easier to understand
|
|
97
|
+
4. **Better IDE support**: Enhanced autocomplete, refactoring, and navigation
|
|
98
|
+
5. **Documentation**: Named types serve as clear documentation of function APIs
|
|
99
|
+
6. **Extensibility**: Types and interfaces can be extended and composed more easily
|
|
100
|
+
7. **Type inference**: Named types can improve TypeScript's type inference in complex scenarios
|
|
101
|
+
|
|
102
|
+
## Rule Scope
|
|
103
|
+
|
|
104
|
+
This rule applies to:
|
|
105
|
+
|
|
106
|
+
- All function types: arrow functions, function expressions, and function declarations
|
|
107
|
+
- Function parameters with inline object type literals
|
|
108
|
+
- Method definitions with inline object type parameters
|
|
109
|
+
- TypeScript method signatures
|
|
110
|
+
|
|
111
|
+
The rule triggers when:
|
|
112
|
+
|
|
113
|
+
- A parameter has an inline object type literal (e.g., `{ bar: string; baz: number }`)
|
|
114
|
+
- The parameter is destructured with an inline type (e.g., `({ bar, baz }: { bar: string; baz: number })`)
|
|
115
|
+
|
|
116
|
+
The rule allows:
|
|
117
|
+
|
|
118
|
+
- Primitive type annotations (string, number, boolean, etc.)
|
|
119
|
+
- Named types and interfaces
|
|
120
|
+
- Type aliases
|
|
121
|
+
- Functions with no parameters
|
|
122
|
+
- Array types (e.g., `string[]`)
|
|
123
|
+
- Union/intersection types without object literals
|
|
124
|
+
|
|
125
|
+
## When Not To Use It
|
|
126
|
+
|
|
127
|
+
This rule should not be used if you:
|
|
128
|
+
|
|
129
|
+
- Prefer inline types for simple, one-off function parameters
|
|
130
|
+
- Are working with very simple functions that don't benefit from type extraction
|
|
131
|
+
- Have specific code style requirements that favor inline types
|
|
132
|
+
- Are maintaining legacy code with established patterns
|
|
133
|
+
|
|
134
|
+
## Configuration
|
|
135
|
+
|
|
136
|
+
This rule is included in the following configurations:
|
|
137
|
+
|
|
138
|
+
- `nextfriday/base`
|
|
139
|
+
- `nextfriday/base/recommended`
|
|
140
|
+
- `nextfriday/react`
|
|
141
|
+
- `nextfriday/react/recommended`
|
|
142
|
+
- `nextfriday/nextjs`
|
|
143
|
+
- `nextfriday/nextjs/recommended`
|
|
144
|
+
|
|
145
|
+
To enable this rule manually:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"rules": {
|
|
150
|
+
"nextfriday/prefer-named-param-types": "error"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Relationship to Other Rules
|
|
156
|
+
|
|
157
|
+
This rule complements but differs from `prefer-interface-over-inline-types`:
|
|
158
|
+
|
|
159
|
+
- `prefer-interface-over-inline-types`: Focuses on React component props with complexity criteria
|
|
160
|
+
- `prefer-named-param-types`: Applies to ALL functions with inline object types, regardless of complexity
|
|
161
|
+
|
|
162
|
+
Both rules can be used together for comprehensive type organization.
|
|
163
|
+
|
|
164
|
+
## Compatibility
|
|
165
|
+
|
|
166
|
+
- TypeScript 3.0+ (interface and type alias declarations)
|
|
167
|
+
- ESLint 9+ with flat config
|
|
168
|
+
- Works with all function types in JavaScript/TypeScript
|
|
169
|
+
|
|
170
|
+
## Version
|
|
171
|
+
|
|
172
|
+
This rule was introduced in eslint-plugin-nextfriday v1.2.3.
|
package/lib/index.cjs
CHANGED
|
@@ -40,7 +40,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
40
40
|
// package.json
|
|
41
41
|
var package_default = {
|
|
42
42
|
name: "eslint-plugin-nextfriday",
|
|
43
|
-
version: "1.
|
|
43
|
+
version: "1.3.0",
|
|
44
44
|
description: "A comprehensive ESLint plugin providing custom rules and configurations for Next Friday development workflows.",
|
|
45
45
|
keywords: [
|
|
46
46
|
"eslint",
|
|
@@ -705,12 +705,74 @@ var preferInterfaceOverInlineTypes = createRule9({
|
|
|
705
705
|
});
|
|
706
706
|
var prefer_interface_over_inline_types_default = preferInterfaceOverInlineTypes;
|
|
707
707
|
|
|
708
|
-
// src/rules/prefer-
|
|
708
|
+
// src/rules/prefer-named-param-types.ts
|
|
709
709
|
var import_utils10 = require("@typescript-eslint/utils");
|
|
710
710
|
var createRule10 = import_utils10.ESLintUtils.RuleCreator(
|
|
711
711
|
(name) => `https://github.com/next-friday/eslint-plugin-nextfriday/blob/main/docs/rules/${name.replace(/-/g, "_").toUpperCase()}.md`
|
|
712
712
|
);
|
|
713
|
-
var
|
|
713
|
+
var preferNamedParamTypes = createRule10({
|
|
714
|
+
name: "prefer-named-param-types",
|
|
715
|
+
meta: {
|
|
716
|
+
type: "suggestion",
|
|
717
|
+
docs: {
|
|
718
|
+
description: "Enforce named interfaces/types instead of inline object types for function parameters"
|
|
719
|
+
},
|
|
720
|
+
messages: {
|
|
721
|
+
preferNamedParamTypes: "Use a named interface or type for object parameter types instead of inline type annotations"
|
|
722
|
+
},
|
|
723
|
+
schema: []
|
|
724
|
+
},
|
|
725
|
+
defaultOptions: [],
|
|
726
|
+
create(context) {
|
|
727
|
+
function hasInlineObjectType(param) {
|
|
728
|
+
if (param.type === import_utils10.AST_NODE_TYPES.AssignmentPattern) {
|
|
729
|
+
return hasInlineObjectType(param.left);
|
|
730
|
+
}
|
|
731
|
+
if (param.type === import_utils10.AST_NODE_TYPES.ObjectPattern) {
|
|
732
|
+
if (param.typeAnnotation?.typeAnnotation.type === import_utils10.AST_NODE_TYPES.TSTypeLiteral) {
|
|
733
|
+
return true;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
if (param.type === import_utils10.AST_NODE_TYPES.Identifier) {
|
|
737
|
+
if (param.typeAnnotation?.typeAnnotation.type === import_utils10.AST_NODE_TYPES.TSTypeLiteral) {
|
|
738
|
+
return true;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return false;
|
|
742
|
+
}
|
|
743
|
+
function checkFunction(node) {
|
|
744
|
+
let params = [];
|
|
745
|
+
if ("params" in node) {
|
|
746
|
+
params = node.params;
|
|
747
|
+
} else if ("value" in node && node.value) {
|
|
748
|
+
params = node.value.params;
|
|
749
|
+
}
|
|
750
|
+
params.forEach((param) => {
|
|
751
|
+
if (hasInlineObjectType(param)) {
|
|
752
|
+
context.report({
|
|
753
|
+
node: param,
|
|
754
|
+
messageId: "preferNamedParamTypes"
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
FunctionDeclaration: checkFunction,
|
|
761
|
+
FunctionExpression: checkFunction,
|
|
762
|
+
ArrowFunctionExpression: checkFunction,
|
|
763
|
+
TSMethodSignature: checkFunction,
|
|
764
|
+
MethodDefinition: checkFunction
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
var prefer_named_param_types_default = preferNamedParamTypes;
|
|
769
|
+
|
|
770
|
+
// src/rules/prefer-react-import-types.ts
|
|
771
|
+
var import_utils11 = require("@typescript-eslint/utils");
|
|
772
|
+
var createRule11 = import_utils11.ESLintUtils.RuleCreator(
|
|
773
|
+
(name) => `https://github.com/next-friday/eslint-plugin-nextfriday/blob/main/docs/rules/${name.replace(/-/g, "_").toUpperCase()}.md`
|
|
774
|
+
);
|
|
775
|
+
var preferReactImportTypes = createRule11({
|
|
714
776
|
name: "prefer-react-import-types",
|
|
715
777
|
meta: {
|
|
716
778
|
type: "suggestion",
|
|
@@ -786,7 +848,7 @@ var preferReactImportTypes = createRule10({
|
|
|
786
848
|
]);
|
|
787
849
|
const allReactExports = /* @__PURE__ */ new Set([...reactTypes, ...reactRuntimeExports]);
|
|
788
850
|
function checkMemberExpression(node) {
|
|
789
|
-
if (node.object.type ===
|
|
851
|
+
if (node.object.type === import_utils11.AST_NODE_TYPES.Identifier && node.object.name === "React" && node.property.type === import_utils11.AST_NODE_TYPES.Identifier && allReactExports.has(node.property.name)) {
|
|
790
852
|
const typeName = node.property.name;
|
|
791
853
|
const isType = reactTypes.has(typeName);
|
|
792
854
|
const importStatement = isType ? `import type { ${typeName} } from "react"` : `import { ${typeName} } from "react"`;
|
|
@@ -803,7 +865,7 @@ var preferReactImportTypes = createRule10({
|
|
|
803
865
|
return {
|
|
804
866
|
MemberExpression: checkMemberExpression,
|
|
805
867
|
"TSTypeReference > TSQualifiedName": (node) => {
|
|
806
|
-
if (node.left.type ===
|
|
868
|
+
if (node.left.type === import_utils11.AST_NODE_TYPES.Identifier && node.left.name === "React" && node.right.type === import_utils11.AST_NODE_TYPES.Identifier && allReactExports.has(node.right.name)) {
|
|
807
869
|
const typeName = node.right.name;
|
|
808
870
|
const isType = reactTypes.has(typeName);
|
|
809
871
|
const importStatement = isType ? `import type { ${typeName} } from "react"` : `import { ${typeName} } from "react"`;
|
|
@@ -823,11 +885,11 @@ var preferReactImportTypes = createRule10({
|
|
|
823
885
|
var prefer_react_import_types_default = preferReactImportTypes;
|
|
824
886
|
|
|
825
887
|
// src/rules/react-props-destructure.ts
|
|
826
|
-
var
|
|
827
|
-
var
|
|
888
|
+
var import_utils12 = require("@typescript-eslint/utils");
|
|
889
|
+
var createRule12 = import_utils12.ESLintUtils.RuleCreator(
|
|
828
890
|
(name) => `https://github.com/next-friday/eslint-plugin-nextfriday/blob/main/docs/rules/${name.replace(/-/g, "_").toUpperCase()}.md`
|
|
829
891
|
);
|
|
830
|
-
var reactPropsDestructure =
|
|
892
|
+
var reactPropsDestructure = createRule12({
|
|
831
893
|
name: "react-props-destructure",
|
|
832
894
|
meta: {
|
|
833
895
|
type: "suggestion",
|
|
@@ -843,29 +905,29 @@ var reactPropsDestructure = createRule11({
|
|
|
843
905
|
defaultOptions: [],
|
|
844
906
|
create(context) {
|
|
845
907
|
function hasJSXInConditional(node) {
|
|
846
|
-
return node.consequent.type ===
|
|
908
|
+
return node.consequent.type === import_utils12.AST_NODE_TYPES.JSXElement || node.consequent.type === import_utils12.AST_NODE_TYPES.JSXFragment || node.alternate.type === import_utils12.AST_NODE_TYPES.JSXElement || node.alternate.type === import_utils12.AST_NODE_TYPES.JSXFragment;
|
|
847
909
|
}
|
|
848
910
|
function hasJSXInLogical(node) {
|
|
849
|
-
return node.right.type ===
|
|
911
|
+
return node.right.type === import_utils12.AST_NODE_TYPES.JSXElement || node.right.type === import_utils12.AST_NODE_TYPES.JSXFragment;
|
|
850
912
|
}
|
|
851
913
|
function hasJSXReturn(block) {
|
|
852
914
|
return block.body.some((stmt) => {
|
|
853
|
-
if (stmt.type ===
|
|
854
|
-
return stmt.argument.type ===
|
|
915
|
+
if (stmt.type === import_utils12.AST_NODE_TYPES.ReturnStatement && stmt.argument) {
|
|
916
|
+
return stmt.argument.type === import_utils12.AST_NODE_TYPES.JSXElement || stmt.argument.type === import_utils12.AST_NODE_TYPES.JSXFragment || stmt.argument.type === import_utils12.AST_NODE_TYPES.ConditionalExpression && hasJSXInConditional(stmt.argument) || stmt.argument.type === import_utils12.AST_NODE_TYPES.LogicalExpression && hasJSXInLogical(stmt.argument);
|
|
855
917
|
}
|
|
856
918
|
return false;
|
|
857
919
|
});
|
|
858
920
|
}
|
|
859
921
|
function isReactComponent(node) {
|
|
860
|
-
if (node.type ===
|
|
861
|
-
if (node.body.type ===
|
|
922
|
+
if (node.type === import_utils12.AST_NODE_TYPES.ArrowFunctionExpression) {
|
|
923
|
+
if (node.body.type === import_utils12.AST_NODE_TYPES.JSXElement || node.body.type === import_utils12.AST_NODE_TYPES.JSXFragment) {
|
|
862
924
|
return true;
|
|
863
925
|
}
|
|
864
|
-
if (node.body.type ===
|
|
926
|
+
if (node.body.type === import_utils12.AST_NODE_TYPES.BlockStatement) {
|
|
865
927
|
return hasJSXReturn(node.body);
|
|
866
928
|
}
|
|
867
|
-
} else if (node.type ===
|
|
868
|
-
if (node.body && node.body.type ===
|
|
929
|
+
} else if (node.type === import_utils12.AST_NODE_TYPES.FunctionExpression || node.type === import_utils12.AST_NODE_TYPES.FunctionDeclaration) {
|
|
930
|
+
if (node.body && node.body.type === import_utils12.AST_NODE_TYPES.BlockStatement) {
|
|
869
931
|
return hasJSXReturn(node.body);
|
|
870
932
|
}
|
|
871
933
|
}
|
|
@@ -879,9 +941,9 @@ var reactPropsDestructure = createRule11({
|
|
|
879
941
|
return;
|
|
880
942
|
}
|
|
881
943
|
const param = node.params[0];
|
|
882
|
-
if (param.type ===
|
|
883
|
-
const properties = param.properties.filter((prop) => prop.type ===
|
|
884
|
-
if (prop.key.type ===
|
|
944
|
+
if (param.type === import_utils12.AST_NODE_TYPES.ObjectPattern) {
|
|
945
|
+
const properties = param.properties.filter((prop) => prop.type === import_utils12.AST_NODE_TYPES.Property).map((prop) => {
|
|
946
|
+
if (prop.key.type === import_utils12.AST_NODE_TYPES.Identifier) {
|
|
885
947
|
return prop.key.name;
|
|
886
948
|
}
|
|
887
949
|
return null;
|
|
@@ -922,6 +984,7 @@ var rules = {
|
|
|
922
984
|
"prefer-destructuring-params": prefer_destructuring_params_default,
|
|
923
985
|
"prefer-import-type": prefer_import_type_default,
|
|
924
986
|
"prefer-interface-over-inline-types": prefer_interface_over_inline_types_default,
|
|
987
|
+
"prefer-named-param-types": prefer_named_param_types_default,
|
|
925
988
|
"prefer-react-import-types": prefer_react_import_types_default,
|
|
926
989
|
"react-props-destructure": react_props_destructure_default
|
|
927
990
|
};
|
|
@@ -936,6 +999,7 @@ var baseRules = {
|
|
|
936
999
|
"nextfriday/prefer-destructuring-params": "warn",
|
|
937
1000
|
"nextfriday/no-explicit-return-type": "warn",
|
|
938
1001
|
"nextfriday/prefer-import-type": "warn",
|
|
1002
|
+
"nextfriday/prefer-named-param-types": "warn",
|
|
939
1003
|
"nextfriday/prefer-react-import-types": "warn"
|
|
940
1004
|
};
|
|
941
1005
|
var baseRecommendedRules = {
|
|
@@ -945,6 +1009,7 @@ var baseRecommendedRules = {
|
|
|
945
1009
|
"nextfriday/prefer-destructuring-params": "error",
|
|
946
1010
|
"nextfriday/no-explicit-return-type": "error",
|
|
947
1011
|
"nextfriday/prefer-import-type": "error",
|
|
1012
|
+
"nextfriday/prefer-named-param-types": "error",
|
|
948
1013
|
"nextfriday/prefer-react-import-types": "error"
|
|
949
1014
|
};
|
|
950
1015
|
var jsxRules = {
|