@zilero/stylelint 1.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.
@@ -0,0 +1,50 @@
1
+ /** @type {import('stylelint').Config} */
2
+
3
+ module.exports = {
4
+ ignoreFiles: ['dist/**/*.css', 'coverage/**/*.css'], // Ignore these directories and their CSS files from being linted
5
+ extends: ['stylelint-config-standard-scss', 'stylelint-config-idiomatic-order'], // Extend these standard configurations for SCSS and idiomatic CSS order
6
+ plugins: 'stylelint-order', // Use the stylelint-order plugin for enforcing CSS property order
7
+ rules: {
8
+ 'no-duplicate-selectors': true, // Disallow duplicate selectors within a stylesheet
9
+ 'color-hex-length': 'short', // Enforce short hex color codes where possible
10
+ 'color-named': 'never', // Disallow named colors (e.g., 'red', 'blue')
11
+ 'selector-no-qualifying-type': [
12
+ // Disallow qualifying a selector by type, except for attributes and classes
13
+ true,
14
+ {
15
+ ignore: ['attribute', 'class'],
16
+ },
17
+ ],
18
+ 'selector-attribute-quotes': 'always', // Always quote attribute values in selectors
19
+ 'declaration-no-important': true, // Disallow the use of !important in declarations
20
+ 'font-weight-notation': 'numeric', // Enforce numeric notation for font-weight (e.g., 400 instead of 'normal')
21
+ 'comment-whitespace-inside': 'always', // Require whitespace inside comments
22
+ 'comment-empty-line-before': 'always', // Require an empty line before comments
23
+ 'rule-empty-line-before': 'always', // Require an empty line before rules
24
+ 'selector-pseudo-element-colon-notation': 'single', // Enforce single colon notation for pseudo-elements
25
+ 'selector-class-pattern': [
26
+ '^([a-z][a-z0-9]*)(_[a-z0-9]+)*$', // Enforce snake_case for class selectors
27
+ {
28
+ message: 'Expected class selector to be snake_case',
29
+ },
30
+ ],
31
+ 'keyframes-name-pattern': [
32
+ '^([a-z][a-z0-9]*)(_[a-z0-9]+)*$', // Enforce snake_case for keyframe names
33
+ {
34
+ message: 'Expected keyframe name to be snake_case',
35
+ },
36
+ ],
37
+ 'scss/percent-placeholder-pattern': [
38
+ '^([a-z][a-z0-9]*)(_[a-z0-9]+)*$', // Enforce snake_case for SCSS %-placeholders
39
+ {
40
+ message: 'Expected pattern for %-placeholders to be snake_case',
41
+ },
42
+ ],
43
+ 'scss/at-mixin-pattern': [
44
+ '^([a-z][a-z0-9]*)(_[a-z0-9]+)*$', // Enforce snake_case for SCSS mixins
45
+ {
46
+ message: 'Expected pattern for mixin to be snake_case',
47
+ },
48
+ ],
49
+ },
50
+ };
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Aleksandr
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,109 @@
1
+ # ⚙️ @zilero/tsconfigs
2
+
3
+ <p align="center">
4
+ <a href="https://github.com/Zilero232/dev-config-hub">
5
+ <img src="https://img.shields.io/github/actions/workflow/status/Zilero232/dev-config-hub/integrate.yaml?label=CI&logo=GitHub" alt="CI status">
6
+ </a>
7
+ <a href="https://www.npmjs.com/package/@zilero/tsconfigs">
8
+ <img src="https://img.shields.io/npm/dm/@zilero/tsconfigs?logo=NPM" alt="npm downloads">
9
+ </a>
10
+ <a href="https://github.com/Zilero232/cli">
11
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="npm license">
12
+ </a>
13
+ <a href="https://github.com/Zilero232/dev-config-hub/tree/main/tools/stylelint">
14
+ <img src="https://img.shields.io/npm/v/@zilero/tsconfigs?label=version" alt="version">
15
+ </a>
16
+ </p>
17
+
18
+ > ✨ Opinionated TypeScript configurations for modern development
19
+
20
+ ## ✨ Features
21
+
22
+ - 📦 Zero-config setup
23
+ - 🎯 Strict type checking enabled
24
+ - 🔧 Modern ECMAScript features
25
+ - 🚀 Optimized for React/Next.js
26
+ - 💪 Path aliases support
27
+ - 📱 Module resolution strategies
28
+ - 🎭 Different environment presets
29
+
30
+ ## 📥 Installation
31
+
32
+ ### Using npm
33
+
34
+ ```bash
35
+ npm install --save-dev @zilero/tsconfigs
36
+ ```
37
+ ### Using yarn
38
+
39
+ ```bash
40
+ yarn add -D @zilero/tsconfigs
41
+ ```
42
+
43
+ ### Using pnpm
44
+
45
+ ```bash
46
+ pnpm install -D @zilero/tsconfigs
47
+ ```
48
+
49
+ ## 🚀 Quick start
50
+
51
+ Create the `tsconfig.json` at the root of your project:
52
+
53
+ ```json
54
+ {
55
+ "extends": "./node_modules/@zilero/tsconfigs/tsconfig.base.json",
56
+ "compilerOptions": {
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## 📚 Available Configurations
62
+
63
+ - `tsconfig.base.json` - Base configuration for TypeScript projects
64
+ - `tsconfig.react.json` - Configuration for React applications
65
+ - `tsconfig.next.json` - Configuration for Next.js projects
66
+ - `tsconfig.node.json` - Configuration for Node.js applications
67
+
68
+ ## 🤝 Contributing
69
+
70
+ We'd love for you to contribute to `@zilero/tsconfigs`! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is always appreciated.
71
+
72
+ ### How to contribute:
73
+
74
+ 1. Fork the repository.
75
+ 2. Create a new branch (`git checkout -b feature/your-feature`).
76
+ 3. Make your changes.
77
+ 4. Commit your changes (`git commit -am 'Add new feature'`).
78
+ 5. Push to the branch (`git push origin feature/your-feature`).
79
+ 6. Open a pull request.
80
+
81
+ ## 📜 Code of Conduct
82
+
83
+ Please follow our [Code of Conduct](CODE_OF_CONDUCT.md) when participating in this project to ensure a welcoming and productive atmosphere.
84
+
85
+ ## 🔒 Security Policy
86
+
87
+ Security is our priority. If you encounter any issues, please read our full [Security Policy](SECURITY.md) to report vulnerabilities safely and responsibly.
88
+
89
+ ## 👥 Team
90
+
91
+ These folks keep the project moving and are resources for help.
92
+
93
+ <table>
94
+ <tbody>
95
+ <tr>
96
+ <td align="center" valign="top" width="11%">
97
+ <a href="https://career.habr.com/zilero">
98
+ <img src="https://avatars.githubusercontent.com/u/68345676?s=400&u=eb7df22c29a8aca48def78ec54a7526601c9fd8f&v=4" width="100" height="100" alt="Artemev Alexandr - Avatar">
99
+ <br />
100
+ Artemev A. A.
101
+ </a>
102
+ </td>
103
+ </tr>
104
+ </tbody>
105
+ </table>
106
+
107
+ ## 📄 License
108
+
109
+ License `@zilero/tsconfigs` is licensed under the [MIT License](LICENSE).
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ const stylelint = require('./.stylelintrc.js');
2
+
3
+ module.exports = {
4
+ stylelint,
5
+ };
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@zilero/stylelint",
3
+ "icon": "💅",
4
+ "displayName": "✨ Zilero Stylelint Config",
5
+ "description": "💅 Opinionated Stylelint configuration for consistent CSS/SCSS styling",
6
+ "license": "MIT",
7
+ "version": "1.0.0",
8
+ "keywords": [
9
+ "stylelint",
10
+ "stylelint-config",
11
+ "css",
12
+ "scss",
13
+ "sass",
14
+ "style",
15
+ "lint",
16
+ "linter",
17
+ "styleguide",
18
+ "css-modules"
19
+ ],
20
+ "engines": {
21
+ "node": ">=18.0.0",
22
+ "npm": ">=8.0.0"
23
+ },
24
+ "author": {
25
+ "name": "Artemev Alexandr",
26
+ "url": "https://github.com/Zilero232",
27
+ "email": "sasha.artemev.1002@mail.ru"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/Zilero232/dev-config-hub/issues"
31
+ },
32
+ "homepage": "https://github.com/Zilero232/dev-config-hub",
33
+ "repository": {
34
+ "url": "https://github.com/Zilero232/dev-config-hub"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "files": [
40
+ ".stylelintrc.js",
41
+ "index.js"
42
+ ],
43
+ "main": "index.js",
44
+ "categories": [
45
+ "Linters"
46
+ ],
47
+ "peerDependencies": {
48
+ "stylelint": "^16.6.1"
49
+ },
50
+ "dependencies": {
51
+ "stylelint": "^16.6.1",
52
+ "stylelint-config-idiomatic-order": "^10.0.0",
53
+ "stylelint-config-standard-scss": "^13.1.0",
54
+ "stylelint-order": "^6.0.4"
55
+ },
56
+ "scripts": {
57
+ "lint:style": "stylelint \"**/*.{css,scss,sass}\"",
58
+ "lint:style:fix": "stylelint \"**/*.{css,scss,sass}\" --fix",
59
+ "lint:style:watch": "onchange \"**/*.{css,scss,sass}\" -- stylelint {{changed}} --fix",
60
+ "lint:style:ci": "stylelint \"**/*.{css,scss,sass}\" --max-warnings 0"
61
+ }
62
+ }