-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
chore: remove lint exceptions for files in examples folder
#13346
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
Conversation
| rules: { | ||
| 'import/no-unresolved': ['error', {ignore: ['^react-native$']}], | ||
| 'import/order': 'off', | ||
| 'no-restricted-imports': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without turning this off ESLint is pushing to use graceful-fs.
| const path = require('path'); | ||
|
|
||
| const fs = require('fs'); | ||
| import fs from 'fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be ESM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't hurt, tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was hard to look at require('jest-environment-node').default above. That’s the only reason. I can revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, it's fine. Sorta surprised it works tho - the default in CJS is different from native ESM default. Can use const {TestEnvironment} = require('jest-environment-jsdom')
SimenB
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
From #13345 (comment)
Summary
Strangely ESLint rule
'import/order'is set to'off'for theexamplesfolder. I double checked if that is somehow needed to keep the examples and docs in sync. Can’t find any reason. I think same lint rule can be applied for examples as well as code base.Test plan
Green CI.