Update checked-in dependencies
This commit is contained in:
parent
49f7b34c3d
commit
5261a1223f
1640 changed files with 174830 additions and 182292 deletions
51
node_modules/eslint-plugin-github/lib/rules/filenames-match-regex.js
generated
vendored
Normal file
51
node_modules/eslint-plugin-github/lib/rules/filenames-match-regex.js
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
// This is adapted from https://github.com/selaux/eslint-plugin-filenames since it's no longer actively maintained
|
||||
// and needed a fix for eslint v9
|
||||
const path = require('path')
|
||||
const parseFilename = require('../utils/parse-filename')
|
||||
const getExportedName = require('../utils/get-exported-name')
|
||||
const isIgnoredFilename = require('../utils/is-ignored-filename')
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'ensure filenames match a regex naming convention',
|
||||
url: require('../url')(module),
|
||||
},
|
||||
schema: {
|
||||
type: 'array',
|
||||
minItems: 0,
|
||||
maxItems: 1,
|
||||
items: [
|
||||
{
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const defaultRegexp = /^([a-z0-9]+)([A-Z][a-z0-9]+)*$/g
|
||||
const conventionRegexp = context.options[0] ? new RegExp(context.options[0]) : defaultRegexp
|
||||
const ignoreExporting = context.options[1] ? context.options[1] : false
|
||||
|
||||
return {
|
||||
Program(node) {
|
||||
const filename = context.getFilename()
|
||||
const absoluteFilename = path.resolve(filename)
|
||||
const parsed = parseFilename(absoluteFilename)
|
||||
const shouldIgnore = isIgnoredFilename(filename)
|
||||
const isExporting = Boolean(getExportedName(node))
|
||||
const matchesRegex = conventionRegexp.test(parsed.name)
|
||||
|
||||
if (shouldIgnore) return
|
||||
if (ignoreExporting && isExporting) return
|
||||
if (!matchesRegex) {
|
||||
context.report(node, "Filename '{{name}}' does not match the regex naming convention.", {
|
||||
name: parsed.base,
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
5
node_modules/eslint-plugin-github/lib/rules/no-implicit-buggy-globals.js
generated
vendored
5
node_modules/eslint-plugin-github/lib/rules/no-implicit-buggy-globals.js
generated
vendored
|
|
@ -9,9 +9,10 @@ module.exports = {
|
|||
},
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode ?? context.getSourceCode()
|
||||
return {
|
||||
Program() {
|
||||
const scope = context.getScope()
|
||||
Program(node) {
|
||||
const scope = sourceCode.getScope(node) ? sourceCode.getScope(node) : context.getScope()
|
||||
|
||||
for (const variable of scope.variables) {
|
||||
if (variable.writeable) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue