Add lint:fix to admin js packages

This commit is contained in:
Paul Sealock 2022-04-27 10:47:07 +12:00
parent 0feaf3a9de
commit 12fef88354
19 changed files with 109 additions and 82 deletions

View File

@ -52,14 +52,15 @@
"scripts": {
"prepare": "pnpm run build",
"build": "tsc --build",
"start": "tsc --build --watch",
"start": "tsc --build --watch",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"prepack": "pnpm run clean && pnpm run build"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
"pnpm lint:fix"
]
}
}

View File

@ -1,61 +1,62 @@
{
"name": "@woocommerce/api",
"version": "0.2.0",
"author": "Automattic",
"description": "A simple interface for interacting with a WooCommerce installation.",
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"keywords": [
"woocommerce",
"e2e"
],
"license": "GPL-3.0+",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"/dist/",
"!*.ts.map",
"!*.tsbuildinfo",
"!/dist/**/__tests__/",
"!/dist/**/__mocks__/",
"!/dist/**/__snapshops__/",
"!/dist/**/__test_data__/"
],
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo",
"compile": "tsc -b",
"build": "pnpm run clean && npm run compile",
"prepare": "pnpm run build",
"lint": "eslint src",
"test": "jest"
},
"dependencies": {
"axios": "^0.24.0",
"create-hmac": "1.1.7",
"oauth-1.0a": "2.2.6"
},
"devDependencies": {
"@types/create-hmac": "1.1.0",
"@types/jest": "^27.0.2",
"@types/node": "13.13.5",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"axios-mock-adapter": "^1.20.0",
"eslint": "^8.2.0",
"jest": "^25",
"ts-jest": "^25",
"typescript": "^4.4.4"
},
"publishConfig": {
"access": "public"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
]
}
"name": "@woocommerce/api",
"version": "0.2.0",
"author": "Automattic",
"description": "A simple interface for interacting with a WooCommerce installation.",
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"keywords": [
"woocommerce",
"e2e"
],
"license": "GPL-3.0+",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"/dist/",
"!*.ts.map",
"!*.tsbuildinfo",
"!/dist/**/__tests__/",
"!/dist/**/__mocks__/",
"!/dist/**/__snapshops__/",
"!/dist/**/__test_data__/"
],
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo",
"compile": "tsc -b",
"build": "pnpm run clean && npm run compile",
"prepare": "pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "jest"
},
"dependencies": {
"axios": "^0.24.0",
"create-hmac": "1.1.7",
"oauth-1.0a": "2.2.6"
},
"devDependencies": {
"@types/create-hmac": "1.1.0",
"@types/jest": "^27.0.2",
"@types/node": "13.13.5",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"axios-mock-adapter": "^1.20.0",
"eslint": "^8.2.0",
"jest": "^25",
"ts-jest": "^25",
"typescript": "^4.4.4"
},
"publishConfig": {
"access": "public"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
}
}

View File

@ -117,6 +117,7 @@
"build:css": "webpack",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint": "eslint src --ext=js,ts,tsx",
"lint:fix": "eslint src --ext=js,ts,tsx --fix",
"prepack": "pnpm run clean && pnpm run build",
"start": "concurrently \"tsc --build ./tsconfig.json --watch\" \"webpack --watch\"",
"test": "pnpm run build && pnpm run test:nobuild",
@ -126,7 +127,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -33,6 +33,7 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
@ -49,7 +50,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -36,6 +36,7 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
@ -52,7 +53,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -67,13 +67,14 @@
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -70,13 +70,14 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -49,13 +49,14 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -35,6 +35,10 @@
"webpack": "^5.70.0",
"webpack-cli": "^3.3.12"
},
"scripts": {
"lint": "eslint src",
"lint:fix": "eslint src --fix"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"

View File

@ -36,7 +36,8 @@
"access": "public"
},
"scripts": {
"lint": "eslint ./rules ./configs"
"lint": "eslint ./rules ./configs",
"lint:fix": "eslint ./rules ./configs --fix"
},
"devDependencies": {
"@babel/core": "^7.17.5",
@ -46,5 +47,10 @@
"rimraf": "^3.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
}
}

View File

@ -81,13 +81,14 @@
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -52,13 +52,14 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -21,7 +21,8 @@
"ts:check": "tsc --noEmit --project ./tsconfig.json",
"clean": "pnpm exec rimraf *.tsbuildinfo build build-*",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
"lint": "eslint src",
"lint:fix": "eslint src --fix"
},
"dependencies": {
"@testing-library/jest-dom": "^5.16.2",
@ -43,7 +44,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
"pnpm lint:fix"
]
}
}

View File

@ -44,6 +44,7 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
@ -61,7 +62,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -40,7 +40,8 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
"lint": "eslint src",
"lint:fix": "eslint src --fix"
},
"devDependencies": {
"@babel/core": "^7.17.5",
@ -54,7 +55,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
"pnpm lint:fix"
]
}
}

View File

@ -31,6 +31,7 @@
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
@ -48,7 +49,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix",
"pnpm lint:fix",
"pnpm test-staged"
]
}

View File

@ -59,11 +59,12 @@
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
"lint": "eslint src",
"lint:fix": "eslint src --fix"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
"pnpm lint:fix"
]
}
}

View File

@ -29,7 +29,8 @@
"webpack-rtl-plugin": "^2.0.0"
},
"scripts": {
"lint": "eslint index.js"
"lint": "eslint index.js",
"lint:fix": "eslint index.js --fix"
},
"private": true,
"devDependencies": {
@ -45,7 +46,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
"pnpm lint:fix"
]
}
}

View File

@ -31,7 +31,8 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
"lint": "eslint src",
"lint:fix": "eslint src --fix"
},
"devDependencies": {
"@babel/core": "^7.17.5",
@ -45,7 +46,7 @@
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
"pnpm lint:fix"
]
}
}