From 9511957e0ef531f8d0813dccf4987378b1c69718 Mon Sep 17 00:00:00 2001 From: JuliaGerasymenko Date: Mon, 28 Jan 2019 10:45:34 +0200 Subject: [PATCH] Use prettier for code formatting PR-URL: https://github.com/metarhia/Metarhia/pull/31 --- .gitignore | 1 + .prettierrc | 10 ++++++++++ README.md | 9 +++++---- README.ru.md | 9 +++++---- doc/maintainers.md | 8 ++++---- package-lock.json | 14 ++++++++++++++ package.json | 11 ++++++++--- 7 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..74d3eb4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "singleQuote": true, + "trailingComma": "es5", + "overrides": [ + { + "files": ".prettierrc", + "options": { "parser": "json" } + } + ] +} diff --git a/README.md b/README.md index 2a1b39d..e341814 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Metarhia Experimental technological stack, including: - - Application Server [Impress](https://github.com/metarhia/Impress) - - Client Run-time [Console](https://github.com/metarhia/Console) - - JavaScript Transfer Protocol [JSTP](https://github.com/metarhia/JSTP) - - Database Management System [GlobalStorage](https://github.com/metarhia/GlobalStorage) + +- Application Server [Impress](https://github.com/metarhia/Impress) +- Client Run-time [Console](https://github.com/metarhia/Console) +- JavaScript Transfer Protocol [JSTP](https://github.com/metarhia/JSTP) +- Database Management System [GlobalStorage](https://github.com/metarhia/GlobalStorage) diff --git a/README.ru.md b/README.ru.md index bd2451a..7ad3a82 100644 --- a/README.ru.md +++ b/README.ru.md @@ -1,7 +1,8 @@ # Metarhia Это стек технологий, включающий: - - Сервер приложений [Impress](https://github.com/metarhia/Impress) - - Браузер приложений и баз данных [Console](https://github.com/metarhia/Console) - - Многоцелевой протокол [JSTP](https://github.com/metarhia/JSTP) - - Распределенная СУБД [GlobalStorage](https://github.com/metarhia/GlobalStorage) + +- Сервер приложений [Impress](https://github.com/metarhia/Impress) +- Браузер приложений и баз данных [Console](https://github.com/metarhia/Console) +- Многоцелевой протокол [JSTP](https://github.com/metarhia/JSTP) +- Распределенная СУБД [GlobalStorage](https://github.com/metarhia/GlobalStorage) diff --git a/doc/maintainers.md b/doc/maintainers.md index 7e8d69b..bb93608 100644 --- a/doc/maintainers.md +++ b/doc/maintainers.md @@ -1,7 +1,7 @@ # Metarhia packages/repositories maintainers | Repository | NPM package | Maintainer | -| ---------- | ----------- | ---------- | +| ------------------------------------------ | --------------------------------- | ---------------- | | [`metarhia/Metarhia`][] | [`metarhia`][] | [tshemsedinov][] | | [`metarhia/common`][] | [`@metarhia/common`][] | [belochub][] | | [`metarhia/concolor`][] | [`concolor`][] | [tshemsedinov][] | @@ -27,7 +27,7 @@ | [`metarhia/tickplate`][] | [`tickplate`][] | [tshemsedinov][] | | [`metarhia/tools`][] | [`@metarhia/tools`][] | [belochub][] | -[`metarhia/Metarhia`]: https://github.com/metarhia/Metarhia +[`metarhia/metarhia`]: https://github.com/metarhia/Metarhia [`metarhia/common`]: https://github.com/metarhia/common [`metarhia/concolor`]: https://github.com/metarhia/concolor [`metarhia/do`]: https://github.com/metarhia/do @@ -51,7 +51,7 @@ [`metarhia/sandboxed-fs`]: https://github.com/metarhia/sandboxed-fs [`metarhia/tickplate`]: https://github.com/metarhia/tickplate [`metarhia/tools`]: https://github.com/metarhia/tools - +[//]: # 'links to npm packages:' [`metarhia`]: https://npmjs.com/metarhia [`@metarhia/common`]: https://npmjs.com/@metarhia/common [`concolor`]: https://npmjs.com/concolor @@ -76,7 +76,7 @@ [`sandboxed-fs`]: https://npmjs.com/sandboxed-fs [`tickplate`]: https://npmjs.com/tickplate [`@metarhia/tools`]: https://www.npmjs.com/@metarhia/tools - +[//]: # "links to maintainers' GitHub profiles:" [belochub]: https://github.com/belochub [lundibundi]: https://github.com/lundibundi [nechaido]: https://github.com/nechaido diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b6a3553 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,14 @@ +{ + "name": "metarhia", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "prettier": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.1.tgz", + "integrity": "sha512-XXUITwIkGb3CPJ2hforHah/zTINRyie5006Jd2HKy2qz7snEJXl0KLfsJZW/wst9g6R2rFvqba3VpNYdu1hDcA==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 46fa97a..c5f4aca 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,15 @@ "email": "timur.shemsedinov@gmail.com" }, "main": "./metarhia.js", - "dependencies": { + "scripts": { + "fmt": "prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\" \".*rc\"" }, + "dependencies": {}, "engines": { "node": ">=0.4.0" }, - "readmeFilename": "README.md" -} \ No newline at end of file + "readmeFilename": "README.md", + "devDependencies": { + "prettier": "1.16.x" + } +}