From 2e68c53af1e1b7de6dd54b9207c7d0abbcf0eac6 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Thu, 20 Jan 2022 03:33:49 -0500 Subject: [PATCH] chore: flarum-cli audit infra --fix --- extensions/lang-english/.editorconfig | 23 ++++++-------- extensions/lang-english/.gitattributes | 42 ++++++++++---------------- extensions/lang-english/.gitignore | 13 ++++---- extensions/lang-english/.styleci.yml | 14 +++++++++ extensions/lang-english/composer.json | 21 ++++++++++++- 5 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 extensions/lang-english/.styleci.yml diff --git a/extensions/lang-english/.editorconfig b/extensions/lang-english/.editorconfig index 3dbb3a18b..a61a3ab36 100644 --- a/extensions/lang-english/.editorconfig +++ b/extensions/lang-english/.editorconfig @@ -1,24 +1,19 @@ -# EditorConfig makes it easy to maintain the correct coding style -# when switching between different text editors and projects. -# http://editorconfig.org/ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org -# Top-most EditorConfig file. Do not search in parent directories. root = true -# Set two space indentation, line endings to Unix (LF) with a final newline, -# default charset to UTF-8, and trim trailing whitespace in all files. [*] -indent_style = space -indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +indent_style = space +indent_size = 2 -# Set four space indentation in JSON and PHP files. -[*.{json,php}] -indent_size = 4 - -# Do not trim trailing whitespace in Markdown files. -[*.md] +[*.{diff,md}] trim_trailing_whitespace = false + +[*.{php,xml,json}] +indent_size = 4 diff --git a/extensions/lang-english/.gitattributes b/extensions/lang-english/.gitattributes index 9e31e73e3..ca0f40972 100644 --- a/extensions/lang-english/.gitattributes +++ b/extensions/lang-english/.gitattributes @@ -1,28 +1,18 @@ -# The gitattributes file is a simple text file that gives -# attributes to pathnames. -# http://git-scm.com/docs/gitattributes - -# Automatically normalize line endings for all text-based files. -# http://git-scm.com/docs/gitattributes#_end_of_line_conversion -* text=auto - -# For the following file types, normalize line endings to LF on check -# in and prevent conversion to CRLF when they are checked out (this -# is required in order to prevent newline related issues like, for -# example, after the build script is run). -.* text eol=lf -*.js text eol=lf -*.json text eol=lf -*.md text eol=lf -*.php text eol=lf -*.svg text eol=lf -*.yml text eol=lf - -# Exclude the following files when exporting an archive. -# http://git-scm.com/docs/gitattributes#_creating_an_archive -.editorconfig export-ignore .gitattributes export-ignore -.gitignore export-ignore -README.md export-ignore +.gitignore export-ignore +.gitmodules export-ignore +.github export-ignore +.travis export-ignore +.travis.yml export-ignore +.editorconfig export-ignore +.styleci.yml export-ignore -js/*/dist/*.js -diff +phpunit.xml export-ignore +tests export-ignore + +js/dist/* -diff +js/dist/* linguist-generated +js/dist-typings/* linguist-generated +js/yarn.lock -diff + +* text=auto eol=lf diff --git a/extensions/lang-english/.gitignore b/extensions/lang-english/.gitignore index d773b8db5..4ebb168a0 100644 --- a/extensions/lang-english/.gitignore +++ b/extensions/lang-english/.gitignore @@ -1,11 +1,12 @@ -# The .gitignore file specifies intentionally untracked files that -# Git should ignore. Files already tracked by Git are not affected. -# http://git-scm.com/docs/gitignore - -# Composer /vendor +composer.lock composer.phar -# Operating systems .DS_Store Thumbs.db +tests/.phpunit.result.cache +/tests/integration/tmp +.vagrant +.idea/* +.vscode +js/coverage-ts diff --git a/extensions/lang-english/.styleci.yml b/extensions/lang-english/.styleci.yml new file mode 100644 index 000000000..8806a5402 --- /dev/null +++ b/extensions/lang-english/.styleci.yml @@ -0,0 +1,14 @@ +preset: recommended + +enabled: + - logical_not_operators_with_successor_space + +disabled: + - align_double_arrow + - blank_line_after_opening_tag + - multiline_array_trailing_comma + - new_with_braces + - phpdoc_align + - phpdoc_order + - phpdoc_separation + - phpdoc_types diff --git a/extensions/lang-english/composer.json b/extensions/lang-english/composer.json index 2a8f88d40..1eb429b9a 100644 --- a/extensions/lang-english/composer.json +++ b/extensions/lang-english/composer.json @@ -2,7 +2,9 @@ "name": "flarum/lang-english", "type": "flarum-extension", "description": "English language pack.", - "keywords": ["locale"], + "keywords": [ + "locale" + ], "license": "MIT", "require": { "flarum/core": "^1.1" @@ -29,6 +31,23 @@ "flarum-locale": { "code": "en", "title": "English" + }, + "flarum-cli": { + "modules": { + "admin": false, + "forum": false, + "js": false, + "jsCommon": false, + "css": false, + "gitConf": true, + "githubActions": false, + "prettier": false, + "typescript": false, + "bundlewatch": false, + "backendTesting": false, + "editorConfig": true, + "styleci": true + } } } }