Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
A rule from .eslintrc.json isn't being respected, but the same rule in an eslint comment is

The rule "react-redux/useSelector-prefer-selectors" isn't being respected when I put it in my .eslintrc.json, but other rules are. However, when I put

/* eslint react-redux/useSelector-prefer-selectors: "off" */

At the top of the offending file, the error goes away.

My .eslintrc.json file (In my root directory):

{
  "env": {
    "browser": true,
    "commonjs": true,
    "es2020": true,
    "node": false
  },
  "extends": [
    "airbnb",
    "react-app",
    "airbnb/hooks",
    "eslint:recommended",
    "plugin:react/recommended",
    "plugin:react-hooks/recommended",
    "plugin:react-redux/recommended"
  ],
  "parserOptions": {
    "ecmaVersion": 12,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "plugins": [
    "react",
    "react-redux"
  ],
  "rules": {
    "indent": [
      "warn",
      "tab"
    ],
    "no-tabs": "off",
    "no-unused-vars": "warn",
    "consistent-return": "warn",
    "no-mixed-spaces-and-tabs": 0,
    "react/prop-types": 0,
    "unused-imports/no-unused-imports": "off",
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "warn",
    "react-redux/useSelector-prefer-selectors": "off",
    "react/jsx-indent": "off",
    "react/jsx-filename-extension": "off",
    "react/jsx-no-useless-fragment": "warn"
  }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Figured it out thanks to a comment by @guiwme5. While I don't use vscode, I do use WebStorm - and it seems they both have the same issue - they don't reload .eslintrc.* files when they change.

So if you stumble across this trying to figure out why your IDE isn't respecting your eslint rules, try restarting the IDE.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!