-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Breaking] refactor(eslint-mc-app): simplify and improve usage of esl…
…int config (#1961) * refactor(eslint-mc-app): simplify and improve usage of eslint config * fix(eslint): turn off some rules * docs: update * fix: dep version * docs: improve changelog
- Loading branch information
Showing
15 changed files
with
231 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
'@commercetools-frontend/eslint-config-mc-app': major | ||
--- | ||
|
||
Restructure and simplify ESLint config for MC applications, in particular the rules and list of plugins. | ||
We now base our config to ESLint React App instead of Airbnb. | ||
|
||
Also, there is now only `eslint` as a required peer dependency. | ||
|
||
> Note that this is primarily to avoid consumers having to install all of the potentially required peer dependencies, as per recommendation from ESLint when publishing sharable configs. | ||
> However, all the dependencies are defined with a caret `^` version range, which gives a bit of flexibility to the consumers in case of version conflicts. | ||
```diff | ||
{ | ||
- "babel-eslint": "10.1.0", | ||
"eslint": "7.18.0" | ||
- "eslint-config-airbnb-base": "14.2.1", | ||
- "eslint-config-prettier": "7.2.0", | ||
- "eslint-plugin-babel": "5.3.1", | ||
- "eslint-plugin-import": "2.22.1", | ||
- "eslint-plugin-jest": "24.1.3", | ||
- "eslint-plugin-jest-dom": "3.6.5", | ||
- "eslint-plugin-jsx-a11y": "6.4.1", | ||
- "eslint-plugin-prefer-object-spread": "1.2.1", | ||
- "eslint-plugin-prettier": "3.3.1", | ||
- "eslint-plugin-react": "7.22.0" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
export { default as version } from './version'; | ||
import type { DispatchActionError } from './actions/handle-action-error'; | ||
|
||
export type TDispatchActionError = DispatchActionError; | ||
|
||
export * from './actions'; | ||
export * from './hooks'; | ||
export * from './types'; | ||
|
||
export { default as version } from './version'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const statusCode = { | ||
error: 'error', | ||
warn: 'warn', | ||
off: 'off', | ||
}; | ||
|
||
module.exports = { statusCode }; |
File renamed without changes.
Oops, something went wrong.
7f8b219
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.
Successfully deployed to the following URLs: