Proposal: validate eslintrc's properties
See original GitHub issueTell us about your environment
- ESLint Version: 3.17.1
- Node Version: 7.2.0
- npm Version: 3.10.9
Please show your full configuration:
module.exports = {
ecmaVersion: 2017
};
Current behavior
ESLint ignores properties it doesn’t understand
Suggested behavior
ESLint cli prints a notice about the invalid eslintrc
y tho
The config above looks fine, the property name is correct but its position is wrong. It should be like this:
module.exports = {
parserOptions: {
ecmaVersion: 2017
}
};
I was wondering why ESLint wasn’t recognizing my async/await
and --debug
didn’t mention anything wrong with the config 😦
This didn’t help either, it looked like it was correctly picked up:
$ eslint --print-config index.js
{
"globals": {},
"env": {},
"rules": {},
"parserOptions": {},
"ecmaVersion": 2017
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Setting up ESLint to work with new or proposed JavaScript ...
I'm opting to use @babel/preset-env because it has an easy way to enabled proposals that are shipped in Browsers/Node. Other presets/plugins are ...
Read more >eslint-config-standard with @babel/plugin-proposal-class ...
I'm setting up eslint with eslint-config-standard. I'm also using babel plugin that @babel/plugin-proposal-class-properties. I tried lint my ...
Read more >eslint-plugin-proposal - npm
Start using eslint-plugin-proposal in your project by running `npm i eslint-plugin-proposal`. There is 1 other project in the npm registry ...
Read more >Configuring ESLint - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Setting up efficient workflows with ESLint, Prettier and ...
By default, ESLint will only check for syntax errors. ... how to interpret the naming convention within the properties to be able to...
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
@btmills That sounds like a good idea and is worth further discussion. For the purposes of this issue, though, it seems orthogonal to the question of whether ESLint should validate espree’s config (since we can always add a way for parsers to opt-in to schema validation later). For now, I think we should go with the following:
There are a few reasons I’m opposed to adding a special case to validate
parserOptions
when the default parser is used:Instead of doing their own error handling, what if parsers could optionally supply a schema for their options?