Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with running the plugin? #316

Open
ghost opened this issue Apr 28, 2022 · 0 comments
Open

Help with running the plugin? #316

ghost opened this issue Apr 28, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 28, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants