1.0.1 • Published 4 years ago

@gillianwhitehead/eslint-config v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

⚠️ Don't use this package. This is a test and likely buggy ⚠️

This is an ESlint config to be used with React projects.

Install it using your preferred package manager to ensure you get all dependencies.

You will need to install the peer dependencies yourself https://eslint.org/docs/developer-guide/shareable-configs:

"If your shareable config depends on a plugin, you should also specify it as a peerDependency (plugins will be loaded relative to the end user's project, so the end user is required to install the plugins they need). However, if your shareable config depends on a third-party parser or another shareable config, you can specify these packages as dependencies."

Follow the instructions here for adding peer dependencies https://www.npmjs.com/package/eslint-config-airbnb

The instructions are essentially to run

npx install-peerdeps --dev @gillianwhitehead/eslint-config

The command will detect that you are using yarn and will act accordingly. Or to run npm info "@gillianwhitehead/eslint-config" peerDependencies to list the peer dependencies and versions, then run yarn add --dev <dependency>@<version> for each listed peer dependency.

To use this config add a .eslintrc file to the root of your directory, and add the following

{
  "extends": ["@gillianwhitehead/eslint-config"]
}

To lint all your files run:

yarn eslint ./src

Provide the --fix argument to instruct eslint to automatically fix what it can.