Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
firefoxic committed May 7, 2024
0 parents commit 22c20d8
Show file tree
Hide file tree
Showing 27 changed files with 2,706 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- '*'

env:
FORCE_COLOR: true

jobs:
test:
name: Test

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Restore cache
uses: actions/cache@v4
with:
path: ~/.local/share/pnpm/store/v3
key: cache-pnpm-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: cache-pnpm-

- name: Install dependencies
run: corepack enable pnpm && pnpm i

- name: Run tests
run: pnpm test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.log
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
git stash -ku

trap "git stash pop" EXIT

pnpm test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- markdownlint-disable MD024 -->
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Base config for `stylelint`.

[Unreleased]: https://github.com/firefoxic/stylelint-config/compare/v0.0.1...HEAD
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# MIT License

Copyright © Sergey Artemov <[email protected]>, 2024

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @firefoxic/stylelint-config

[![Test Status][test-image]][test-url]
[![License: MIT][license-image]][license-url]
[![NPM version][npm-image]][npm-url]

Shared config for stylelint by [firefoxic](https://firefoxic.dev).

To see the rules that this config uses, please read the [config itself](./stylelint.config.js).

## Installation

```shell
pnpm add -D stylelint @firefoxic/stylelint-config
```

## Usage

Set your `stylelint.config.js` to:

```js
export default {
customSyntax: "postcss-scss", // If your styles syntax is different from CSS (don't forget to install the package)
extends: "@firefoxic/stylelint-config",
rules: {
// Your overrides or additions to rules
}
}
```

## Useful links

- [Changelog](CHANGELOG.md)

[test-url]: https://github.com/firefoxic/stylelint-config/actions
[test-image]: https://github.com/firefoxic/stylelint-config/actions/workflows/test.yml/badge.svg?branch=main

[npm-url]: https://npmjs.org/package/firefoxic/stylelint-config
[npm-image]: https://badge.fury.io/js/@firefoxic%2Fstylelint-config.svg

[license-url]: https://github.com/firefoxic/stylelint-config/blob/main/LICENSE.md
[license-image]: https://img.shields.io/badge/License-MIT-limegreen.svg
12 changes: 12 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { default as firefoxicEslintConfig, globals } from "@firefoxic/eslint-config"

export default [
{
languageOptions: {
globals: {
...globals.nodeBuildIn,
},
},
},
...firefoxicEslintConfig,
]
59 changes: 59 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "@firefoxic/stylelint-config",
"description": "Shared config for stylelint by firefoxic.",
"version": "0.0.1",
"license": "MIT",
"author": {
"name": "Sergey Artemov",
"email": "[email protected]"
},
"homepage": "https://github.com/firefoxic/stylelint-config#readme",
"bugs": {
"url": "https://github.com/firefoxic/stylelint-config/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/firefoxic/stylelint-config.git"
},
"type": "module",
"exports": "./stylelint.config.js",
"files": [
"./stylelint.config.js"
],
"packageManager": "[email protected]",
"engines": {
"node": "^18.12 || >=20.9"
},
"peerDependencies": {
"stylelint": "^16.5.0"
},
"dependencies": {
"@stylistic/stylelint-plugin": "^2.1.2"
},
"scripts": {
"prepare": "husky",
"lint": "eslint",
"pretest": "pnpm lint",
"test": "node --test",
"preversion": "pnpm test",
"version": "update-changelog && git add CHANGELOG.md",
"postversion": "pnpm publish --access=public",
"postpublish": "git push --follow-tags"
},
"devDependencies": {
"@firefoxic/eslint-config": "^1.0.0",
"@firefoxic/utils": "^0.1.1",
"eslint": "^9.2.0",
"husky": "^9.0.11",
"stylelint": "^16.5.0"
},
"keywords": [
"config",
"css",
"lint",
"linter",
"linting",
"style",
"stylelint"
]
}
Loading

0 comments on commit 22c20d8

Please sign in to comment.