Skip to content

Help with running the plugin? #316

Description

I'm using a simple Expo blank template on a Visual Studio Code with Prettier and I'm trying to run this plugin so the stylesheets of my project can be sorted alphabetically.

I've installed this module using the following commands:

npm install --save-dev eslint
npm install --save-dev eslint-plugin-react
npm install --save-dev eslint-plugin-react-native
npx eslint --init

Which generated .eslintrc.js in my project's root folder and I changed it's contents with:

module.exports = {
  extends: ["prettier"],
  plugins: ["prettier", "react", "react-native"],
  parserOptions: {
    ecmaVersion: 6,
    sourceType: "module",
    ecmaFeatures: {
      jsx: true,
    },
  },
  env: {
    "react-native/react-native": true,
  },
  rules: {
    "react-native/no-unused-styles": 2,
    "react-native/split-platform-components": 2,
    "react-native/no-inline-styles": 2,
    "react-native/no-color-literals": 2,
    "react-native/no-raw-text": 2,
    "react-native/no-single-element-style-arrays": 2,
  },
};

But now when I'm saving a file only Prettier works - I guess my .eslintrc.js is not correct or I need to run it manually somehow?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions