Skip to content

Commit 8e106a2

Browse files
committed
Add prettier code styling
1 parent 7a25e70 commit 8e106a2

File tree

7 files changed

+70
-25
lines changed

7 files changed

+70
-25
lines changed

.editorconfig

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
# WordPress Coding Standards
5+
# https://make.wordpress.org/core/handbook/best-practices/coding-standards/
6+
7+
root = true
8+
9+
[*]
10+
charset = utf-8
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
indent_style = tab
15+
16+
[*.css]
17+
indent_style = tab
18+
indent_size = 4
19+
20+
[*.scss]
21+
indent_style = tab
22+
indent_size = 4
23+
24+
[*.txt]
25+
end_of_line = crlf

.eslintrc

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"extends": [
3+
"plugin:@wordpress/eslint-plugin/custom",
4+
"plugin:@wordpress/eslint-plugin/es5",
5+
"plugin:@wordpress/eslint-plugin/jsdoc"
6+
],
7+
"globals": {
8+
"document": "readonly",
9+
"location": "readonly",
10+
"window": "readonly",
11+
"navigator": "readonly",
12+
"wp": "readonly",
13+
"_": "readonly",
14+
"NodeList": "readonly",
15+
"Element": "readonly"
16+
},
17+
"rules": {
18+
"comma-dangle": "off",
19+
"indent": ["error", "tab"],
20+
"no-tabs": 0,
21+
"no-unused-vars": 0,
22+
"no-undef": 0
23+
},
24+
"parserOptions": {
25+
"ecmaVersion": 2017,
26+
"sourceType": "module",
27+
"ecmaFeatures": {
28+
"jsx": true,
29+
"modules": true
30+
}
31+
},
32+
"env": {
33+
"es6": true
34+
}
35+
}

.eslintrc.json

-16
This file was deleted.

assets/src/scripts/modules/carousel.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
class Carousel {
2-
32
constructor() {
43
this.init();
54
}
65

76
init() {
8-
$( '.fade-carousel' ).slick({
7+
$( '.fade-carousel' ).slick( {
98
dots: true,
109
arrows: false,
1110
autoplay: true,
1211
infinite: true,
1312
speed: 500,
1413
fade: true,
1514
cssEase: 'linear'
16-
});
15+
} );
1716
}
1817
}
1918

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "awps",
3-
"version": "4.0.0",
3+
"version": "4.1.0",
44
"description": "Alecaddd WordPress Starter Theme for savvy developers",
55
"main": "index.js",
6+
"prettier": "@wordpress/prettier-config",
67
"scripts": {
78
"dev": "mix",
89
"development": "mix",
@@ -18,6 +19,7 @@
1819
"@babel/preset-react": "^7.0.0",
1920
"@popperjs/core": "^2.8.6",
2021
"@tinypixelco/laravel-mix-wp-blocks": "^1.1.0",
22+
"@wordpress/prettier-config": "^1.0.1",
2123
"autoprefixer": "^10.2.4",
2224
"axios": "^0.21",
2325
"babel-preset-react": "^6.24.1",

style.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
22
Theme Name: Alecaddd WordPress Starter theme
3-
Theme URI: http://alecaddd.com/wp-starter
3+
Theme URI: https://github.com/Alecaddd/awps
44
Author: Alessandro 'Alecaddd' Castellani
5-
Author URI: http://alecaddd.com
5+
Author URI: https://alecaddd.com
66
Description: Alecaddd WordPress Starter Theme for savvy developers
7-
Version: 3.0.0
7+
Version: 4.0.1
88
License: GNU General Public License v3 or later
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1010
Text Domain: awps
11-
*/
11+
*/

webpack.mix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* AWPS uses Laravel Mix
33
*
44
* Check the documentation at
5-
* https://laravel.com/docs/5.6/mix
5+
* https://laravel-mix.com/
66
*/
77

88
let mix = require( 'laravel-mix' );

0 commit comments

Comments
 (0)