Questions tagged [eslint-config-airbnb]

Use this tag for the NPM package that provides Airbnb's .eslintrc as an extensible shared config

Relevant links

https://www.npmjs.com/package/eslint-config-airbnb

https://github.com/airbnb/javascript

https://eslint.org/docs/rules/

288 questions
0
votes
2 answers

Alternative to looping inside for ... of and while(true)

Very often I end up writing loops with awaits inside of them, in order to perform some tasks sequentially or achieve a certain interval between iterations. For example: for (const item of items) { await doSomthing(item); } or: while(true) { …
user6269864
0
votes
0 answers

ESlint ignoring rule

I'm VERY new to ESLint, but I love the possibilities of using it as a tool. I have a folder in a Vue project that is the base for my project and I've configured linting for it. When I run it it lints great but I noticed one rule I didn't like was…
ItsPronounced
  • 5,475
  • 13
  • 47
  • 86
0
votes
1 answer

ReactJS eslinting throwing errors on lines that don't exist

I'm quite new to react and webpack but have used eslint and javascript for years but this is really driving me insane. I've created my project and have a actions.js file in my redux folder and in that file all I currently have is export default…
Tom Maton
  • 1,564
  • 3
  • 23
  • 41
0
votes
1 answer

How do I view linting errors when i run 'gulp'?

I'm trying to install the Airbnb JavaScript style guide into my environment. I'm using gulp to show linting errors as I save my .js files but it does not show it. If I do 'eslint main.js' it shows me the errors. Is there any way I can show it…
0
votes
1 answer

'install-peerdeps' is not recognized as an internal or external command, operable program or batch file (windows 7)

I’m trying to setup an ES6 starter project/template/workflow here and I’m trying to include Airbnb’s ESLint/javascript style guide. I currently have ESLint setup in the project. I am on Windows 7, node v8.11.1, npm v4.1.2. Per instructions at…
magenta placenta
  • 1,461
  • 7
  • 22
  • 34
0
votes
0 answers

Error while running ESlint: Cannot read property file

I have the following error in the line of "import React" in each file. import React, { Component } from 'react' The error is the following: Error while running ESlint: Cannot read property file: "path" I already tried a solution to a similar…
Iván
  • 401
  • 2
  • 6
  • 17
0
votes
2 answers

React native-eslint error description is unclear

I created the react-native project and was doing some experiments with style guides and plugin, I created some mistakes to check how eslint error description work. Here is some code which I wrote and put an error(a comma) in app.js file.…
Raj
  • 1,099
  • 2
  • 13
  • 30
0
votes
1 answer

eslint with yarn and create-react-native-app

Has anyone made eslint work with create-react-native-app in vscode on Windows 10? It is so unstable it's making my skin itch! Latest npm doesn't work with create-react-native-app so I installed yarn. Now I can create an app. But I have to do this…
0
votes
2 answers

Use of node with eslint in a javascript webapp

I have a javascript application with eslint set-up and the needed Node modules, all in the same project folder. Node is only used so that eslint works. The whole thing is pushed to GitHub and I'm noticing now the whole node-modules is getting…
Tristan Forward
  • 3,304
  • 7
  • 35
  • 41
0
votes
1 answer

Gulp-eslint causing configuration errors

When trying to run my linter standalone from the command line eslint ., everything works as expected. The issue comes when I try to run an "eslint" task via gulp. My .eslintrc extends airbnb-base which is where the error is being…
wmash
  • 4,032
  • 3
  • 31
  • 69
0
votes
0 answers

ESlint (airbnb) and no lone blocks

I have a method in my vue js app. resetFilter: function() { $('.person').fadeIn(500); this.toggleDepartments; }, The error is "Block is redundant: no lone blocks: How do I rewrite this in ES6 to fix the…
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
0
votes
1 answer

Running Eslint airbnb specific file returns nothing

I'm running node_modules/.bin/eslint app.jsx and it returns nothing. I know there are errors on the page however. Anyone know what is going on? I don't even get a message on screen. If I run: node_modules/.bin/eslint --ext=js --ext=jsx I'll see…
Mok
  • 41
  • 7
0
votes
2 answers

ESLint + Airbnb without eslint-plugin-react

I'm trying to use ESLint + Airbnb and I'm receiving the error message: Failed to load plugin react: Cannot find module 'eslint-plugin-react' But I'm not using eslint-plugin-react see above my .eslintrc.js module.exports = { extends:…
ivomarsan
  • 103
  • 1
  • 4
0
votes
1 answer

`can't resolve reference` eslint warning with react preset

I get the following warnings on every eslint run with config following config. What is it caused by and how do I get rid of it? eslint warnings can't resolve reference #/definitions/basicConfig from id # can't resolve reference…
Wiktor Czajkowski
  • 1,623
  • 1
  • 14
  • 20
0
votes
1 answer

eslint rules that allows `let state = {`

This is my eslintrc. It complains about let state = {dataObjects: insurances } not being correct. What should I do to fix this? The code is running without errors otherwise. .eslintrc { "extends": "airbnb", "env": { "es6": true }, …
martins
  • 9,669
  • 11
  • 57
  • 85