Skip to content

Commit

Permalink
Remove file name when import Template Literals
Browse files Browse the repository at this point in the history
  • Loading branch information
DungGramer committed Oct 15, 2022
1 parent ea563e8 commit 19c2845
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 32 deletions.
46 changes: 15 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ pnpm i -D prettier @dunggramer/prettier

To enable the rules, add a `prettier` property in your `package.json`. See the [Prettier configuration docs](https://prettier.io/docs/en/configuration.html) for more details.

```json
```diff
{
"name": "my-projects-name",
"prettier": "@dunggramer/prettier",
+ "prettier": "@dunggramer/prettier",
"devDependencies": {
"@dunggramer/prettier": "^2.2.0"
"@dunggramer/prettier": "^4.0.0"
}
}
```
Expand Down Expand Up @@ -95,42 +95,26 @@ module.exports = {
};
```

```javascript
// prettier.config.js
module.exports = {
plugins: ['@dunggramer/prettier'],
semi: false,
};
```

```javascript
// prettier.config.js
module.exports = {
plugins: [require('@dunggramer/prettier')],
semi: false,
};
```

## Template Literals

If you want using template literals, you can use the following configuration:

```javascript
// .prettierrc
'@dunggramer/prettier/angular/prettier.config';
'@dunggramer/prettier/react';
```

| Language, Framework, Library | Template literals |
| ---------------------------- | --------------------------------------------------- |
| Angular | `@dunggramer/prettier/angular/prettier.config` |
| React | `@dunggramer/prettier/react/prettier.config` |
| Vue | `@dunggramer/prettier/vue/prettier.config` |
| React Native | `@dunggramer/prettier/react-native/prettier.config` |

| Extracted from repository | Template literals |
| ------------------------- | -------------------------------------------------------- |
| Airbnb | `@dunggramer/prettier/airbnb/prettier.config` |
| typescript-eslint | `@dunggramer/prettier/typescript-eslint/prettier.config` |
| Language, Framework, Library | Template literals |
| ---------------------------- | ----------------------------------- |
| Angular | `@dunggramer/prettier/angular` |
| React | `@dunggramer/prettier/react` |
| Vue | `@dunggramer/prettier/vue` |
| React Native | `@dunggramer/prettier/react-native` |

| Extracted from repository | Template literals |
| ------------------------- | ---------------------------------------- |
| Airbnb | `@dunggramer/prettier/airbnb` |
| typescript-eslint | `@dunggramer/prettier/typescript-eslint` |

## Prettier Properties

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dunggramer/prettier",
"version": "3.0.1",
"version": "4.0.0",
"description": "The shareable configuration for Prettier in your project",
"keywords": [
"format code",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 19c2845

Please sign in to comment.