question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint-config-airbnb not showing any problems

See original GitHub issue

Not sure if i’m including the airbnb eslint plugin incorrectly, but it doesn’t seem to be hitting any of the rules. While running just ./node_modules/.bin/eslint < file name > it only seems to be picking up the jsx-a11y rules.

e.g. it will only return

  31:19  error  Links must not point to "#". Use a more descriptive href or use a button instead  jsx-a11y/href-no-hash
  41:25  error  Links must not point to "#". Use a more descriptive href or use a button instead  jsx-a11y/href-no-hash
  45:19  error  Links must not point to "#". Use a more descriptive href or use a button instead  jsx-a11y/href-no-hash
  54:25  error  Links must not point to "#". Use a more descriptive href or use a button instead  jsx-a11y/href-no-hash 

Meanwhile, while using eslint-loader I get closer to 80 problems / what I expected, including things like max-len indent, quotes , etc.

My .eslintrc.json:

{ "extends": "airbnb", "plugins": [ "react", "jsx-a11y", "import" ] }

From my package.json:

    "eslint": "^3.4.0",
    "eslint-config-airbnb": "^10.0.1",
    "eslint-loader": "^1.5.0",
    "eslint-plugin-import": "^1.14.0",
    "eslint-plugin-jsx-a11y": "^2.2.0",
    "eslint-plugin-react": "^6.2.0",

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
iamyokicommented, Mar 26, 2021

Try To Restart Eslint Server

0reactions
lbalcedacommented, Aug 31, 2016

It appears my configuration was set up correctly, however my setup for eslint-loader was incorrect and causing confusion. It was running against already transpiled code vs running against source. Had to move it into a pre-loader

 module: {
    preLoaders: [
      {test: /\.js$/, loader: "eslint-loader", exclude: /node_modules/}
    ]
  }

Thank you for reaching out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eslint with airbnb does not load when using .eslint.json
When you use the eslint-config-airbnb-base package via the command below... $ npm install --save-dev eslint-config-airbnb-base.
Read more >
eslint-config-airbnb
This package provides Airbnb's .eslintrc as an extensible shared config. Usage. We export three ESLint configurations for your usage. eslint- ...
Read more >
ESLint | WebStorm Documentation
To configure ESLint automatically in the current project, open the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Languages & Frameworks | ...
Read more >
eslint-config-airbnb-standard - npm package
The npm package eslint-config-airbnb-standard was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed ...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
JavaScript (ESM) - use .eslintrc.cjs when running ESLint in JavaScript packages that specify "type":"module" in their package.json . Note that ESLint does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found