Skip to content

Commit

Permalink
Add new lint commands (#8)
Browse files Browse the repository at this point in the history
* Add new lint commands

* Change script name
  • Loading branch information
t-hamano authored Nov 30, 2023
1 parent 003cf3a commit ffdf91d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ const config = {
parenSpacing: true,
parser: 'typescript',
bracketSameLine: false,
}
};

module.exports = config;
14 changes: 6 additions & 8 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module.exports = {
extends: [
'@wordpress/stylelint-config/scss'
],
extends: [ '@wordpress/stylelint-config/scss' ],
rules: {
"no-descending-specificity": null,
"font-weight-notation": null,
"selector-class-pattern": null,
}
}
'no-descending-specificity': null,
'font-weight-notation': null,
'selector-class-pattern': null,
},
};
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Test and Deploy](https://github.com/t-hamano/enable-responsive-image/actions/workflows/run-test-and-deploy.yml/badge.svg)](https://github.com/t-hamano/enable-responsive-image/actions/workflows/run-test-and-deploy.yml)

**⚒️⚒️⚒️ Note: This plugin is under development. Disruptive changes may be made without notice. We recommend that you do not use this plugin on your production site. ⚒️⚒️⚒️**
⚒️⚒️⚒️ **Note: This plugin is under development. Disruptive changes may be made without notice. We recommend that you do not use this plugin on your production site.** ⚒️⚒️⚒️

WordPress plugin that adds settings to the Image block to display different images depending on the width of the screen.

Expand All @@ -16,9 +16,9 @@ WordPress plugin that adds settings to the Image block to display different imag

## How to build

```
$ npm install
$ npm run build
```sh
npm install
npm run build
```

## Filters
Expand Down Expand Up @@ -47,8 +47,8 @@ add_filter( 'enable_responsive_image_default_media_value', 'custom_enable_respon

### Image for screenshot

* License: Public Domain
* Source: https://openverse.org/ja/image/cd8e5cc5-d38a-462e-b4c1-1ea5c6f94e20
- License: Public Domain
- Source: <https://openverse.org/ja/image/cd8e5cc5-d38a-462e-b4c1-1ea5c6f94e20>

## Author

Expand Down
54 changes: 33 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"name": "enable-responsive-image",
"version": "1.0.0",
"description": "WordPress plugin that adds settings to the Image block to display different images depending on the width of the screen.",
"author": "Aki Hamano",
"license": "GPL-2.0+",
"scripts": {
"wp-env": "wp-env",
"stop": "wp-env stop",
"start": "wp-scripts start",
"build": "wp-scripts build",
"lint": "npm run lint:style && npm run lint:js && npm run lint:types && npm run lint:php",
"lint:php": "composer lint",
"lint:js": "wp-scripts lint-js",
"lint:style": "wp-scripts lint-style",
"lint:types": "tsc",
"test": "npm run lint:js && npm run test:e2e",
"test:e2e": "wp-scripts test-playwright",
"test:e2e:debug": "wp-scripts test-playwright --debug"
"license": "GPL-2.0-or-later",
"keywords": ["gutenberg", "block", "image", "responsive"],
"homepage": "https://github.com/t-hamano/enable-responsive-image",
"repository": "git+https://github.com/t-hamano/enable-responsive-image.git",
"bugs": {
"url": "https://github.com/t-hamano/enable-responsive-image/issues"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
},
"volta": {
"node": "16.18.0",
"npm": "8.19.2"
},
"devDependencies": {
"@types/wordpress__block-editor": "11.5.6",
Expand All @@ -27,12 +29,22 @@
"prettier": "npm:[email protected]",
"typescript": "5.2.2"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
},
"volta": {
"node": "16.18.0",
"npm": "8.19.2"
"scripts": {
"wp-env": "wp-env",
"stop": "wp-env stop",
"start": "wp-scripts start",
"build": "wp-scripts build",
"check-licenses": "wp-scripts check-licenses",
"lint": "npm run lint:css && npm run lint:js && npm run lint:types && npm run lint:php && npm run lint:md-docs && npm run lint:pkg-json",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"lint:types": "tsc",
"lint:php": "composer lint",
"lint:md-docs": "wp-scripts lint-md-docs",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"format": "wp-scripts format",
"test": "npm run lint:js && npm run test:e2e",
"test:e2e": "wp-scripts test-playwright",
"test:e2e:debug": "wp-scripts test-playwright --debug"
}
}

0 comments on commit ffdf91d

Please sign in to comment.