Skip to content

Commit 0095723

Browse files
committed
chore: update @mysticatea/eslint-plugin to latest
1 parent f45c614 commit 0095723

40 files changed

+116
-118
lines changed

lib/rules/callback-return.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66

77
module.exports = {
88
meta: {
9-
type: "suggestion",
109
docs: {
1110
description: "require `return` statements after callbacks",
1211
category: "Stylistic Issues",
1312
recommended: false,
1413
url:
1514
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/callback-return.md",
1615
},
16+
fixable: null,
17+
messages: {
18+
missingReturn: "Expected return with your callback function.",
19+
},
1720
schema: [
1821
{
1922
type: "array",
2023
items: { type: "string" },
2124
},
2225
],
23-
fixable: null,
24-
messages: {
25-
missingReturn: "Expected return with your callback function.",
26-
},
26+
type: "suggestion",
2727
},
2828

2929
create(context) {

lib/rules/exports-style.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ module.exports = {
148148
url:
149149
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/exports-style.md",
150150
},
151-
type: "suggestion",
152151
fixable: null,
153152
schema: [
154153
{
@@ -161,6 +160,7 @@ module.exports = {
161160
additionalProperties: false,
162161
},
163162
],
163+
type: "suggestion",
164164
},
165165

166166
create(context) {

lib/rules/global-require.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ function isShadowed(scope, node) {
4949

5050
module.exports = {
5151
meta: {
52-
type: "suggestion",
5352
docs: {
5453
description:
5554
"require `require()` calls to be placed at top-level module scope",
@@ -59,10 +58,11 @@ module.exports = {
5958
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/global-require.md",
6059
},
6160
fixable: null,
62-
schema: [],
6361
messages: {
6462
unexpected: "Unexpected require().",
6563
},
64+
schema: [],
65+
type: "suggestion",
6666
},
6767

6868
create(context) {

lib/rules/handle-callback-err.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
module.exports = {
88
meta: {
9-
type: "suggestion",
109
docs: {
1110
description: "require error handling in callbacks",
1211
category: "Possible Errors",
@@ -15,14 +14,15 @@ module.exports = {
1514
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/handle-callback-err.md",
1615
},
1716
fixable: null,
17+
messages: {
18+
expected: "Expected error to be handled.",
19+
},
1820
schema: [
1921
{
2022
type: "string",
2123
},
2224
],
23-
messages: {
24-
expected: "Expected error to be handled.",
25-
},
25+
type: "suggestion",
2626
},
2727

2828
create(context) {

lib/rules/no-callback-literal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ module.exports = {
1414
url:
1515
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-callback-literal.md",
1616
},
17-
type: "problem",
1817
fixable: null,
1918
schema: [],
19+
type: "problem",
2020
},
2121

2222
create(context) {

lib/rules/no-deprecated-api.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ function toName(type, path) {
659659
return type === ReferenceTracker.CALL
660660
? `${baseName}()`
661661
: type === ReferenceTracker.CONSTRUCT
662-
? `new ${baseName}()`
663-
: baseName
662+
? `new ${baseName}()`
663+
: baseName
664664
}
665665

666666
/**
@@ -688,7 +688,6 @@ module.exports = {
688688
url:
689689
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md",
690690
},
691-
type: "problem",
692691
fixable: null,
693692
schema: [
694693
{
@@ -720,6 +719,7 @@ module.exports = {
720719
additionalProperties: false,
721720
},
722721
],
722+
type: "problem",
723723
},
724724
create(context) {
725725
const {

lib/rules/no-extraneous-import.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module.exports = {
2121
url:
2222
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md",
2323
},
24-
type: "problem",
2524
fixable: null,
2625
schema: [
2726
{
@@ -35,6 +34,7 @@ module.exports = {
3534
additionalProperties: false,
3635
},
3736
],
37+
type: "problem",
3838
},
3939
create(context) {
4040
const filePath = context.getFilename()

lib/rules/no-extraneous-require.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module.exports = {
2121
url:
2222
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md",
2323
},
24-
type: "problem",
2524
fixable: null,
2625
schema: [
2726
{
@@ -35,6 +34,7 @@ module.exports = {
3534
additionalProperties: false,
3635
},
3736
],
37+
type: "problem",
3838
},
3939
create(context) {
4040
const filePath = context.getFilename()

lib/rules/no-hide-core-modules.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const BACK_SLASH = /\\/gu
5050

5151
module.exports = {
5252
meta: {
53+
deprecated: true,
5354
docs: {
5455
description:
5556
"disallow third-party modules which are hiding core modules",
@@ -58,8 +59,6 @@ module.exports = {
5859
url:
5960
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-hide-core-modules.md",
6061
},
61-
type: "problem",
62-
deprecated: true,
6362
fixable: null,
6463
schema: [
6564
{
@@ -77,6 +76,7 @@ module.exports = {
7776
additionalProperties: false,
7877
},
7978
],
79+
type: "problem",
8080
},
8181
create(context) {
8282
if (context.getFilename() === "<input>") {

lib/rules/no-missing-import.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module.exports = {
2020
url:
2121
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md",
2222
},
23-
type: "problem",
2423
fixable: null,
2524
schema: [
2625
{
@@ -33,6 +32,7 @@ module.exports = {
3332
additionalProperties: false,
3433
},
3534
],
35+
type: "problem",
3636
},
3737
create(context) {
3838
const filePath = context.getFilename()

lib/rules/no-missing-require.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module.exports = {
2020
url:
2121
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md",
2222
},
23-
type: "problem",
2423
fixable: null,
2524
schema: [
2625
{
@@ -33,6 +32,7 @@ module.exports = {
3332
additionalProperties: false,
3433
},
3534
],
35+
type: "problem",
3636
},
3737
create(context) {
3838
const filePath = context.getFilename()

lib/rules/no-mixed-requires.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ const BUILTIN_MODULES = [
6767

6868
module.exports = {
6969
meta: {
70-
type: "suggestion",
7170
docs: {
7271
description:
7372
"disallow `require` calls to be mixed with regular variable declarations",
@@ -77,6 +76,11 @@ module.exports = {
7776
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-mixed-requires.md",
7877
},
7978
fixable: null,
79+
messages: {
80+
noMixRequire: "Do not mix 'require' and other declarations.",
81+
noMixCoreModuleFileComputed:
82+
"Do not mix core, module, file and computed requires.",
83+
},
8084
schema: [
8185
{
8286
oneOf: [
@@ -98,11 +102,7 @@ module.exports = {
98102
],
99103
},
100104
],
101-
messages: {
102-
noMixRequire: "Do not mix 'require' and other declarations.",
103-
noMixCoreModuleFileComputed:
104-
"Do not mix core, module, file and computed requires.",
105-
},
105+
type: "suggestion",
106106
},
107107

108108
create(context) {

lib/rules/no-new-require.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
module.exports = {
88
meta: {
9-
type: "suggestion",
109
docs: {
1110
description: "disallow `new` operators with calls to `require`",
1211
category: "Possible Errors",
@@ -15,10 +14,11 @@ module.exports = {
1514
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-new-require.md",
1615
},
1716
fixable: null,
18-
schema: [],
1917
messages: {
2018
noNewRequire: "Unexpected use of new with require.",
2119
},
20+
schema: [],
21+
type: "suggestion",
2222
},
2323

2424
create(context) {

lib/rules/no-path-concat.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ function isConcat(node, sepNodes, globalScope) {
158158

159159
module.exports = {
160160
meta: {
161-
type: "suggestion",
162161
docs: {
163162
description:
164163
"disallow string concatenation with `__dirname` and `__filename`",
@@ -168,11 +167,12 @@ module.exports = {
168167
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-path-concat.md",
169168
},
170169
fixable: null,
171-
schema: [],
172170
messages: {
173171
usePathFunctions:
174172
"Use path.join() or path.resolve() instead of string concatenation.",
175173
},
174+
schema: [],
175+
type: "suggestion",
176176
},
177177

178178
create(context) {

lib/rules/no-process-env.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
module.exports = {
1212
meta: {
13-
type: "suggestion",
1413
docs: {
1514
description: "disallow the use of `process.env`",
1615
category: "Stylistic Issues",
@@ -19,10 +18,11 @@ module.exports = {
1918
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-env.md",
2019
},
2120
fixable: null,
22-
schema: [],
2321
messages: {
2422
unexpectedProcessEnv: "Unexpected use of process.env.",
2523
},
24+
schema: [],
25+
type: "suggestion",
2626
},
2727

2828
create(context) {

lib/rules/no-process-exit.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
module.exports = {
88
meta: {
9-
type: "suggestion",
109
docs: {
1110
description: "disallow the use of `process.exit()`",
1211
category: "Possible Errors",
@@ -15,10 +14,11 @@ module.exports = {
1514
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md",
1615
},
1716
fixable: null,
18-
schema: [],
1917
messages: {
2018
noProcessExit: "Don't use process.exit(); throw an error instead.",
2119
},
20+
schema: [],
21+
type: "suggestion",
2222
},
2323

2424
create(context) {

lib/rules/no-restricted-import.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const visit = require("../util/visit-import")
99

1010
module.exports = {
1111
meta: {
12-
type: "suggestion",
1312
docs: {
1413
description:
1514
"disallow specified modules when loaded by `import` declarations",
@@ -19,6 +18,11 @@ module.exports = {
1918
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-import.md",
2019
},
2120
fixable: null,
21+
messages: {
22+
restricted:
23+
// eslint-disable-next-line @mysticatea/eslint-plugin/report-message-format
24+
"'{{name}}' module is restricted from being used.{{customMessage}}",
25+
},
2226
schema: [
2327
{
2428
type: "array",
@@ -48,11 +52,7 @@ module.exports = {
4852
additionalItems: false,
4953
},
5054
],
51-
messages: {
52-
restricted:
53-
// eslint-disable-next-line @mysticatea/eslint-plugin/report-message-format
54-
"'{{name}}' module is restricted from being used.{{customMessage}}",
55-
},
55+
type: "suggestion",
5656
},
5757

5858
create(context) {

0 commit comments

Comments
 (0)