chore: Lint project

This commit is contained in:
Baptiste Studer 2023-04-02 16:38:03 +02:00
parent 5599104e65
commit 47eec1c705
4 changed files with 9 additions and 17 deletions

View File

@ -11,7 +11,5 @@ jobs:
node-version: '16.14.0'
- name: Install modules
run: yarn install
- name: Run lint
- name: Check linting
run: yarn run lint:check
- name: Run prettier
run: yarn run prettier:check

View File

@ -4,22 +4,19 @@ All notable changes to this project will be documented in this file. See [standa
### [1.18.1](https://github.com/Baboo7/strapi-plugin-import-export-entries/compare/v1.18.0...v1.18.1) (2023-04-02)
### 🐞 Bug Fixes
* back to node-fetch v2 ([aa018cc](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/aa018cc5028e8f36d10adcae75193a7e068557c5))
* **import:** change deprecated request by node-fetch module ([f1e63bb](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/f1e63bb27095e2922e7eae9395e1f2e79f6b4056))
- back to node-fetch v2 ([aa018cc](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/aa018cc5028e8f36d10adcae75193a7e068557c5))
- **import:** change deprecated request by node-fetch module ([f1e63bb](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/f1e63bb27095e2922e7eae9395e1f2e79f6b4056))
### 🛠 Refacto
* **tests:** Move tests to specs folder ([6f0f85c](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/6f0f85c73999e38bde82765b418b32789cf27876))
- **tests:** Move tests to specs folder ([6f0f85c](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/6f0f85c73999e38bde82765b418b32789cf27876))
### 🧹 Chores
* **.versionrc.json:** Update commit keyword ([e7e35af](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/e7e35af98903643463896303ba5438e4713a1f29))
* **package-lock.json:** Fix dependencies vulnerabilities ([d9bd8bc](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/d9bd8bc3ba429e5242169639d3b019014ca641eb))
- **.versionrc.json:** Update commit keyword ([e7e35af](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/e7e35af98903643463896303ba5438e4713a1f29))
- **package-lock.json:** Fix dependencies vulnerabilities ([d9bd8bc](https://github.com/Baboo7/strapi-plugin-import-export-entries/commits/d9bd8bc3ba429e5242169639d3b019014ca641eb))
## [1.18.0](https://github.com/Baboo7/strapi-plugin-import-export-entries/compare/v1.17.3...v1.18.0) (2022-11-05)

View File

@ -17,10 +17,8 @@
"server/"
],
"scripts": {
"lint:check": "eslint .",
"lint:write": "eslint . --fix",
"prettier:check": "yarn prettier --check .",
"prettier:write": "yarn prettier --write .",
"lint:check": "eslint . && yarn prettier --check .",
"lint:fix": "eslint . --fix && yarn prettier --write .",
"test": "jest --forceExit --detectOpenHandles --runInBand",
"test:watch": "jest --forceExit --detectOpenHandles --runInBand --watch",
"release": "standard-version",

View File

@ -130,14 +130,13 @@ const fetchFile = async (url) => {
name: fileData.name,
type: contentType,
size: contentLength,
path: filePath
path: filePath,
};
} catch (error) {
throw new Error(`Tried to fetch file from url ${url} but failed with error: ${error.message}`);
}
};
const writeFile = async (name, content) => {
const tmpWorkingDirectory = await fse.mkdtemp(path.join(os.tmpdir(), 'strapi-upload-'));