diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7df5a73 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# http://EditorConfig.org + +root = true + +# Unix-style newlines with a newline ending every file +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.csv] +insert_final_newline = false + +[*.{php,py}] +indent_size = 4 + +# https://www.markdownguide.org/basic-syntax/#line-breaks +[*.md] +trim_trailing_whitespace = false diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..029a715 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +node_modules/** +composer.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1a9abe1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1bf553b..7168be7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "cssnano": "^7.0.1", "postcss": "^8.4.38", "postcss-pxtorem": "^6.1.0", + "prettier": "3.2.5", "tailwindcss": "^3.4.3", "vite": "^5.2.0" } @@ -2392,6 +2393,21 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", diff --git a/package.json b/package.json index 61c2c84..91a521e 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "cssnano": "^7.0.1", "postcss": "^8.4.38", "postcss-pxtorem": "^6.1.0", + "prettier": "3.2.5", "tailwindcss": "^3.4.3", "vite": "^5.2.0" } diff --git a/src/js/app.js b/src/js/app.js index 911fa95..fa9f6f9 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,3 +1,3 @@ import '../css/app.css' -console.log('Hello Craft CMS Starter') \ No newline at end of file +console.log('Hello Craft CMS Starter')