Skip to content

Commit

Permalink
Merge pull request #836 from WestpacGEL/feature/docs-update
Browse files Browse the repository at this point in the history
Feature/docs update
  • Loading branch information
kenjishiromajp authored Aug 13, 2024
2 parents 4aac036 + 89f85e5 commit 577839b
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .changeset/tricky-coins-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'protoform': minor
'site': minor
'@westpac/eslint-config': minor
---

eslint config separating the turbo config
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ['@westpac/eslint-config'],
extends: ['turbo', '@westpac/eslint-config'],
};
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ const config = withGEL({
export default config;
```

Also you have to create a `postcss.config.js` on the root of your application as follows.

```js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
```

For applications using `brand fonts` add the following options config to the `withGEL` helper.

```ts
Expand Down
2 changes: 1 addition & 1 deletion apps/protoform/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ['@westpac/eslint-config/nextjs'],
extends: ['turbo', '@westpac/eslint-config/nextjs'],
};
1 change: 1 addition & 0 deletions apps/protoform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"autoprefixer": "^10.0.1",
"eslint": "^8.56.0",
"eslint-config-next": "14.2.4",
"eslint-config-turbo": "^0.0.7",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
Expand Down
2 changes: 1 addition & 1 deletion apps/site/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ['@westpac/eslint-config/nextjs'],
extends: ['turbo', '@westpac/eslint-config/nextjs'],
};
1 change: 1 addition & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"autoprefixer": "~10.4.14",
"eslint": "^8.56.0",
"eslint-config-next": "14.2.4",
"eslint-config-turbo": "^0.0.7",
"postcss": "~8.4.31",
"tailwind-variants": "~0.1.13",
"tailwindcss": "~3.3.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Alert, ErrorMessage, Field, Form, FormGroup, FormLabel, Input, Select, SelectProps } from '@westpac/ui';
import { Alert, ErrorMessage, Field, FormGroup, FormLabel, Input, Select, SelectProps } from '@westpac/ui';
import { Fragment, HTMLAttributes, useState } from 'react';

import { EmploymentSelect, IndustrySelect } from './employment.demo';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Image } from '@/components/document-renderer';

import { Colors } from './colors/colors.component';
import { colors } from './colors/colors.preview';
import { AccessibilityDemo } from './components/accessibility-demo';
import { accessibilityDemo } from './components/accessibility-demo/accessibility-demo.preview';
import { designSystemBodyImage } from './components/design-system-body-image';
import { LinkList } from './components/link-list';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ export default config;
`} />
```

Also you have to create a `postcss.config.js` on the root of your application as follows.

```html
<StaticCode language="js" code={`
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
`} />
```

For applications using `brand fonts` add the following options config to the `withGEL` helper.

```html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
All GEL components have a couple of peer dependencies so please ensure the following are installed:

```html
<StaticCode language="js" code={`npm i react@^18.2.0\nnpm i -D tailwindcss postcss autoprefixer`} />
<StaticCode language="js" code={`npm i react@^18.2.0\nnpm i -D tailwindcss@~3.3.2 postcss autoprefixer`} />
```
2 changes: 1 addition & 1 deletion helpers/create-package/.template-ts/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ['@westpac/eslint-config'],
extends: ['turbo', '@westpac/eslint-config'],
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@changesets/cli": "^2.25.2",
"@westpac/eslint-config": "workspace:~",
"@westpac/ts-config": "workspace:~",
"eslint-config-turbo": "^0.0.7",
"husky": "^8.0.3",
"prettier": "^3.2.5",
"shx": "^0.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
jest: true,
},
parserOptions: { ecmaVersion: 9, sourceType: 'module' },
extends: ['turbo', 'eslint:recommended', 'plugin:prettier/recommended', 'plugin:tailwindcss/recommended'],
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'plugin:tailwindcss/recommended'],
plugins: ['import', 'prettier'],
ignorePatterns: ['node_modules/*', 'dist/*'],
rules: {
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 577839b

Please sign in to comment.