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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 馃幐 add ramda and test-tools import messages #42

Merged
merged 3 commits into from Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -39,6 +39,7 @@
"postinstall": "lerna bootstrap && yarn build && lerna link"
},
"devDependencies": {
"@geut/chan": "^2.1.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Wtf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

馃ぃ util to add changes to the changelog following the keep a changelog pattern. It was already being used in the project, I just forgot to add it to the deps https://github.com/geut/chan/tree/master/packages/chan

"eslint": "^6.7.0",
"husky": "^4.2.0",
"lerna": "^3.18.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-config-vtex/CHANGELOG.md
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Add warning message for lodash and @testing-library imports.

## [12.0.3] - 2020-01-24
### Fixed
Expand Down
11 changes: 10 additions & 1 deletion packages/eslint-config-vtex/rules/imports.js
Expand Up @@ -8,7 +8,16 @@ module.exports = {
'no-restricted-imports': [
'error',
{
paths: ['lodash'],
paths: [
{
name: 'lodash',
message: "Please use 'ramda' instead",
},
{
name: '@testing-library/react',
message: "Please use '@vtex/test-tools/react' instead",
},
],
patterns: ['lodash/*'],
},
],
Expand Down