Skip to content

Commit

Permalink
feat(imports): set up imports order
Browse files Browse the repository at this point in the history
Also: change @csquare-ai to @csquare
  • Loading branch information
Mathieu Bour committed Apr 13, 2021
1 parent 6bf6e8f commit 1fc9a64
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 104 deletions.
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ module.exports = {
jsxBracketSameLine: false,
arrowParens: 'always',
endOfLine: 'lf',

// @trivago/prettier-plugin-sort-import
importOrder: ['^react$', '^@.*$', '^[./]'],
};
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog

## [Version 1.1.0 - Public release](https://github.com/csquare-ai/prettier-config/releases/tag/1.1.0)
## [Version 1.1.2 - Docs](https://github.com/csquare-ai/prettier-config/releases/tag/1.1.2)

- **feat**(imports): set up imports order
- **docs**(readme): change @csquare-ai to @csquare

## [Version 1.1.1 - Public release](https://github.com/csquare-ai/prettier-config/releases/tag/1.1.1)

**BREAKING CHANGES**

Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
# `@csquare-ai/prettier-config`
# `@csquare/prettier-config`

[csquare-ai](gttps://github.com/csquare-ai)'s official [Prettier](https://prettier.io) configuration.
[csquare-ai](https://github.com/csquare-ai)'s official [Prettier](https://prettier.io) configuration.

Proudly maintained by:

- Mathieu Bour <[mathieu@csquare.ai](mailto:mathieu@csquare.ai)>
- Clarisse Tarrou <[clarisse@csquare.ai](mailto:clarisse@csquare.ai)>

## Installation

After the private NPM registry setup of the [@csquare-ai organization](https://github.com/csquare-ai/engineering/blob/main/docs/node-js.md#authentication-against-github-packages), simply run:

```bash
npm install --dev @csquare-ai/prettier-config
npm install --dev @csquare/prettier-config
```

Then, ensure that your `package.json` file contains the entry:

```json
{
"prettier": "@csquare-ai/prettier-config"
"prettier": "@csquare/prettier-config"
}
```

## Plugins

In addition to the Prettier default rules, we also use the following plugins:

- [@trivago/prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports)

## References

- [Prettier - Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations)
- [Engineering - Code style](https://github.com/csquare-ai/engineering/blob/main/docs/code-style.md)
139 changes: 44 additions & 95 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@csquare/prettier-config",
"version": "1.1.1",
"version": "1.1.2",
"description": "The csquare-ai enterprise-wide Prettier configuration.",
"keywords": [
"prettier",
Expand All @@ -14,6 +14,9 @@
},
"license": "MIT",
"author": "Mathieu Bour <mathieu@csquare.ai> (https://github.com/mathieu-bour)",
"contributors": [
"Clarisse Tarrou <clarisse@csquare.ai> (https://github.com/ArcticSubmarine)"
],
"main": ".prettierrc.js",
"browser": false,
"repository": "github:csquare-ai/prettier-config",
Expand Down

0 comments on commit 1fc9a64

Please sign in to comment.