Skip to content

Commit

Permalink
fix eslint-config-react for node 14-20
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrinko committed Mar 19, 2024
1 parent 1a25849 commit 44dbff1
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 44 deletions.
103 changes: 63 additions & 40 deletions eslint-config-react/index.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,71 @@
"use strict";

module.exports = {
"extends": ["airbnb", "plugin:prettier/recommended", "@mate-academy/eslint-config"],
"env": {
"es6": true,
"browser": true
env: {
browser: true,
es2021: true,
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
extends: [
'plugin:react/recommended',
'airbnb',
'@mate-academy/eslint-config',
'plugin:prettier/recommended',
],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
"ecmaVersion": 2018,
"sourceType": "module",
ecmaVersion: 12,
sourceType: 'module',
},
"plugins": [
"react",
"prettier"
],
plugins: ['jsx-a11y', 'import', 'react', 'prettier'],
rules: {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"no-console": "error",
"no-param-reassign": [2, { "props": true }],
"no-shadow": ["error", { "builtinGlobals": false }],
"react/destructuring-assignment": 0,
"jsx-a11y/label-has-for": [2, {
"components": ["Label"],
"required": {
"some": ["id", "nesting"]
'jsx-a11y/label-has-for': [
2,
{
components: ['Label'],
required: {
some: ['id', 'nesting'],
},
allowChildren: true,
},
"allowChildren": true
}],
"jsx-a11y/label-has-associated-control": [2, { assert: "either" }],
"padding-line-between-statements": [
"error",
{"blankLine": "always", "prev": "*", "next": "return"},
{"blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{"blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]},
{"blankLine": "always", "prev": "directive", "next": "*"},
{"blankLine": "always", "prev": "block-like", "next": "*"},
],
"import/prefer-default-export": 0,
"implicit-arrow-linebreak": 0
}
'jsx-a11y/label-has-associated-control': [2, { assert: 'either' }],
'jsx-a11y/control-has-associated-label': 'off',
'implicit-arrow-linebreak': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
},
],
'max-len': [
'error',
{
ignoreTemplateLiterals: true,
ignoreComments: true,
},
],
'no-console': 'error',
'no-param-reassign': [2, { props: true }],
'no-shadow': ['error', { builtinGlobals: false }],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var'],
},
{ blankLine: 'always', prev: 'directive', next: '*' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/prop-types': 0,
'react/react-in-jsx-scope': 0,
'react/destructuring-assignment': 0,
},
};
7 changes: 3 additions & 4 deletions eslint-config-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mate-academy/eslint-config-react",
"version": "0.0.15",
"version": "0.0.16",
"description": "React config for Mate academy students based on airbnb",
"main": "index.js",
"scripts": {
Expand All @@ -9,14 +9,13 @@
"author": "Mate academy",
"license": "ISC",
"dependencies": {
"@mate-academy/eslint-config": "*",
"@mate-academy/eslint-config": "latest",
"babel-eslint": "^10.1.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"prettier": "^3.2.5"
"eslint-plugin-react": "^7.33.2"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 44dbff1

Please sign in to comment.