Skip to content

Commit

Permalink
WIP - tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mkacmar committed Sep 30, 2024
1 parent d435fec commit 54570df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node-version-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Node.js integration

on:
push:
branches: [main]
branches: [main, dev/martinkamar/tests]
pull_request:
branches: [main]

Expand All @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.x, 20.x, 22.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions lib/ast-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ module.exports = {
getNodeTypeAsString(fullTypeChecker, node, context) {
if (fullTypeChecker && node) {
const tsNode = context.sourceCode.parserServices.esTreeNodeToTSNodeMap.get(node);
console.log(tsNode);
const tsType = fullTypeChecker.getTypeAtLocation(tsNode);
console.log(tsType);
const type = fullTypeChecker.typeToString(tsType);
return type;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/no-cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ module.exports = {
const fullTypeChecker = astUtils.getFullTypeChecker(context);
return {
"MemberExpression[property.name='cookie']"(node) {
console.log(node.object, fullTypeChecker ? true : false, astUtils.isDocumentObject(node.object, context, fullTypeChecker));

if (astUtils.isDocumentObject(node.object, context, fullTypeChecker)) {
context.report({
node: node,
Expand Down

0 comments on commit 54570df

Please sign in to comment.