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

Fix prettier extend option overriding curly rule #28713

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

aleqsio
Copy link
Contributor

@aleqsio aleqsio commented May 9, 2024

Why

This rule is already in packages/eslint-config-universe/shared/core.js, but it's overriden by packages/eslint-config-universe/shared/prettier.js > extends: ["prettier"].

Curious if this happens for other rules – will take a look to compare.

How

Used npx eslint --print-config to debug config. Added a rule to the prettier config so that it overrides the rule from extended config.

Test Plan

After this change the rule is now picked up correctly:
image

Assuming this might throw warnings on existing violations, but there are other warns in existing packages for other rules, so I guess this is not a major problem.

Checklist

@aleqsio aleqsio requested a review from tsapeta May 9, 2024 10:57
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 9, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels May 9, 2024
Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Don't we need to fix the code from packages and other apps?

@aleqsio
Copy link
Contributor Author

aleqsio commented May 13, 2024

Yes, we do, I'll probably have another major commit here, but fully autofixed.

@aleqsio aleqsio requested review from tsapeta and removed request for alanjhughes May 13, 2024 12:48
@aleqsio aleqsio marked this pull request as draft May 13, 2024 12:49
Fix lint issues in NCL

Update packages/eslint-config-universe/CHANGELOG.md

Co-authored-by: Expo Bot <[email protected]>

Discard changes to packages/create-expo-module/src/create-expo-module.ts
@aleqsio aleqsio force-pushed the @aleqsio/fix-prettier-eslint-extend-overriding-curly branch from 1330fd4 to fd90458 Compare May 13, 2024 12:52
@expo-bot

This comment was marked as off-topic.

@expo-bot
Copy link
Collaborator

The Pull Request introduced fingerprint changes against the base commit: 8c32982

Fingerprint diff
[
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/android/Permissions.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "69aaaf7adf9565d8b6113d1cf56cc8e1c46984a3"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/plugins/withAndroidBaseMods.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "3d1408a079712251431c64ff7aaebd7158bee68f"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/plugins/withIosBaseMods.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "01bbd3f126524410ede4eebc0c88e29da2fb2768"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/plugins/withMod.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "8c1360ccd81c4bfd540a6bbd39af3a9b35822741"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/plugins/withStaticPlugin.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "7d5039c7377be4d2c4cca6382e28a3c3207c9e34"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/config/build/Config.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "961d9181b9536cb10c5ae4686ab0d7db83d88995"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/image-utils/build/Image.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "759cee6c25c5acdc403daaa02af2db8627e2139e"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/image-utils/build/jimp.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "1b4583976a25cf49eb3845631ac9092bfe78d20c"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid",
      "expoConfigPlugins",
      "expoConfigPlugins"
    ],
    "hash": "e518fd7817f10098195970d34e11fcbb6a7b0233"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo-gl",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid"
    ],
    "hash": "b4f1302c9e6612b46bace257f4419996e3ed9be8"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo-modules-core",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid"
    ],
    "hash": "6ee2034d84096f4b99881f5df92950ed4f6735ae"
  }
]

Generated by PR labeler 🤖

@aleqsio
Copy link
Contributor Author

aleqsio commented May 13, 2024

@tsapeta After linting the entire SDK using et check-packages --all --fix-lint --no-test we're at 339 files – not sure if we're comfortable landing this, even though it's 100% codegen.

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

Successfully merging this pull request may close these issues.

None yet

3 participants