Eslint inline comment to allow double quotes in javascript file Eslint inline comment to allow double quotes in javascript file json json

Eslint inline comment to allow double quotes in javascript file


You can disable certain rules for a block by placing a disable rule before the block, and an enable block after it again:

/* eslint-disable no-alert, no-console */var sampleData = [  {"id": 1, "name": "foo"},  {"id": 2, "name": "bar"},    ...];/* eslint-enable no-alert, no-console */


Sometimes it is cumbersome to find a specific syntax to disallow a specific eslint rule. In this situations you can use "global" disabling for a code block as the following:

/*eslint-disable */const sampleData = [  {"id": 1, "name": "foo"},  {"id": 2, "name": "bar"},    ...];/*eslint-enable */