Skip to content

Commit

Permalink
Merge pull request #238 from plentymarkets/test/lint-speed
Browse files Browse the repository at this point in the history
chore: remove prettier plugin from eslint config
  • Loading branch information
ksted authored Nov 29, 2023
2 parents 620b300 + 6546e0f commit 2533b00
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 50 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Closes: #ID
## Describe your changes

## Checklist before requesting a review

- [ ] My code follows the code style of this project.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
- name: Install Dependencies
run: yarn --frozen-lockfile

- name: Build packages
run: yarn build
- name: Run prettier
run: yarn format

- name: Run linter
run: yarn lint
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
__tests__
.nuxt
.turbo
8 changes: 1 addition & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 120,
"jsxSingleQuote": false,
"importOrder": [
"^vue",
"^(nuxt/(.*)$)|^(nuxt$)",
"<THIRD_PARTY_MODULES>",
"^[./]"
]
"jsxSingleQuote": false
}
6 changes: 3 additions & 3 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Naming convention:
- each composables should be prefixed with `use` keyword (`useProduct`)
- composable should follow `Camel case` pattern (`useProductReviews`)

We are using internal [Nuxt.js state management](https://nuxt.com/docs/getting-started/state-management) to lock the data responsibility along with the composition functions (composables). State connected to the certain composable is read-only and modified by the internal modifiers (functions). You can check the `useCart.ts` composable as a reference.
We are using internal [Nuxt.js state management](https://nuxt.com/docs/getting-started/state-management) to lock the data responsibility along with the composition functions (composables). State connected to the certain composable is read-only and modified by the internal modifiers (functions). You can check the `useCart.ts` composable as a reference.

### Components

Expand Down Expand Up @@ -191,7 +191,7 @@ Naming convention:

The data fetching process is handled seamlessly by integrating VSF SDK, which acts as a robust communication layer between the application and the VSF Middleware. The SDK provides a set of convenient and optimized methods to fetch data from various APIs and services.

To simplify the implementation and management of data fetching we're using native Nuxt's composables for [useAsyncData](https://nuxt.com/docs/api/composables/use-async-data) and [useState](https://nuxt.com/docs/getting-started/state-management). It seamlessly integrates with VSF SDK and simplifies the process of caching, synchronizing, and managing the application's data. These functions provide an elegant and efficient way to handle asynchronous data fetching, automatically managing data caching, refetching, and background updates.
To simplify the implementation and management of data fetching we're using native Nuxt's composables for [useAsyncData](https://nuxt.com/docs/api/composables/use-async-data) and [useState](https://nuxt.com/docs/getting-started/state-management). It seamlessly integrates with VSF SDK and simplifies the process of caching, synchronizing, and managing the application's data. These functions provide an elegant and efficient way to handle asynchronous data fetching, automatically managing data caching, refetching, and background updates.

By combining VSF SDK with Nuxt's composables, this project ensures a reliable and performant data fetching experience for the application. Developers can easily fetch, update, and maintain data using composition declarative approach, while the VSF SDK handles the underlying communication and data retrieval tasks.

Expand Down Expand Up @@ -244,7 +244,7 @@ In order to optimize and enhance the performance of the application, several per
> **Note**
> To analyze your app bundles run `npx nuxi analyze` command.
*You can use bundle analyzer to check the whole application structure along with server, or simply jump into the `apps/web` folder to analyze your web application.*
_You can use bundle analyzer to check the whole application structure along with server, or simply jump into the `apps/web` folder to analyze your web application._

#### Web performance automated testing

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
OR OTHER DEALINGS IN THE SOFTWARE.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<a href="https://vuestorefront.io/"><img src="https://user-images.githubusercontent.com/1626923/137092657-fb398d20-b592-4661-a1f9-4135db0b61d5.png" alt="Vue Storefront" height="80px" /></a>

<a href="https://www.plentymarkets.com/"><img src="https://cdn01.plentymarkets.com/avw8j9fg70hi/frontend/plentyShop_LTS/plentysystems-logo.jpg" alt="plentysystems logo" height="160px" /></a>
<a href="https://www.plentymarkets.com/"><img src="https://cdn01.plentymarkets.com/avw8j9fg70hi/frontend/plentyShop_LTS/plentysystems-logo.jpg" alt="plentysystems logo" height="160px" /></a>

<h1 align="center">Vue Storefront 3 Integration With plentysystems</h1>
</div>
Expand All @@ -25,20 +25,20 @@ For plentyShop PWA to run, you have to install plugins that provide additional R

1. Log into your plentysystems system.
2. [Install](https://knowledge.plentymarkets.com/en-gb/manual/main/plugins/installing-added-plugins.html#installing-plugins) the following plugins in the latest version:
- IO
- plentyShop LTS
- PayPal
- Cash in advance
- Pay upon pickup
- DHL Shipping (Versenden)
- Customer feedback
- IO
- plentyShop LTS
- PayPal
- Cash in advance
- Pay upon pickup
- DHL Shipping (Versenden)
- Customer feedback
3. Set the priorities of the plugins, so that IO has the highest priority and plentyShop LTS the second highest. The priorities of all other plugins remains 0.

### System configuration

1. Log into your plentysystems system.
2. Go to **Setup » Guided Tours** and complete **Setting up plentyShop**.
3. *Optional:* Go to **Setup » Orders » Payment » PayPal** and set up your PayPal account.
3. _Optional:_ Go to **Setup » Orders » Payment » PayPal** and set up your PayPal account.

## Local dev setup

Expand Down Expand Up @@ -94,6 +94,7 @@ For detailed setup instructions, refer to the [deployment guide](./docs/deployme
## Resources

### Changelog

[English](./docs/changelog/changelog_en.md)[German](./docs/changelog/changelog_de.md)

### Features
Expand Down
6 changes: 3 additions & 3 deletions apps/server/middleware.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const config = {
location: '@plentymarkets/shop-api/server',
configuration: {
api: {
url: process.env.API_ENDPOINT
}
url: process.env.API_ENDPOINT,
},
},
}
},
},
};

Expand Down
6 changes: 3 additions & 3 deletions apps/server/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from 'tsup'
import { defineConfig } from 'tsup';

export default defineConfig({
entry: ['src/index.ts'],
splitting: false,
sourcemap: true,
clean: true
})
clean: true,
});
2 changes: 2 additions & 0 deletions apps/web/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ module.exports = {
'unicorn/filename-case': 'off',
'no-undef': 'off',
'vue/no-setup-props-destructure': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
},
};
16 changes: 7 additions & 9 deletions apps/web/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { defineConfig } from 'vitepress'
import { defineConfig } from 'vitepress';
import typedocSidebar from '../reference/composables/typedoc-sidebar.json';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "plentyShop PWA Docs",
description: "Documentation of plentyShop PWA",
title: 'plentyShop PWA Docs',
description: 'Documentation of plentyShop PWA',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Composables', link: '/reference/composables/' }
{ text: 'Composables', link: '/reference/composables/' },
],

sidebar: [
Expand All @@ -19,8 +19,6 @@ export default defineConfig({
},
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
]
}
})
socialLinks: [{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }],
},
});
3 changes: 1 addition & 2 deletions apps/web/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
layout: home

hero:
name: "plentyShop PWA"
name: 'plentyShop PWA'
tagline: Composables documentation
actions:
- theme: brand
Expand All @@ -21,4 +21,3 @@ features:
- title: Functions
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"docs:build": "yarn publish-typedoc && vitepress build docs",
"docs:preview": "vitepress preview docs",
"publish-typedoc": "yarn typedoc",
"lint": "nuxt typecheck && eslint --ext .vue,.js,.ts .",
"lint": "eslint --ext .vue,.js,.ts .",
"lint:fix": "eslint --ext .vue,.js,.ts . --fix",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
Expand Down Expand Up @@ -48,7 +48,7 @@
"cypress-real-events": "^1.10.0",
"cypress-wait-until": "^2.0.0",
"eslint": "^8.50.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-config-prettier": "^9.0.0",
"happy-dom": "^12.0.0",
"nuxt": "^3.6.5",
"nuxt-vitest": "^0.10.1",
Expand Down
1 change: 1 addition & 0 deletions docs/config/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Create a `.env` file in the `apps/server` directory with the following content:
```
API_ENDPOINT=https://mevofvd5omld.c01-14.plentymarkets.com
```

Replace the API_ENDPOINT url with the shop domain of your plentyShop.

In the local development environment, the app connects to the provided URL. In production, it connects to the plentysystems system that hosts the app.
13 changes: 6 additions & 7 deletions docs/deployment/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Creating the application adds a new table entry. In the next part, you'll need t
5. Fill in the information according to the table below.
6. Repeat steps 4-5 for the second secret.

| Name | Value |
| ----------- | ----------- |
| `URL_ENDPOINT` | **Upload Endpoint** |
| `URL_ENDPOINT_TOKEN` | **Access key** |
| Name | Value |
| -------------------- | ------------------- |
| `URL_ENDPOINT` | **Upload Endpoint** |
| `URL_ENDPOINT_TOKEN` | **Access key** |

### System URL

Expand All @@ -46,8 +46,8 @@ Creating the application adds a new table entry. In the next part, you'll need t
5. Click on **New repository variable**.
6. Fill in the information according to the table below.

| Name | Value |
| ----------- | ----------- |
| Name | Value |
| --------- | ---------------- |
| `API_URL` | Your shop domain |

### Upload
Expand Down Expand Up @@ -75,7 +75,6 @@ The workflow takes several minutes to complete. You can monitor the progress in
The activation makes the application reachable on the configured domain.
It can take up to 1 hour for the changes to take effect.


## Preview

1. Log into your plentysystems system.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"start": "turbo run start",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"format": "prettier --write \"**/*.{ts,vue,css,scss,md}\"",
"format": "prettier --check \"**/*.{ts,vue,css,scss,md}\"",
"format:fix": "prettier --write \"**/*.{ts,vue,css,scss,md}\"",
"clean": "npx rimraf ./**/node_modules && rm yarn.lock",
"clean:hard": "npx rimraf ./**/node_modules && npx rimraf ./**/lib && rm yarn.lock && npx rimraf ./**/.turbo && npx rimraf ./**/.nuxt",
"test": "turbo run test",
Expand Down
13 changes: 12 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10216,6 +10216,17 @@ __metadata:
languageName: node
linkType: hard

"eslint-config-prettier@npm:^9.0.0":
version: 9.0.0
resolution: "eslint-config-prettier@npm:9.0.0"
peerDependencies:
eslint: ">=7.0.0"
bin:
eslint-config-prettier: bin/cli.js
checksum: 362e991b6cb343f79362bada2d97c202e5303e6865888918a7445c555fb75e4c078b01278e90be98aa98ae22f8597d8e93d48314bec6824f540f7efcab3ce451
languageName: node
linkType: hard

"eslint-etc@npm:^5.1.0":
version: 5.2.1
resolution: "eslint-etc@npm:5.2.1"
Expand Down Expand Up @@ -21319,7 +21330,7 @@ __metadata:
cypress-real-events: ^1.10.0
cypress-wait-until: ^2.0.0
eslint: ^8.50.0
eslint-plugin-prettier: 5.0.1
eslint-config-prettier: ^9.0.0
happy-dom: ^12.0.0
lodash-es: ^4.17.21
nuxt: ^3.6.5
Expand Down

0 comments on commit 2533b00

Please sign in to comment.