Skip to content

Conversation

@dompuiu
Copy link
Member

@dompuiu dompuiu commented Sep 16, 2021

When I was opening the jest config files in VSCode, eslint was complaining about a few errors. This PR tries to fix these errors.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

require.resolve('@react/react-spectrum/Button');
} catch (err) {
mocks['^@react\/.*'] = 'identity-obj-proxy';
mocks['^@react/.*'] = 'identity-obj-proxy';
Copy link
Member Author

@dompuiu dompuiu Sep 16, 2021

Choose a reason for hiding this comment

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

/ does not need to be escaped. \/ is basically /.

jest.config.js Outdated
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css|styl)$': 'identity-obj-proxy',
'\\.\./Icon/.*$': '<rootDir>/__mocks__/iconMock.js',
'\\.\\./Icon/.*$': '<rootDir>/__mocks__/iconMock.js',
Copy link
Member Author

Choose a reason for hiding this comment

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

\\.\./Icon/.*$ was matching also .a/Icons/something.

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

Looks good, though I'm not sure what you were running that you saw these as errors? From what I can tell we don't run lint against these files, though we probably should.

@dompuiu
Copy link
Member Author

dompuiu commented Sep 16, 2021

@snowystinger VSCode automatically runs eslint when you open files inside a folder that contains an eslint configuration.

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

i removed some dead code that used to help us test parity with an earlier version of our library, we don't do that anymore

@snowystinger snowystinger added the small review Easy to review PR label Oct 8, 2021
Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

LGTM

@LFDanLu LFDanLu merged commit 2731ebc into adobe:main Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small review Easy to review PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants