Coder Social home page Coder Social logo

chiefmikey / eslint-config-react-app-bump Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 151 KB

A clone of the eslint-config-react-app package with updated dependencies

Home Page: https://www.npmjs.com/package/eslint-config-react-app-bump

License: MIT License

JavaScript 100.00%
dependencies eslint react updated eslint-config-react-app

eslint-config-react-app-bump's Introduction

eslint-config-react-app-bump

An unmodified drop-in replacement clone of the eslint-config-react-app package with updated dependencies

This package includes the shareable ESLint configuration used by Create React App.
Please refer to its documentation:

Usage in Create React App Projects

The easiest way to use this configuration is with Create React App, which includes it by default.

You don’t need to install it separately in Create React App projects.

Usage Outside of Create React App

If you want to use this ESLint configuration in a project not built with Create React App, you can install it with the following steps.

First, install this package and ESLint.

npm install --save-dev eslint-config-react-app eslint@^8.0.0

Then create a file named .eslintrc.json with following contents in the root folder of your project:

{
  "extends": "react-app"
}

That's it! You can override the settings from eslint-config-react-app by editing the .eslintrc.json file. Learn more about configuring ESLint on the ESLint website.

Jest rules

This config also ships with optional Jest rules for ESLint (based on eslint-plugin-jest).

You can enable these rules by adding the Jest config to the extends array in your ESLint config.

{
  "extends": ["react-app", "react-app/jest"]
}

Accessibility Checks

The following rules from the eslint-plugin-jsx-a11y plugin are activated:

If you want to enable even more accessibility rules, you can create an .eslintrc.json file in the root of your project with this content:

{
  "extends": ["react-app", "plugin:jsx-a11y/recommended"],
  "plugins": ["jsx-a11y"]
}

However, if you are using Create React App and have not ejected, any additional rules will only be displayed in the IDE integrations, but not in the browser or the terminal.

eslint-config-react-app-bump's People

Contributors

chiefmikey avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

eslint-config-react-app-bump's Issues

[Bug]: Definition for rule was not found

Contact Details

No response

What happened?

Swapped eslint-config-react-app for [email protected]
Modified eslint config to extend react-app-bump and react-app-bump/jest

Run lint:

Definition for rule 'jest/no-jest-import' was not found - jest/no-jest-import
Definition for rule 'testing-library/await-async-query' was not found - testing-library/await-async-query

I believe this is because this brings in newer versions of eslint-plugin-jest and eslint-plugin-testing-library, and the rules in these libraries have changed, so the rule names in jest.js need updating - e.g. await-async-query is now await-async-queries https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/migration-guides/v6.md

Version

1.0.16

What browsers are you seeing the problem on?

No response

Relevant log output

/Users/josephea/Developer/repo/src/components/error/PageError.test.tsx
  1:1  error  Definition for rule 'jest/no-jest-import' was not found                         jest/no-jest-import
  1:1  error  Definition for rule 'testing-library/await-async-query' was not found           testing-library/await-async-query
  1:1  error  Definition for rule 'testing-library/no-await-sync-query' was not found         testing-library/no-await-sync-query
  1:1  error  Definition for rule 'testing-library/no-render-in-setup' was not found          testing-library/no-render-in-setup
  1:1  error  Definition for rule 'testing-library/no-wait-for-empty-callback' was not found  testing-library/no-wait-for-empty-callback


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.