@mikey-pro/ruff-config 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/package.json +25 -0
- package/ruff.toml +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Mikl Wolfe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @mikey-pro/ruff-config
|
|
2
|
+
|
|
3
|
+
AI agent code quality guardrails for Python. Strict Ruff configuration enforcing clean, secure, maintainable Python code.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
**PyPI:**
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install mikey-pro-ruff-config
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**npm:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i -D @mikey-pro/ruff-config
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Extend in your `pyproject.toml`:
|
|
22
|
+
|
|
23
|
+
```toml
|
|
24
|
+
[tool.ruff]
|
|
25
|
+
extend = "./node_modules/@mikey-pro/ruff-config/ruff.toml"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or copy `ruff.toml` to your project root.
|
|
29
|
+
|
|
30
|
+
## What's Enforced
|
|
31
|
+
|
|
32
|
+
- PEP 8 style (pycodestyle)
|
|
33
|
+
- Import sorting (isort)
|
|
34
|
+
- Security checks (bandit)
|
|
35
|
+
- Complexity limit: 12 (mccabe)
|
|
36
|
+
- Max function arguments: 3
|
|
37
|
+
- Bug detection (bugbear)
|
|
38
|
+
- Modern Python idioms (pyupgrade, ruff-specific)
|
|
39
|
+
- No print statements (use logging)
|
|
40
|
+
- No commented-out code
|
|
41
|
+
- Pathlib over os.path
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mikey-pro/ruff-config",
|
|
3
|
+
"version": "10.0.0",
|
|
4
|
+
"description": "Mikey Pro Ruff configuration - AI agent code quality guardrails for Python",
|
|
5
|
+
"files": ["ruff.toml", "README.md", "LICENSE"],
|
|
6
|
+
"homepage": "https://github.com/chiefmikey/mikey-pro#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/chiefmikey/mikey-pro.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/chiefmikey/mikey-pro/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"ruff",
|
|
17
|
+
"python",
|
|
18
|
+
"linting",
|
|
19
|
+
"formatting",
|
|
20
|
+
"mikey-pro",
|
|
21
|
+
"code-quality",
|
|
22
|
+
"ai-agent"
|
|
23
|
+
],
|
|
24
|
+
"author": "Mikl Wolfe <wolfe@mikl.io> (https://mikl.io)"
|
|
25
|
+
}
|
package/ruff.toml
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Mikey Pro Ruff Configuration
|
|
2
|
+
# AI Agent Code Quality Guardrails for Python
|
|
3
|
+
|
|
4
|
+
target-version = "py311"
|
|
5
|
+
line-length = 88
|
|
6
|
+
|
|
7
|
+
[lint]
|
|
8
|
+
select = [
|
|
9
|
+
"E", # pycodestyle errors
|
|
10
|
+
"W", # pycodestyle warnings
|
|
11
|
+
"F", # pyflakes
|
|
12
|
+
"I", # isort
|
|
13
|
+
"N", # pep8-naming
|
|
14
|
+
"B", # flake8-bugbear
|
|
15
|
+
"C4", # flake8-comprehensions
|
|
16
|
+
"SIM", # flake8-simplify
|
|
17
|
+
"S", # bandit (security)
|
|
18
|
+
"C90", # mccabe (complexity)
|
|
19
|
+
"RUF", # ruff-specific rules
|
|
20
|
+
"PL", # pylint
|
|
21
|
+
"RET", # flake8-return
|
|
22
|
+
"PT", # flake8-pytest-style
|
|
23
|
+
"UP", # pyupgrade
|
|
24
|
+
"ARG", # flake8-unused-arguments
|
|
25
|
+
"PTH", # flake8-use-pathlib
|
|
26
|
+
"ERA", # eradicate (commented-out code)
|
|
27
|
+
"TID", # flake8-tidy-imports
|
|
28
|
+
"ICN", # flake8-import-conventions
|
|
29
|
+
"PIE", # flake8-pie
|
|
30
|
+
"T20", # flake8-print
|
|
31
|
+
"Q", # flake8-quotes
|
|
32
|
+
"RSE", # flake8-raise
|
|
33
|
+
"FLY", # flynt
|
|
34
|
+
"PERF", # perflint
|
|
35
|
+
"FURB", # refurb
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
ignore = [
|
|
39
|
+
"E501", # line too long (handled by formatter)
|
|
40
|
+
"PLR0913", # too many arguments (we set our own limit)
|
|
41
|
+
"PLR2004", # magic value comparison (too noisy)
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[lint.mccabe]
|
|
45
|
+
max-complexity = 12
|
|
46
|
+
|
|
47
|
+
[lint.isort]
|
|
48
|
+
force-single-line = false
|
|
49
|
+
known-first-party = []
|
|
50
|
+
combine-as-imports = true
|
|
51
|
+
force-sort-within-sections = true
|
|
52
|
+
|
|
53
|
+
[lint.pylint]
|
|
54
|
+
max-args = 3
|
|
55
|
+
max-branches = 12
|
|
56
|
+
max-returns = 6
|
|
57
|
+
max-statements = 50
|
|
58
|
+
|
|
59
|
+
[lint.flake8-bandit]
|
|
60
|
+
check-typed-exception = true
|
|
61
|
+
|
|
62
|
+
[lint.flake8-pytest-style]
|
|
63
|
+
fixture-parentheses = false
|
|
64
|
+
|
|
65
|
+
[format]
|
|
66
|
+
quote-style = "double"
|
|
67
|
+
indent-style = "space"
|
|
68
|
+
skip-magic-trailing-comma = false
|
|
69
|
+
line-ending = "lf"
|