Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@hamidfzm/eslint-config

hamidfzm103MIT0.10.0

ESLint configuration used by Hamid FzM.

lint, next, react, react-native, typescript, eslint, eslint-config, eslint-config-hamidfzm, eslint-config-next, eslint-config-react-native, eslint-config-react, eslint-config-typescript, eslint-plugin-import, eslint-plugin-prefer-arrow-functions, eslint-plugin-prettier, eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-react-refresh, eslint-plugin-simple-import-sort

readme

eslint-config

This is a configuration for ESLint created by Hamid FzM, and it is intended to be used for React or NextJS projects that utilize TypeScript.

If you are working on a NextJS project, then please use the @hamidfzm/eslint-config/next configuration.

Install

You can install this configuration using either npm or yarn. Here are the commands:

npm

npm install --save-dev @hamidfzm/eslint-config

yarn

yarn add -D @hamidfzm/eslint-config

Usage

To use this configuration, you need to add an extends property in your .eslintrc.js file with the value of @hamidfzm. Here's an example:

Typical React Project with TypeScript

module.exports = {
  extends: '@hamidfzm',
};

React Project with NextJS

module.exports = {
  extends: '@hamidfzm/next',
};

React Native Project

module.exports = {
  extends: '@hamidfzm/react-native',
};

Additionally, if you want to use Prettier, you can add a .prettierrc.js file with your desired settings. Here's an example:

module.exports = {
  singleQuote: true,
  tabWidth: 2,
  trailingComma: 'all',
  useTabs: false,
};