[Change request]Recognition JSON codes which is embedded in JavaScript code.
See original GitHub issue- ESLint Version:3.17.1
- Node Version:7.7.1
- npm Version:4.1.2
default and airbnb-base
My full configuration:
{
"env": {
"node": true,
"es6": true
},
"extends": [
"airbnb-base"
],
"globals": {
"STATICCONFIG": true
},
"rules": {
"no-console": "off",
"no-param-reassign": [
"error",
{
"props": false
}
],
"func-names": [
"warn",
"never"
],
"quote-props": [
"error",
"always"
]
}
}
For quotes, I prefer this style:
const v1 = 'Use single quotes as default in JavaScript codes.';
const v2 = {
"Use double quotes as default in JSON code" : "even though they are embedded in JavaScript codes."
};
I apologize; if there is already a way to make this; or I made mistakes in my description.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How To Work with JSON in JavaScript - DigitalOcean
This tutorial provides an introduction to working with JSON in JavaScript. Some general use cases of JSON include: storing data, ...
Read more >Working with JSON - Learn web development | MDN
In this article, we've given you a simple guide to using JSON in your programs, including how to create and parse JSON, and...
Read more >JSON editing in Visual Studio Code
Editing JSON with Visual Studio Code. JSON is a data format that is common in configuration files like package.json or project.json .
Read more >Load local JSON file into variable - Stack Overflow
edit To avoid caching, here's the helper function from this blogpost ... example.json { "name": "testing" } // ES6/ES2015 // app.js import *...
Read more >Using embedded JSON style declarations | Maps JavaScript API
You can apply customized styling through an embedded JSON style declarations to the following: Default map. Map types that a user can switch...
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
@libook I’m not sure if it’s weird, I don’t think it’s unreasonable, but I also think that this is an edge-case style that is not a “must have” for core rule. I think this is perfectly reasonable rule to create a plugin for, though. The bar for adding things into the core is pretty high, as we already have a very large number of rules and options, and I don’t think this style meets that high bar. But let’s see what others think.
Thank you all. By the way; please tell me, if there is already plugins can do this.