initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
31
github/codeql-action-v1/node_modules/eslint-plugin-github/lib/rules/no-d-none.js
generated
vendored
Normal file
31
github/codeql-action-v1/node_modules/eslint-plugin-github/lib/rules/no-d-none.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
module.exports = {
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'disallow usage the `d-none` CSS class',
|
||||
url: require('../url')(module)
|
||||
},
|
||||
schema: []
|
||||
},
|
||||
create(context) {
|
||||
return {
|
||||
CallExpression(node) {
|
||||
if (
|
||||
node.callee.type === 'MemberExpression' &&
|
||||
node.callee.object.property &&
|
||||
node.callee.object.property.name === 'classList'
|
||||
) {
|
||||
const invalidArgument = node.arguments.some(arg => {
|
||||
return arg.type === 'Literal' && arg.value === 'd-none'
|
||||
})
|
||||
if (invalidArgument) {
|
||||
context.report({
|
||||
node,
|
||||
message: 'Prefer hidden property to d-none class'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue