Skip to content

Commit

Permalink
Update codingStyle.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengyushiang authored Aug 8, 2024
1 parent 67c51e3 commit c693020
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions frontend/codingStyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
// all warning should be resolved
yarn eslint --max-warnings=0
```

### Eslint plugins

- [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort)
Expand All @@ -118,6 +119,40 @@
+ }
},
```

- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)

- Installation

```
yarn add -D eslint-plugin-import
```

- Setup config

```json
"rules": {
"no-restricted-imports": [
"warn",
{
"patterns": [
{
"group": ["@third-party/*"],
"message": "Please import from the 'lib' folder instead of '@third-party/*'."
}
]
}
]
},
"overrides": [
{
"files": ["lib/**/*.{ts,tsx}"],
"rules": {
"no-restricted-imports": "off"
}
}
]
```

## Prettier

Expand Down

0 comments on commit c693020

Please sign in to comment.