Skip to content

Commit ea2d872

Browse files
refactor: use const instead of enum of one member
Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
1 parent e00a46e commit ea2d872

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

lib/rules/no-sync.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ module.exports = {
4545
{
4646
type: "object",
4747
properties: {
48-
from: {
49-
type: "string",
50-
enum: ["file"],
51-
},
48+
from: { const: "file" },
5249
path: {
5350
type: "string",
5451
},
@@ -64,10 +61,7 @@ module.exports = {
6461
{
6562
type: "object",
6663
properties: {
67-
from: {
68-
type: "string",
69-
enum: ["lib"],
70-
},
64+
from: { const: "lib" },
7165
name: {
7266
type: "array",
7367
items: {
@@ -80,10 +74,7 @@ module.exports = {
8074
{
8175
type: "object",
8276
properties: {
83-
from: {
84-
type: "string",
85-
enum: ["package"],
86-
},
77+
from: { const: "package" },
8778
package: {
8879
type: "string",
8980
},

0 commit comments

Comments
 (0)