extends
or rules
keys? I ask because I installed eslint-plugin-tslint to run an instance of tslint inside eslint, handling TSLint rules with no ESLint equivalents yet, but when I test if ESLint is on by enabling an ESLint rule that TSLint won't catch, it doesn't give me an error for violating that rule.
extends
and rules
, including an ESLint rule that TSLint won't catch, but ESLint isn't responding to my test. My test was adding no-debugger
to the ESLint rules
key, and turning off no-debugger in TSLint, and putting a debugger;
statement in my code. It just tells me "Compiled successfully," neither TSLint nor ESLint catch it now. What reasons might stop ESLint from linting?
env
for a specific pattern of files?
*.ts
files?
./node_modules/.bin/eslint --init
at the ESLint Getting Started docs, I get -bash: ./node_modules/.bin/eslint: No such file or directory
. This is after checking that my yarn.lock has the eslint package, and running yarn install
to install all dependencies in case
npm install
to put eslint in the .bin folder
How to understand the source of a linting error?
I have the following code in a project bootstrapped with create-react-app
, but which is extended from multiple configs:
const objectFromNestedEntries = arrayOfEntries => {
if (!Array.isArray(arrayOfEntries)) return arrayOfEntries;
const obj = {};
for (const [key, value] of arrayOfEntries) {
obj[key] = objectFromNestedEntries(value);
}
return obj;
};
and I am getting linting errors that key
and value
are defined, but never used no-unused-vars. However, that's clearly not the case, so how can I determine which line from which config is causing this?