home
This commit is contained in:
parent
a71a3b5593
commit
cb52890889
16657 changed files with 1483086 additions and 1 deletions
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/buffer.js
generated
vendored
Normal file
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/buffer.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
Buffer: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
buffer: {
|
||||
Buffer: { [READ]: true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description:
|
||||
'enforce either `Buffer` or `require("buffer").Buffer`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/buffer.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"buffer\").Buffer'. Use the global variable 'Buffer' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'Buffer'. Use 'require(\"buffer\").Buffer' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
44
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/console.js
generated
vendored
Normal file
44
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/console.js
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
console: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
console: { [READ]: true },
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description: 'enforce either `console` or `require("console")`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"console\")'. Use the global variable 'console' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'console'. Use 'require(\"console\")' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
44
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/process.js
generated
vendored
Normal file
44
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/process.js
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
process: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
process: { [READ]: true },
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description: 'enforce either `process` or `require("process")`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"process\")'. Use the global variable 'process' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'process'. Use 'require(\"process\")' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/text-decoder.js
generated
vendored
Normal file
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/text-decoder.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
TextDecoder: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
util: {
|
||||
TextDecoder: { [READ]: true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description:
|
||||
'enforce either `TextDecoder` or `require("util").TextDecoder`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-decoder.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"util\").TextDecoder'. Use the global variable 'TextDecoder' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'TextDecoder'. Use 'require(\"util\").TextDecoder' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/text-encoder.js
generated
vendored
Normal file
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/text-encoder.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
TextEncoder: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
util: {
|
||||
TextEncoder: { [READ]: true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description:
|
||||
'enforce either `TextEncoder` or `require("util").TextEncoder`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"util\").TextEncoder'. Use the global variable 'TextEncoder' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'TextEncoder'. Use 'require(\"util\").TextEncoder' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/url-search-params.js
generated
vendored
Normal file
47
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/url-search-params.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
URLSearchParams: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
url: {
|
||||
URLSearchParams: { [READ]: true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description:
|
||||
'enforce either `URLSearchParams` or `require("url").URLSearchParams`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"url\").URLSearchParams'. Use the global variable 'URLSearchParams' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'URLSearchParams'. Use 'require(\"url\").URLSearchParams' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
46
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/url.js
generated
vendored
Normal file
46
home/ags/node_modules/eslint-plugin-n/lib/rules/prefer-global/url.js
generated
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* @author Toru Nagashima
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict"
|
||||
|
||||
const { READ } = require("@eslint-community/eslint-utils")
|
||||
const checkForPreferGlobal = require("../../util/check-prefer-global")
|
||||
|
||||
const trackMap = {
|
||||
globals: {
|
||||
URL: { [READ]: true },
|
||||
},
|
||||
modules: {
|
||||
url: {
|
||||
URL: { [READ]: true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description: 'enforce either `URL` or `require("url").URL`',
|
||||
recommended: false,
|
||||
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md",
|
||||
},
|
||||
type: "suggestion",
|
||||
fixable: null,
|
||||
schema: [{ enum: ["always", "never"] }],
|
||||
messages: {
|
||||
preferGlobal:
|
||||
"Unexpected use of 'require(\"url\").URL'. Use the global variable 'URL' instead.",
|
||||
preferModule:
|
||||
"Unexpected use of the global variable 'URL'. Use 'require(\"url\").URL' instead.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
"Program:exit"() {
|
||||
checkForPreferGlobal(context, trackMap)
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue