Add lint command to js packages

Update lint js commands

Update customer-effort-score/package.json
This commit is contained in:
Chi-Hsuan Huang 2022-03-28 16:42:22 +08:00
parent 8b2a97d405
commit df5b506b97
18 changed files with 848 additions and 30 deletions

View File

@ -37,6 +37,8 @@
"@types/puppeteer": "^5.4.5",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@woocommerce/api": "^0.2.0",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"jest-mock-extended": "^1.0.18",
@ -48,10 +50,11 @@
"access": "public"
},
"scripts": {
"prepare": "pnpm run build",
"prepare": "pnpm run build",
"build": "tsc --build",
"start": "tsc --build --watch",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint": "eslint src",
"prepack": "pnpm run clean && pnpm run build"
}
}

View File

@ -95,9 +95,11 @@
"@testing-library/user-event": "^13.5.0",
"@woocommerce/style-build": "workspace:*",
"@wordpress/browserslist-config": "^4.1.1",
"@wordpress/eslint-plugin": "^11.0.0",
"@wordpress/scripts": "^12.6.1",
"concurrently": "^7.0.0",
"css-loader": "^3.6.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
@ -113,6 +115,7 @@
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint": "eslint src",
"prepack": "pnpm run clean && pnpm run build",
"start": "concurrently \"tsc --build ./tsconfig.json --watch\" \"webpack --watch\"",
"test": "pnpm run build && pnpm run test:nobuild",

View File

@ -32,12 +32,15 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -35,12 +35,15 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -41,8 +41,10 @@
"@types/wordpress__components": "^9.8.6",
"@woocommerce/style-build": "workspace:*",
"@wordpress/browserslist-config": "^4.1.1",
"@wordpress/eslint-plugin": "^11.0.0",
"concurrently": "^7.0.0",
"css-loader": "^3.6.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
@ -64,6 +66,7 @@
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"

View File

@ -46,6 +46,8 @@
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^7.0.2",
"@types/wordpress__data-controls": "^2.2.0",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",
@ -63,6 +65,7 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"

View File

@ -28,7 +28,9 @@
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"d3-time-format": "^2.3.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",
@ -46,6 +48,7 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"

View File

@ -54,8 +54,10 @@
"@types/react-transition-group": "^4.4.4",
"@woocommerce/style-build": "workspace:*",
"@wordpress/browserslist-config": "^4.1.1",
"@wordpress/eslint-plugin": "^11.0.0",
"concurrently": "^7.0.0",
"css-loader": "^3.6.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
@ -77,6 +79,7 @@
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"

View File

@ -37,6 +37,8 @@
"@types/cookie": "^0.4.1",
"@types/node": "^17.0.21",
"@types/qs": "^6.9.7",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",
@ -48,6 +50,7 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"

View File

@ -20,7 +20,8 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"ts:check": "tsc --noEmit --project ./tsconfig.json",
"clean": "pnpm exec rimraf *.tsbuildinfo build build-*",
"prepack": "pnpm run clean && pnpm run build"
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
},
"dependencies": {
"@testing-library/jest-dom": "^5.16.2",
@ -32,6 +33,8 @@
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -42,12 +42,15 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -39,10 +39,13 @@
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build"
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -30,12 +30,15 @@
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src",
"test": "pnpm run build && pnpm run test:nobuild",
"test:nobuild": "jest --config ./jest.config.json",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -38,7 +38,9 @@
"@babel/core": "^7.17.5",
"@woocommerce/style-build": "workspace:*",
"@wordpress/browserslist-config": "^4.1.1",
"@wordpress/eslint-plugin": "^11.0.0",
"css-loader": "^3.6.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0",
@ -55,6 +57,7 @@
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build"
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
}
}

View File

@ -22,15 +22,20 @@
"@wordpress/base-styles": "^3.6.0",
"@wordpress/postcss-plugins-preset": "^1.6.0",
"css-loader": "^3.6.0",
"mini-css-extract-plugin": "^2.6.0",
"postcss-loader": "^3.0.0",
"sass-loader": "^10.2.1",
"webpack-remove-empty-scripts": "^0.7.3",
"mini-css-extract-plugin": "^2.6.0",
"webpack-rtl-plugin": "^2.0.0"
},
"scripts": {
"lint": "eslint index.js"
},
"private": true,
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -30,10 +30,13 @@
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"start": "tsc --build --watch",
"prepack": "pnpm run clean && pnpm run build"
"prepack": "pnpm run clean && pnpm run build",
"lint": "eslint src"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@wordpress/eslint-plugin": "^11.0.0",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"rimraf": "^3.0.2",

View File

@ -46,9 +46,8 @@
"lint": "pnpm run lint:js && pnpm run lint:css",
"lint:css": "stylelint '**/*.scss'",
"lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'",
"lint:js": "wp-scripts lint-js ../../packages/js ./client --ext=js,ts,tsx",
"lint:js": "wp-scripts lint-js ./client --ext=js,ts,tsx",
"lint:js:packages": "wp-scripts lint-js ../../packages/js --ext=js,ts,tsx",
"lint:js:client": "wp-scripts lint-js ./client --ext=js,ts,tsx",
"lint:js-fix": "pnpm run lint:js -- --fix --ext=js,ts,tsx",
"lint:php": "./vendor/bin/phpcs --standard=phpcs.xml.dist $(git ls-files | grep .php$)",
"lint:php-fix": "./vendor/bin/phpcbf --standard=phpcs.xml.dist $(git ls-files | grep .php$)",

File diff suppressed because it is too large Load Diff