Padding-block rule issue

Viewed 983

I have problem with basic eslint configuration. I've started learning react from tutorials.

I got error:

/NotesInReact/node_modules/eslint-config-airbnb-base/rules/style.js:
        Configuration for rule "padded-blocks" is invalid:
        Value [{"blocks":"never","classes":"never","switches":"never"},{"allowSingleLineBlocks":true}] should NOT have more than 1 items.

Referenced from: /NotesInReact/node_modules/eslint-config-airbnb-base/index.js
Referenced from: /NotesInReact/node_modules/eslint-config-airbnb/index.js
Referenced from: /NotesInReact/.eslintrc.js

My eslint configuration file:

module.exports = {
  extends: [
    'airbnb',
    'prettier',
    'prettier/react',
  ],
  env: {
    jest: true,
  },
  globals: {
    document: true,
  },
  rules: {
    'react/jsx-filename-extension': [
      1,
      { extensions: ['.js'] },
    ],
  },
};

Eslint version- 5.12.0

How can i solve my issue?

1 Answers

Had the same issue. Upgrading to eslint 6.5.1 solved it.

Related