feat: add prettier lint scripts and workflow (#3546)
* feat: add lint scripts and workflow Signed-off-by: kushthedude <kushthedude@gmail.com> * fix lint Signed-off-by: kushthedude <kushthedude@gmail.com>
This commit is contained in:
parent
54f438721e
commit
6750a45d53
5
.github/workflows/pull_request.yml
vendored
5
.github/workflows/pull_request.yml
vendored
@ -130,6 +130,11 @@ jobs:
|
||||
npm i -g yarn
|
||||
yarn install
|
||||
|
||||
- name: Lint with Prettier
|
||||
run: |
|
||||
cd ./main/tests/cypress
|
||||
yarn check-lint
|
||||
|
||||
- name: Test with Cypress on ${{ matrix.browser }}
|
||||
run: |
|
||||
echo REFINE_MIN_MEMORY=1400M >> ./refine.ini
|
||||
|
@ -74,7 +74,6 @@ describe(__filename, function () {
|
||||
cy.columnActionClick('Date', ['Sort', 'Remove sort'])
|
||||
cy.getCell(0, 'Date').should('to.contain', '2020-12-17T00:00:00Z')
|
||||
cy.getCell(1, 'Date').should('to.contain', '2020-08-17T00:00:00Z')
|
||||
|
||||
})
|
||||
it('Perform a bool sort + Reverse + Remove', function () {
|
||||
cy.loadAndVisitProject('food.sort')
|
||||
|
@ -69,7 +69,24 @@ Cypress.Commands.add('loadProject', (fixture, projectName, tagName) => {
|
||||
// the following code can be used to inject tags in created projects
|
||||
// It's conflicting though, breaking up the CSV files
|
||||
// It is a hack to parse out CSV files in the openrefine while creating a project with tags
|
||||
const options = {"encoding":"US-ASCII","separator":",","ignoreLines":-1,"headerLines":1,"skipDataLines":0,"limit":-1,"storeBlankRows":true,"guessCellValueTypes":false,"processQuotes":true,"quoteCharacter":"\"","storeBlankCellsAsNulls":true,"includeFileSources":false,"includeArchiveFileName":false,"trimStrings":false,"projectName":openRefineProjectName,"projectTags": [tagName]}
|
||||
const options = {
|
||||
encoding: 'US-ASCII',
|
||||
separator: ',',
|
||||
ignoreLines: -1,
|
||||
headerLines: 1,
|
||||
skipDataLines: 0,
|
||||
limit: -1,
|
||||
storeBlankRows: true,
|
||||
guessCellValueTypes: false,
|
||||
processQuotes: true,
|
||||
quoteCharacter: '"',
|
||||
storeBlankCellsAsNulls: true,
|
||||
includeFileSources: false,
|
||||
includeArchiveFileName: false,
|
||||
trimStrings: false,
|
||||
projectName: openRefineProjectName,
|
||||
projectTags: [tagName],
|
||||
}
|
||||
var postData
|
||||
if (tagName == undefined) {
|
||||
postData =
|
||||
|
@ -5,6 +5,11 @@
|
||||
"license": "BSD-3-Clause",
|
||||
"author": "OpenRefine",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "cypress run --browser electron --headless --quiet",
|
||||
"lint": "prettier --write .",
|
||||
"check-lint": "prettier --check ."
|
||||
},
|
||||
"dependencies": {
|
||||
"cypress": "6.2.1",
|
||||
"cypress-file-upload": "^5.0.2",
|
||||
|
Loading…
Reference in New Issue
Block a user