Skip to content

Commit 8453c16

Browse files
feat: convert into yii2-extensions/scaffold provider; centralize ECS, Rector, metadata and super-linter standards under src/. (#4)
1 parent 1924ab4 commit 8453c16

37 files changed

Lines changed: 571 additions & 414 deletions

.ecrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Exclude": [
3+
"phpstan-baseline\\.neon$",
4+
"^tests/runtime/",
5+
"\\.min\\.css$",
6+
"\\.min\\.js$",
7+
"^vendor/",
8+
"^runtime/"
9+
]
10+
}

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ trim_trailing_whitespace = true
1414
indent_size = 2
1515

1616
[*.md]
17+
indent_size = 2
1718
trim_trailing_whitespace = false
1819

1920
[*.php]

.gitattributes

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,17 @@
2121
*.gif binary
2222
*.ttf binary
2323

24-
# Avoid merge conflicts in CHANGELOG
25-
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
26-
/CHANGELOG.md merge=union
27-
2824
# Exclude files from the archive
29-
/.editorconfig export-ignore
30-
/.gitattributes export-ignore
31-
/.github export-ignore
32-
/.gitignore export-ignore
33-
/.styleci.yml export-ignore
25+
/.github/dependabot.yml export-ignore
26+
/.github/workflows export-ignore
3427
/codeception.yml export-ignore
35-
/composer-require-checker.json export-ignore
3628
/docs export-ignore
37-
/ecs.php export-ignore
3829
/infection.json* export-ignore
3930
/phpstan*.neon* export-ignore
4031
/phpunit.xml.dist export-ignore
41-
/psalm.xml export-ignore
42-
/rector.php export-ignore
4332
/runtime export-ignore
4433
/tests export-ignore
34+
35+
# Avoid merge conflicts in CHANGELOG
36+
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
37+
/CHANGELOG.md merge=union

.github/linters/.codespellrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[codespell]
2+
skip = */tests/*,tests/**,*/composer.lock,*/composer.json

.github/linters/.gitleaks.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title = "gitleaks config"
2+
3+
[[allowlists]]
4+
description = "Allow test fixture data with dummy credentials"
5+
paths = [
6+
'''tests/support/data/.*\.php''',
7+
]

.github/linters/.markdown-lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
MD007:
3+
indent: 2
4+
MD013: false
5+
MD033: false

.github/workflows/ecs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ permissions:
1919
jobs:
2020
easy-coding-standard:
2121
uses: yii2-framework/actions/.github/workflows/ecs.yml@main
22+
with:
23+
command-options: check src --config src/ecs-83.php --ansi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ package-lock.json
2828
# phpstorm project (if present)
2929
.idea
3030

31+
# phpactor (if present)
32+
.phpactor.*
33+
3134
# phpunit (if present)
3235
.phpunit.cache
3336
.phpunit.result.cache

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
**/*.min.css
2+
**/*.min.js
3+
4+
# Vite-built bundles (committed dist/) and lockfiles.
5+
**/dist/**
6+
**/node_modules/**
7+
**/package-lock.json
8+
9+
# Yii AssetManager publishes a hashed copy of src/assets/ under tests/runtime/
10+
# whenever phpunit runs; the tree is regenerated on every test run, never
11+
# authored, and ignored by git already.
12+
tests/runtime/**
13+
14+
# License texts ship verbatim — never auto-formatted.
15+
**/LICENSE*
16+
17+
# Tool configs maintained by hand to keep their array order meaningful.
18+
composer-require-checker.json

.prettierrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"singleQuote": false,
5+
"trailingComma": "all",
6+
"printWidth": 80,
7+
"overrides": [
8+
{
9+
"files": ["**/*.{js,jsx,ts,tsx,vue,css,scss,html,yml,yaml}"],
10+
"options": {
11+
"tabWidth": 2
12+
}
13+
},
14+
{
15+
"files": "**/*.md",
16+
"options": {
17+
"embeddedLanguageFormatting": "off",
18+
"tabWidth": 2
19+
}
20+
},
21+
{
22+
"files": ["**/package.json", "**/package-lock.json"],
23+
"options": {
24+
"tabWidth": 2
25+
}
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)