Comments checkbox
Hi,
Such an invaluable tool, thank you!
Was hoping to see an option to enable showing comments in the results for parsers supporting including this (optionally) in the results (e.g., espree's comment option).
Hi @brettz9 !
Since it's not possible for me to keep up with the development of all the parsers or which options they accept, I have to rely on others to propose necessary changes. I'd appreciate a pull request that adds the options to those parsers.
Sorry, a bit busy, and not familiar with React or Webpack.
Btw, one other idea also related to expanding the current functionality which I feel would be great--the ability to filter down the tree with esquery selectors.
the ability to filter down the tree with
esqueryselectors
Would also love to have this! @brettz9 do you think that it deserves a new issue? (since this issue's title "Comments checkbox" seems unrelated)
Workaround (for using esquery selectors in AST explorer)
From https://github.com/estools/esquery/issues/107, a tip from @pierpo was to use the "Transform" function with "ESLint v8" and the esquery selector specified as below:
export default function (context) {
return {
"JSXElement[openingElement.name.name='p'] > JSXElement[openingElement.name.name=/^span$/]": (
node
) => {
context.report({
node,
message: "Found"
});
}
};
}
On AST explorer: https://astexplorer.net/#/gist/4699a2ceadc890386cbd0727734c3ca5/c9250ace00e2686b4d95879dff67341ce35d9018
