title |
---|
no-restricted-syntax |
This file contains rule example code with syntax errors and other problems.
::: incorrect { "sourceType": "script" }
export default "foo";
:::
:::correct
const foo = "bar";
const foo = "baz";
:::
:::correct
/* eslint another-rule: error */
:::
:::correct
/* eslint no-restricted-syntax: "error" */
/* eslint doesn't allow this comment */
:::
:::correct
/* eslint no-restricted-syntax: "error" */
/* eslint no-restricted-syntax: ["error", "ArrayPattern"] */
:::
:::correct { "ecmaVersion": "latest" }
/* eslint no-restricted-syntax: ["error", "ArrayPattern"] */
:::
:::correct { "ecmaVersion": 6 }
/* eslint no-restricted-syntax: ["error", "ArrayPattern"] */
:::
:::correct
/* eslint no-restricted-syntax: ["error", "ArrayPattern"] */
/* eslint-env es6 */
/*eslint-env node */
/*eslint-env*/
:::