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
1 answer

Basics for starting an open source node project's contribution guidelines

I'm planning to start an open source project currently in the planning stage I've finalized the tech stack and it'll be mostly node in the back-end and JS SPA framework in the front-end Currently, I'm documenting contribution guidelines. I want the…
ahhmarr
  • 2,296
  • 4
  • 27
  • 30
0
votes
2 answers

eslint-config-airbnb on ubuntu 16.04

I'm running into some issues when trying to install eslint-config-airbnb on Ubuntu 16.04 $ npm install eslint-config-airbnb npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating…
Ryan Ragle
  • 91
  • 1
  • 1
  • 5
0
votes
1 answer

Eslint version automatically downgrading on init

I'm installing ESLint on a project with the following command: npm install --save-dev eslint@latest which gets me the 4.1.1 version of the package. After i init it with the command: ./node_modules/.bin/eslint --init I follow the instructions to…
bashir
  • 3
  • 2
0
votes
1 answer

Can ESLint - Airbnb be installed on Ubuntu 16.04 Sublime Text 3

I don't why I am having such a difficult time trying to install ESLint, and I am starting to think it is because I am on Ubuntu. Basically, I wanted to use the the Airbnb JavaScript and/or Airbnb Ruby style guide for my code because it…
dsomel21
  • 576
  • 2
  • 8
  • 27
0
votes
5 answers

Reduce with deconstruction or forEach - Iteration and Airbnb JavaScript Style Guide

I have an object: things = { table: 'red', chair: 'green' } Adhering to Airbnb's JavaScript Style Guide, I want to create a function that duplicates this object, setting all keys of the object to blue. My 2 options seem to be: 1 Use…
0
votes
0 answers

Why does Airbnb's ESLint config throw errors for For...In loops?

I typically follow Airbnb's ESLint configuration and I noticed I was getting throwing errors for using For...In loops? Why is this the case? I've read into it a bit Here, but I would like a more detailed explanation or example. const data = { …
DanielSD
  • 73
  • 8
0
votes
0 answers

Can't find plugins and modules with ESLint in WebStorm IDE

I've copied over an .eslintrc file from my old React Native project to my new fresh React Native project and I'm getting errors in the WebStorm IDE saying it can't find any of the ESLint plugins and modules. I've configured the project to use…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
0
votes
1 answer

new-cap rules flag missing 'new' for 'class User extends Record(DEFAULTS)'

I am using airbnb style check. One of the enabled rules is new-cap. It will flag missing new in case such as import { Record } from 'typed-immutable'; const user = User(); The error message is 'A function with a name starting with an uppercase…
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304
0
votes
1 answer

why does Eslint throws error with the Airbnb style guide's two spaces rule in atom even though I have it set to two spaces and hard tabs?

I want to use eslint and the Airbnb style guide. But it keeps throwing an error regarding indentation. The error says: Expected indentation of two characters but found 0 But in atom's settings I have the tab length option set (as it is by default)…
user2643810
0
votes
1 answer

Using Airbnb EsLint Configuration with Hound CI

I want to use Hound CI's automated github commenting but have the javascript configured to air bnb's eslint guide (https://www.npmjs.com/package/eslint-config-airbnb). I seem to be failing at getting the configuration of Hound to pick up the eslint…
Chad M
  • 943
  • 1
  • 9
  • 22
0
votes
1 answer

eslint react with airbnb

eslinting with airbnb import React from 'react'; import TopBar from './topBar'; import Content from './content'; class App extends React.Component { render() { return (
Gaurav Gupta
  • 1,929
  • 4
  • 21
  • 40
0
votes
1 answer

Array forEach() vs reduce()

what do you think is the best way to do ? Reduce Way : const result = Object.keys(params).reduce( (previous, key) => { if (this.model.hasOwnProperty(key)) previous[key] = this.model[key](params[key]); return previous; },…
Titozzz
  • 189
  • 2
  • 6
  • 16
-1
votes
1 answer

How to forbid edition of arguments of a function, expect Array.reduce accumulator

I did not find a documentation in the whole eslint website, and I do not know if there is a plugin to forbid arguments editions. Here is an example of code which should be: Incorrect: const incorrectUpdate = (data) => { data.field = data.field ===…
-1
votes
1 answer

couldn't find an option for Airbnb typescript in react js ( next js ) in eslint

screenshoot couldn't find an option for Airbnb typescript in react js ( next js ) in eslint , before this happened I install the storybook and click yes on option to migrate eslint storybook
-1
votes
1 answer

How to define an ESLInt rule for class attributes names?

I am using javascript (not typescript) with eslint and airbnb rules. I wonder if I can specify a rule to validate the naming of class attributes. In particular, I would like to enforce that class attributes starts with "m_" and use snake case.…
cesarpachon
  • 1,179
  • 2
  • 10
  • 23
1 2 3
19
20