Use organization Prettier config (#2967)

* Use organization Prettier config

* Bump version to 1.0.0

* Update workflow

* Use npm ci and package.json script
This commit is contained in:
David Wheatley 2021-07-30 12:18:20 +01:00 committed by GitHub
parent 0603ee872a
commit dc8958440e
4 changed files with 21 additions and 8 deletions

View File

@ -23,6 +23,10 @@ jobs:
with: with:
node-version: "14" node-version: "14"
- name: Check JS formatting - name: Install JS dependencies
run: npx prettier --check src run: npm ci
working-directory: ./js
- name: Check JS formatting
run: npm run format-check
working-directory: ./js working-directory: ./js

View File

@ -1,6 +0,0 @@
{
"printWidth": 150,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}

View File

@ -22,6 +22,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/preset-typescript": "^7.13.0", "@babel/preset-typescript": "^7.13.0",
"@flarum/prettier-config": "^1.0.0",
"@types/jquery": "^3.5.5", "@types/jquery": "^3.5.5",
"@types/mithril": "^2.0.7", "@types/mithril": "^2.0.7",
"@types/punycode": "^2.1.0", "@types/punycode": "^2.1.0",
@ -1477,6 +1478,12 @@
"to-fast-properties": "^2.0.0" "to-fast-properties": "^2.0.0"
} }
}, },
"node_modules/@flarum/prettier-config": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@flarum/prettier-config/-/prettier-config-1.0.0.tgz",
"integrity": "sha512-3/AcliIi5jPt4i7COb5hsLv6hm4EeXT9yI9I2EuEvhPi2QR+O9Y/8wrqRuO5mDkRzCIhUY+mjIL/f9770Zwfqg==",
"dev": true
},
"node_modules/@polka/url": { "node_modules/@polka/url": {
"version": "1.0.0-next.12", "version": "1.0.0-next.12",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz",
@ -8870,6 +8877,12 @@
"to-fast-properties": "^2.0.0" "to-fast-properties": "^2.0.0"
} }
}, },
"@flarum/prettier-config": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@flarum/prettier-config/-/prettier-config-1.0.0.tgz",
"integrity": "sha512-3/AcliIi5jPt4i7COb5hsLv6hm4EeXT9yI9I2EuEvhPi2QR+O9Y/8wrqRuO5mDkRzCIhUY+mjIL/f9770Zwfqg==",
"dev": true
},
"@polka/url": { "@polka/url": {
"version": "1.0.0-next.12", "version": "1.0.0-next.12",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz",

View File

@ -1,6 +1,7 @@
{ {
"private": true, "private": true,
"name": "@flarum/core", "name": "@flarum/core",
"prettier": "@flarum/prettier-config",
"dependencies": { "dependencies": {
"@askvortsov/rich-icu-message-formatter": "^0.1.0", "@askvortsov/rich-icu-message-formatter": "^0.1.0",
"@ultraq/icu-message-formatter": "^0.10.1", "@ultraq/icu-message-formatter": "^0.10.1",
@ -18,6 +19,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/preset-typescript": "^7.13.0", "@babel/preset-typescript": "^7.13.0",
"@flarum/prettier-config": "^1.0.0",
"@types/jquery": "^3.5.5", "@types/jquery": "^3.5.5",
"@types/mithril": "^2.0.7", "@types/mithril": "^2.0.7",
"@types/punycode": "^2.1.0", "@types/punycode": "^2.1.0",