question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dot-notation doesn't work if backtick is used

See original GitHub issue

Tell 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:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, Sep 25, 2017

Hi @dimitarnestorov, thanks for the report. I can reproduce this issue.

0reactions
philquinncommented, Sep 27, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found