-
-
Notifications
You must be signed in to change notification settings - Fork 420
Closed
Description
package.json:
{
"private": true,
"eslintConfig": {
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": [
"unicorn"
],
"rules": {
"unicorn/escape-case": "error",
"unicorn/no-hex-escape": "error"
}
},
"scripts": {
"test": "eslint test.js"
},
"devDependencies": {
"eslint": "^3.15.0",
"eslint-plugin-unicorn": "^2.0.1"
}
}test.js:
"\\ufeff"
"\\\\xa0"Output:
$ npm test
> @ test /home/lydell/bugs/eslint-plugin-unicorn-bugs
> eslint test.js
/home/lydell/bugs/eslint-plugin-unicorn-bugs/test.js
1:1 error Use uppercase characters for the value of the escape sequence unicorn/escape-case
2:1 error Use uppercase characters for the value of the escape sequence unicorn/escape-case
2:1 error Use unicode escapes instead of hexadecimal escapes unicorn/no-hex-escape
✖ 3 problems (3 errors, 0 warnings)
npm ERR! Test failed. See above for more details.
Expected: No errors.