dot-notation doesn't work if backtick is used
See original GitHub issueTell us about your environment macOS 10.12.6, VS Code
- ESLint Version: 4.7.2
- Node Version: 8.4.0
- npm Version: 5.3.0
What parser (default, Babel-ESLint, etc.) are you using? Babel-ESLint
Please show your full configuration:
Configuration
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": false
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true,
"jsx": true
}
},
"rules": {
"no-undef": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"babel/no-undef": "off",
"no-var": "off",
"no-use-before-define": "off",
"curly": "off"
},
"plugins": [
"react",
"babel"
],
"parser": "babel-eslint",
"extends": "dimitarnestorov/warn"
}
What did you do? Please include the actual source code causing the issue.
const features = {};
features[`time`] = true;
What did you expect to happen? dot-notation warning
What actually happened? Please include the actual, raw output from ESLint. No warning
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
why doesn't dot notation work in function parameter? [duplicate]
Likely we have bracket notation that take a string letral for key name or a variable that holds your requested key for the...
Read more >JavaScript for Beginners #44 Objects Dot Notation vs Bracket ...
Here, we will explore the difference between using bracket notation and dot notation with objects.0:00 Setting up our object1:05 Viewing the ...
Read more >Avoiding Dots / Periods in PySpark Column Names
PySpark column names with periods are buggy and need to be escaped with backticks. This post explains that dot notation is used for...
Read more >Strings - The Modern JavaScript Tutorial
Backticks allow a string to span multiple lines and embed expressions ${…} . We can use special characters, such as a line break...
Read more >CoffeeScript
indexOf if you use the in operator, or destructuring or spread/rest syntax; ... The JavaScript arguments object is a useful way to work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @dimitarnestorov, thanks for the report. I can reproduce this issue.
Yeah exactly. To get the template literals to work, it needs to be ES2015 at least. Yep other tests use the parserOptions in a similar way.