Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flipgive/eslint-config

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flipgive/eslint-config

Shared flipgive eslint config

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72
decreased by-28%
Maintainers
0
Weekly downloads
 
Created
Source

@flipgive/eslint-config

A custom ESLint configuration for both web (Next.js) and React Native projects.

npm license downloads

Installation

Install the package via npm:

npm install @flipgive/eslint-config

Usage

Create or update your .eslintrc.js file in your project to use the custom ESLint package:

const { generateConfig } = require("../../lib");
const schemaPath = "";
const { reactNativeConfig } = generateConfig(schemaPath);

module.exports = {
  ...reactNativeConfig,
  root: true,
  parserOptions: {
    ecmaVersion: 2020,
    sourceType: "module",
    tsconfigRootDir: __dirname,
    project: ["./tsconfig.json"],
  },
  settings: {
    ...reactNativeConfig.settings,
    "import/resolver": {
      typescript: {
        project: __dirname + "/tsconfig.json",
      },
    },
  },
};

Replace ./path/to/your/schema.graphql with the actual path to your schema.graphql file.

Handling Module Path Resolution Errors

If you encounter an error like:

error Unable to resolve path to module '@/my-path' import/no-unresolved

You can resolve this by configuring ESLint to understand your module aliases. Follow these steps:

Step 1: Install the Necessary Package

First, you need to install the eslint-import-resolver-alias package:

npm install --save-dev eslint-import-resolver-alias

Step 2: Configure ESLint to Use the Alias Resolver

Update your ESLint configuration to use the eslint-import-resolver-alias resolver. You can do this by adding the following to your ESLint configuration file (e.g., .eslintrc.js).

Configuration Details

This package includes the following configurations:

Web (Next.js)

  • Plugins:

    • promise
    • react
    • react-hooks
    • graphql
    • import
    • workspaces
    • @typescript-eslint
    • typescript-sort-keys
    • turbo
    • deprecate
  • Extends:

    • airbnb
    • eslint:recommended
    • next
    • plugin:@typescript-eslint/recommended
    • plugin:@typescript-eslint/recommended-requiring-type-checking
    • plugin:promise/recommended
    • plugin:react/recommended
    • plugin:import/recommended
    • plugin:import/typescript
    • plugin:workspaces/recommended
    • prettier
    • plugin:storybook/recommended

React Native

  • Plugins:

    • promise
    • react
    • react-hooks
    • graphql
    • import
    • workspaces
    • @typescript-eslint
    • typescript-sort-keys
    • turbo
    • deprecate
  • Extends:

    • universe/native
    • @react-native-community
    • airbnb
    • eslint:recommended
    • plugin:@typescript-eslint/recommended
    • plugin:@typescript-eslint/recommended-requiring-type-checking
    • plugin:promise/recommended
    • plugin:react/recommended
    • plugin:import/recommended
    • plugin:import/typescript
    • prettier

License

MIT

FAQs

Package last updated on 23 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc