Fix code quality issues and add package-lock.json
This commit is contained in:
@@ -26,6 +26,7 @@ We use `@wordpress/env` and Cypress for testing our plugin.
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
/* eslint-env node */
|
||||
|
||||
const { defineConfig } = require('cypress');
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:8888',
|
||||
setupNodeEvents() {
|
||||
// implement node event listeners here
|
||||
},
|
||||
},
|
||||
// This function can be used to register custom Cypress plugins or event listeners.
|
||||
// Currently not in use, but left for future extensibility.
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ class Multisite {
|
||||
*
|
||||
* @return bool Always returns true.
|
||||
*/
|
||||
public function isMultisiteCompatible() {
|
||||
public function is_multisite_compatible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ class Multisite {
|
||||
*
|
||||
* @return array An empty array as this is just a placeholder.
|
||||
*/
|
||||
public function getNetworkSites() {
|
||||
public function get_network_sites() {
|
||||
// This is just a placeholder method.
|
||||
// In a real implementation, you might use get_sites() or a custom query.
|
||||
return function_exists('get_sites') ? get_sites(['public' => 1]) : array();
|
||||
return function_exists( 'get_sites' ) ? get_sites( array( 'public' => 1 ) ) : array();
|
||||
}
|
||||
}
|
||||
|
||||
3273
package-lock.json
generated
Normal file
3273
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wp-plugin-starter-template-for-ai-coding",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.13",
|
||||
"description": "A comprehensive starter template for WordPress plugins with best practices for AI-assisted development.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding#readme",
|
||||
"devDependencies": {
|
||||
"@wordpress/env": "^5.0.0",
|
||||
"cypress": "^9.7.0"
|
||||
"@wordpress/env": "^8.12.0",
|
||||
"cypress": "^13.6.4"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user