Add @id to example queries

This commit is contained in:
Arthur Baars
2019-07-25 15:43:39 +02:00
parent bdce7d07c1
commit ccde7cf6cf
142 changed files with 142 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/argumentsparam
* @name Parameters called 'arguments'
* @description Finds parameters called 'arguments'
* @tags parameter

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/call
* @name Calls to function
* @description Finds function calls of the form `eval(...)`
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/callback
* @name Callbacks
* @description Finds functions that are passed as arguments to other functions
* @tags function

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/classdefltctor
* @name Classes with a default constructor
* @description Finds classes that do not declare an explicit constructor
* @tags class

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/classname
* @name Classes called 'File'
* @description Finds classes called 'File'
* @tags class

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/constantbrackets
* @name Constant property name in `[]` property access
* @description Finds property accesses using the square bracket notation
* where the property name is a constant string

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/emptyblock
* @name Empty blocks
* @description Finds empty block statements
* @tags empty

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/emptythen
* @name If statements with empty then branch
* @description Finds 'if' statements where the 'then' branch is
* an empty block statement

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/equalitystmt
* @name Equalities as expression statements
* @description Finds `==` equality expressions that form an expression statement
* @tags comparison

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/evenness
* @name Tests for even numbers
* @description Finds expressions of the form `e % 2 === 0`
* @tags arithmetic

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/exportfn
* @name Default exports exporting a function
* @description Finds 'default' exports that export a function
* @tags module

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/filename
* @name File with given name
* @description Finds files called `index.js`
* @tags file

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/fnnoreturn
* @name Functions without return statements
* @description Finds functions that do not contain a return statement
* @tags function

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/generator
* @name Generator functions
* @description Finds generator functions
* @tags generator

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/iife
* @name Immediately invoked function expressions
* @description Finds calls of the form `(function(...) { ... })(...)`
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/importfrom
* @name Imports from 'react'
* @description Finds import statements that import from module 'react'
* @tags module

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/jsxattribute
* @name JSX attributes
* @description Finds JSX attributes named `dangerouslySetInnerHTML`
* @tags JSX

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/methodcall
* @name Method calls
* @description Finds calls of the form `this.isMounted(...)`
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/namedfnexpr
* @name Named function expression
* @description Finds function expressions that have a name
* @tags function expression

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/newexpr
* @name New expressions
* @description Finds new expressions of the form `new RegExp(...)`
* @tags new

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/propaccess
* @name Property accesses
* @description Finds property accesses of the form `x.innerHTML`
* @tags property

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/rendermethod
* @name Methods named 'render'
* @description Finds methods named 'render'
* @tags class

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/singlequotestring
* @name Single-quoted string literals
* @description Finds string literals using single quotes
* @tags string

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/singletonblock
* @name Singleton blocks
* @description Finds block statements containing a single statement
* @tags block

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/taggedtemplates
* @name Tagged templates
* @description Finds tagged template expressions
* @tags template

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/todocomment
* @name TODO comments
* @description Finds comments containing the word TODO
* @tags comment

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/toomanyparams
* @name Functions with many parameters
* @description Finds functions with more than ten parameters
* @tags function

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/vardecl
* @name Declaration of variable
* @description Finds places where we declare a variable called `v`
* @tags variable

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/varref
* @name Reference to variable
* @description Finds places where we reference a variable called `undefined`
* @tags variable

View File

@@ -1,4 +1,5 @@
/**
* @id js/examples/yieldundefined
* @name Empty yield
* @description Finds yield expressions without an operand
* @tags generator