Skip to content

Commit e26b9cd

Browse files
committed
release: 1.5.31-beta.1
1 parent c6a3d45 commit e26b9cd

File tree

17 files changed

+125
-32
lines changed

17 files changed

+125
-32
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.31-next.1
1+
1.5.31-beta.1

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/monorepo",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"private": true,
55
"description": "A series of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
66
"keywords": [

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/core",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-debug/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-debug",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's ESLint plugin for debugging related rules.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-debug/src/rules/function-component.spec.ts

+93
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,99 @@ ruleTesterWithTypes.run(RULE_NAME, rule, {
13661366
},
13671367
],
13681368
},
1369+
// TODO: Add support for Atomico
1370+
// {
1371+
// code: /* tsx */ `
1372+
// import { c, useState } from "atomico";
1373+
1374+
// function component(){
1375+
// const [ count, setCount ] = useState(0);
1376+
// return <host>{ count }</host>;
1377+
// }
1378+
1379+
// export const Counter = c(counter);
1380+
// `,
1381+
// errors: [
1382+
// {
1383+
// data: {
1384+
// name: "component",
1385+
// forwardRef: false,
1386+
// hookCalls: 1,
1387+
// memo: false,
1388+
// },
1389+
// messageId: "FUNCTION_COMPONENT",
1390+
// },
1391+
// ],
1392+
// settings: {
1393+
// "react-x": {
1394+
// importSource: "atomico",
1395+
// },
1396+
// },
1397+
// },
1398+
// TODO: Add support for Atomico
1399+
// {
1400+
// code: /* tsx */ `
1401+
// import { Props, c } from "atomico"; // 2.5kB
1402+
1403+
// function component({ name }:Props<typeof component.props>) {
1404+
// return <host shadowDom>Hello, {name}</host>;
1405+
// }
1406+
1407+
// component.props = {
1408+
// name: String,
1409+
// };
1410+
1411+
// export const Component = c(component);
1412+
// `,
1413+
// errors: [
1414+
// {
1415+
// data: {
1416+
// name: "component",
1417+
// forwardRef: false,
1418+
// hookCalls: 0,
1419+
// memo: false,
1420+
// },
1421+
// messageId: "FUNCTION_COMPONENT",
1422+
// },
1423+
// ],
1424+
// settings: {
1425+
// "react-x": {
1426+
// importSource: "atomico",
1427+
// },
1428+
// },
1429+
// },
1430+
// TODO: Add support for Atomico
1431+
// {
1432+
// code: /* tsx */ `
1433+
// import { Props, c } from "atomico"; // 2.5kB
1434+
1435+
// function component({ name }:Props<typeof component.props>) {
1436+
// return <host shadowDom>Hello, {name}</host>;
1437+
// }
1438+
1439+
// component.props = {
1440+
// name: String,
1441+
// };
1442+
1443+
// customElements.define("my-component", c(component));
1444+
// `,
1445+
// errors: [
1446+
// {
1447+
// data: {
1448+
// name: "component",
1449+
// forwardRef: false,
1450+
// hookCalls: 0,
1451+
// memo: false,
1452+
// },
1453+
// messageId: "FUNCTION_COMPONENT",
1454+
// },
1455+
// ],
1456+
// settings: {
1457+
// "react-x": {
1458+
// importSource: "atomico",
1459+
// },
1460+
// },
1461+
// },
13691462
],
13701463
valid: [
13711464
...allFunctions,

packages/plugins/eslint-plugin-react-dom/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-dom",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's ESLint plugin for React DOM related rules.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-hooks-extra/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-hooks-extra",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-naming-convention/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-naming-convention",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's ESLint plugin for naming convention related rules.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-x/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-x",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's ESLint plugin for React related rules.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-x/src/rules/no-leaked-conditional-rendering.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const allowedVariants = [
5555
"truthy string",
5656
] as const satisfies VariantType[];
5757

58-
const tsHelper = {
58+
const tsHelpers = {
5959
isAnyType: (type: ts.Type) => isTypeFlagSet(type, ts.TypeFlags.TypeParameter | ts.TypeFlags.Any),
6060
isBigIntType: (type: ts.Type) => isTypeFlagSet(type, ts.TypeFlags.BigIntLike),
6161
isBooleanType: (type: ts.Type) => isTypeFlagSet(type, ts.TypeFlags.BooleanLike),
@@ -102,14 +102,14 @@ const tsHelper = {
102102
*/
103103
function inspectVariantTypes(types: ts.Type[]) {
104104
const variantTypes = new Set<VariantType>();
105-
if (types.some(tsHelper.isUnknownType)) {
105+
if (types.some(tsHelpers.isUnknownType)) {
106106
variantTypes.add("unknown");
107107
return variantTypes;
108108
}
109-
if (types.some(tsHelper.isNullishType)) {
109+
if (types.some(tsHelpers.isNullishType)) {
110110
variantTypes.add("nullish");
111111
}
112-
const booleans = types.filter(tsHelper.isBooleanType);
112+
const booleans = types.filter(tsHelpers.isBooleanType);
113113
// If incoming type is either "true" or "false", there will be one type
114114
// object with intrinsicName set accordingly
115115
// If incoming type is boolean, there will be two type objects with
@@ -134,40 +134,40 @@ function inspectVariantTypes(types: ts.Type[]) {
134134
break;
135135
}
136136
}
137-
const strings = types.filter(tsHelper.isStringType);
137+
const strings = types.filter(tsHelpers.isStringType);
138138
if (strings.length > 0) {
139139
const evaluated = match<ts.Type[], VariantType>(strings)
140-
.when(types => types.every(tsHelper.isTruthyStringType), F.constant("truthy string"))
141-
.when(types => types.every(tsHelper.isFalsyStringType), F.constant("falsy string"))
140+
.when(types => types.every(tsHelpers.isTruthyStringType), F.constant("truthy string"))
141+
.when(types => types.every(tsHelpers.isFalsyStringType), F.constant("falsy string"))
142142
.otherwise(F.constant("string"));
143143
variantTypes.add(evaluated);
144144
}
145-
const bigints = types.filter(tsHelper.isBigIntType);
145+
const bigints = types.filter(tsHelpers.isBigIntType);
146146
if (bigints.length > 0) {
147147
const evaluated = match<ts.Type[], VariantType>(bigints)
148-
.when(types => types.every(tsHelper.isTruthyBigIntType), F.constant("truthy bigint"))
149-
.when(types => types.every(tsHelper.isFalsyBigIntType), F.constant("falsy bigint"))
148+
.when(types => types.every(tsHelpers.isTruthyBigIntType), F.constant("truthy bigint"))
149+
.when(types => types.every(tsHelpers.isFalsyBigIntType), F.constant("falsy bigint"))
150150
.otherwise(F.constant("bigint"));
151151
variantTypes.add(evaluated);
152152
}
153-
const numbers = types.filter(tsHelper.isNumberType);
153+
const numbers = types.filter(tsHelpers.isNumberType);
154154
if (numbers.length > 0) {
155155
const evaluated = match<ts.Type[], VariantType>(numbers)
156-
.when(types => types.every(tsHelper.isTruthyNumberType), F.constant("truthy number"))
157-
.when(types => types.every(tsHelper.isFalsyNumberType), F.constant("falsy number"))
156+
.when(types => types.every(tsHelpers.isTruthyNumberType), F.constant("truthy number"))
157+
.when(types => types.every(tsHelpers.isFalsyNumberType), F.constant("falsy number"))
158158
.otherwise(F.constant("number"));
159159
variantTypes.add(evaluated);
160160
}
161-
if (types.some(tsHelper.isEnumType)) {
161+
if (types.some(tsHelpers.isEnumType)) {
162162
variantTypes.add("enum");
163163
}
164-
if (types.some(tsHelper.isObjectType)) {
164+
if (types.some(tsHelpers.isObjectType)) {
165165
variantTypes.add("object");
166166
}
167-
if (types.some(tsHelper.isAnyType)) {
167+
if (types.some(tsHelpers.isAnyType)) {
168168
variantTypes.add("any");
169169
}
170-
if (types.some(tsHelper.isNeverType)) {
170+
if (types.some(tsHelpers.isNeverType)) {
171171
variantTypes.add("never");
172172
}
173173
return variantTypes;

packages/plugins/eslint-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/eslint-plugin",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "The main ESLint plugin of ESLint React. Contains all the rules and presets of ESLint React.",
55
"keywords": [
66
"eslint",

packages/shared/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/shared",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's Shared constants and functions.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/tools",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's std library and primitives.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/types",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's type definitions.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/utilities/ast/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/ast",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's TSESTree AST utility module.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/utilities/jsx/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/jsx",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "ESLint React's TSESTree AST utility module for static analysis of JSX.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/utilities/var/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/var",
3-
"version": "1.5.31-next.1",
3+
"version": "1.5.31-beta.1",
44
"description": "TSESTree AST utility module for static analysis of variables",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

0 commit comments

Comments
 (0)