Initial commit

This commit is contained in:
2023-05-04 15:52:34 +03:00
commit 23d15f1574
75 changed files with 14600 additions and 0 deletions

1
.browserslistrc Normal file
View File

@@ -0,0 +1 @@
extends @ivuorinen/browserslist-config

3
.commitlintrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["./packages/commitlint-config"]
}

16
.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
node_modules/

3
.eslintrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["./packages/eslint-config"]
}

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @ivuorinen

88
.github/labels.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
---
- name: "breaking-change"
color: ee0701
description: "A breaking change for existing users."
- name: "bugfix"
color: ee0701
description: "Inconsistencies or issues which will cause a problem for users or implementors."
- name: "documentation"
color: 0052cc
description: "Solely about the documentation of the project."
- name: "enhancement"
color: 1d76db
description: "Enhancement of the code, not introducing new features."
- name: "refactor"
color: 1d76db
description: "Improvement of existing code, not introducing new features."
- name: "performance"
color: 1d76db
description: "Improving performance, not introducing new features."
- name: "new-feature"
color: 0e8a16
description: "New features or options."
- name: "maintenance"
color: 2af79e
description: "Generic maintenance tasks."
- name: "ci"
color: 1d76db
description: "Work that improves the continue integration."
- name: "dependencies"
color: 1d76db
description: "Upgrade or downgrade of project dependencies."
- name: "translations"
color: d4c5f9
description: "Impacts translations."
- name: "in-progress"
color: fbca04
description: "Issue is currently being resolved by a developer."
- name: "stale"
color: fef2c0
description: "There has not been activity on this issue or PR for quite some time."
- name: "no-stale"
color: fef2c0
description: "This issue or PR is exempted from the stable bot."
- name: "security"
color: ee0701
description: "Marks a security issue that needs to be resolved asap."
- name: "incomplete"
color: fef2c0
description: "Marks a PR or issue that is missing information."
- name: "invalid"
color: fef2c0
description: "Marks a PR or issue that is missing information."
- name: "beginner-friendly"
color: 0e8a16
description: "Good first issue for people wanting to contribute to the project."
- name: "help-wanted"
color: 0e8a16
description: "We need some extra helping hands or expertise in order to resolve this."
- name: "hacktoberfest"
description: "Issues/PRs are participating in the Hacktoberfest."
color: fbca04
- name: "hacktoberfest-accepted"
description: "Issues/PRs are participating in the Hacktoberfest."
color: fbca04
- name: "priority-critical"
color: ee0701
description: "This should be dealt with ASAP. Not fixing this issue would be a serious error."
- name: "priority-high"
color: b60205
description: "After critical issues are fixed, these should be dealt with before any further issues."
- name: "priority-medium"
color: 0e8a16
description: "This issue may be useful, and needs some attention."
- name: "priority-low"
color: e4ea8a
description: "Nice addition, maybe... someday..."
- name: "major"
color: b60205
description: "This PR causes a major version bump in the version number."
- name: "minor"
color: 0e8a16
description: "This PR causes a minor version bump in the version number."

4
.github/renovate.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>ivuorinen/.github:renovate-config"]
}

56
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: "CodeQL"
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * 4"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["javascript"]
steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

52
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Publish
on:
push:
branches:
- main
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@v3.5.1
with:
always-auth: true
node-version: 14
registry-url: 'https://registry.npmjs.org'
scope: '@ivuorinen'
- name: Cache Node Modules
uses: actions/cache@v3.0.11
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install
- name: Config Git User
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Bootstrap Lerna
run: yarn lerna:bootstrap:ci
- name: Bump Versions and Publish Packages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn lerna:version
yarn lerna:publish

47
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
---
name: Stale
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 8 * * *"
workflow_call:
workflow_dispatch:
permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write
jobs:
stale:
name: 🧹 Clean up stale issues and PRs
runs-on: ubuntu-latest
steps:
- name: 🚀 Run stale
uses: actions/stale@v8.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,help-wanted"
stale-issue-message: >
There hasn't been any activity on this issue recently, so we
clean up some of the older and inactive issues.
Please make sure to update to the latest version and
check if that solves the issue. Let us know if that works for you
by leaving a comment 👍
This issue has now been marked as stale and will be closed if no
further activity occurs. Thanks!
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

3
.markdownlint.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": "./packages/markdownlint-config/index.json"
}

2
.markdownlintignore Normal file
View File

@@ -0,0 +1,2 @@
CHANGELOG.md
node_modules/

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
node_modules/

1
.prettierrc.json Normal file
View File

@@ -0,0 +1 @@
"./packages/prettier-config"

5
.releaserc.json Normal file
View File

@@ -0,0 +1,5 @@
{
"extends": [
"@ivuorinen/semantic-release-config"
]
}

3
.simple-git-hooks.json Normal file
View File

@@ -0,0 +1,3 @@
{
"commit-msg": "yarn commitlint --edit $1"
}

5
.stylelintrc.json Normal file
View File

@@ -0,0 +1,5 @@
{
"extends": [
"@ivuorinen/stylelint-config/css"
]
}

0
.yamlignore Normal file
View File

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

96
README.md Normal file
View File

@@ -0,0 +1,96 @@
# @ivuorinen/base-configs <!-- omit in toc -->
[![license MIT][license-badge]][license-link] [![ivuorinen's Code Style][style-badge]][style-link]
> A collection of base configs for code quality and linting tools. Heavily based on `@demartini/base-configs`
## Table of Contents <!-- omit in toc -->
- [About](#about)
- [Usage](#usage)
- [Available Configurations](#available-configurations)
- [Badge](#badge)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## About
This Monorepo provides a collection of shareable configurations for building, linting, testing, formatting, and releasing tools to make configurations consistent across projects and provide an easy configuration mechanism.
## Usage
Check the _`README`_ of each package in the [`packages`][packages-link] directory for specific usage instructions.
## Available Configurations
| Tool | Package | Version |
| ----------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------- |
| [Browserslist][browserslist-link] | [@ivuorinen/browserslist-config][pkg-browserlist] | [![@ivuorinen/browserslist-config][browserslist-badge]][browserslist-npm] |
| [CommitLint][commitlint-link] | [@ivuorinen/commitlint-config][pkg-commitlint] | [![@ivuorinen/commitlint-config][commitlint-badge]][commitlint-npm] |
| [ESLint][eslint-link] | [@ivuorinen/eslint-config][pkg-eslint] | [![@ivuorinen/eslint-config][eslint-badge]][eslint-npm] |
| [MarkdownLint][markdownlint-link] | [@ivuorinen/markdownlint-config][pkg-markdownlint] | [![@ivuorinen/markdownlint-config][markdownlint-badge]][markdownlint-npm] |
| [Prettier][prettier-link] | [@ivuorinen/prettier-config][pkg-prettier] | [![@ivuorinen/prettier-config][prettier-badge]][prettier-npm] |
| [semantic-release][semantic-release-link] | [@ivuorinen/semantic-release-config][pkg-src] | [![@ivuorinen/semantic-release-config][semantic-release-badge]][semantic-release-npm] |
| [stylelint][stylelint-link] | [@ivuorinen/stylelint-config][pkg-stylelint] | [![@ivuorinen/stylelint-config][stylelint-badge]][stylelint-npm] |
[pkg-browserlist]: ./packages/browserslist-config
[pkg-commitlint]: ./packages/commitlint-config
[pkg-eslint]: ./packages/eslint-config
[pkg-markdownlint]: ./packages/markdownlint-config
[pkg-prettier]: ./packages/prettier-config
[pkg-src]: ./packages/semantic-release-config
[pkg-stylelint]: ./packages/stylelint-config
## Badge
Show the world that you are using ivuorinen's code style in your project by including the badge in your readme.
[![ivuorinen's Code Style](https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square)](https://github.com/ivuorinen/base-configs)
```md
[![ivuorinen's Code Style](https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square)](https://github.com/ivuorinen/base-configs)
```
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[packages-link]: ./packages
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs
[browserslist-badge]: https://img.shields.io/npm/v/@ivuorinen/browserslist-config?style=flat-square&labelColor=292a44&color=663399
[browserslist-link]: https://github.com/browserslist/browserslist
[browserslist-npm]: https://www.npmjs.com/package/@ivuorinen/browserslist-config
[commitlint-badge]: https://img.shields.io/npm/v/@ivuorinen/commitlint-config?style=flat-square&labelColor=292a44&color=663399
[commitlint-link]: https://github.com/conventional-changelog/commitlint
[commitlint-npm]: https://www.npmjs.com/package/@ivuorinen/commitlint-config
[eslint-badge]: https://img.shields.io/npm/v/@ivuorinen/eslint-config?style=flat-square&labelColor=292a44&color=663399
[eslint-link]: https://github.com/eslint/eslint
[eslint-npm]: https://www.npmjs.com/package/@ivuorinen/eslint-config
[markdownlint-badge]: https://img.shields.io/npm/v/@ivuorinen/markdownlint-config?style=flat-square&labelColor=292a44&color=663399
[markdownlint-link]: https://github.com/DavidAnson/markdownlint
[markdownlint-npm]: https://www.npmjs.com/package/@ivuorinen/markdownlint-config
[prettier-badge]: https://img.shields.io/npm/v/@ivuorinen/prettier-config?style=flat-square&labelColor=292a44&color=663399
[prettier-link]: https://github.com/prettier/prettier
[prettier-npm]: https://www.npmjs.com/package/@ivuorinen/prettier-config
[semantic-release-badge]: https://img.shields.io/npm/v/@ivuorinen/semantic-release-config?style=flat-square&labelColor=292a44&color=663399
[semantic-release-link]: https://github.com/semantic-release/semantic-release
[semantic-release-npm]: https://www.npmjs.com/package/@ivuorinen/semantic-release-config
[stylelint-badge]: https://img.shields.io/npm/v/@ivuorinen/stylelint-config?style=flat-square&labelColor=292a44&color=663399
[stylelint-link]: https://github.com/stylelint/stylelint
[stylelint-npm]: https://www.npmjs.com/package/@ivuorinen/stylelint-config

18
lerna.json Normal file
View File

@@ -0,0 +1,18 @@
{
"version": "independent",
"command": {
"version": {
"conventionalCommits": true,
"createRelease": "github",
"ignoreChanges": ["**/*.md"],
"message": "chore(release): publish",
"yes": true
},
"publish": {
"registry": "https://registry.npmjs.org",
"yes": true
}
},
"npmClient": "yarn",
"packages": ["packages/*"]
}

73
package.json Normal file
View File

@@ -0,0 +1,73 @@
{
"private": true,
"name": "@ivuorinen/base-configs",
"version": "1.0.0",
"description": "A collection of base configs for code quality and linting tools.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"contributors": [
{
"name": "Base Configs Contributors",
"url": "https://github.com/ivuorinen/base-configs/graphs/contributors"
}
],
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"homepage": "https://github.com/ivuorinen/base-configs#readme",
"keywords": [
"commitlint",
"config",
"eslint",
"lint",
"markdownlint",
"prettier",
"semantic-release",
"stylelint"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"deps:dedupe": "lernaupdate --dedupe",
"deps:update": "lernaupdate",
"eslint:fix": "eslint --format=pretty '**/*.{js,tsx,ts}' --fix",
"eslint:report": "eslint --format=pretty '**/*.{js,tsx,ts}'",
"lerna:bootstrap:ci": "lerna bootstrap -- --frozen-lockfile --ignore-engines",
"lerna:bootstrap": "lerna bootstrap",
"lerna:publish": "lerna publish from-package",
"lerna:version": "lerna version",
"markdownlint:fix": "markdownlint '**/*.md' --fix",
"markdownlint:report": "markdownlint '**/*.md'",
"prettier:fix": "prettier '**/*.{js,tsx,ts,json}' --write",
"prettier:report": "prettier '**/*.{js,tsx,ts,json}' --check"
},
"devDependencies": {
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^17.0.0",
"eslint-formatter-pretty": "^4.1.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-sonarjs": "^0.16.0",
"eslint-plugin-unicorn": "^45.0.1",
"lerna": "^6.1.0",
"lerna-update-wizard": "^1.1.2",
"markdownlint-cli": "^0.32.2",
"prettier": "^2.8.0",
"simple-git-hooks": "^2.8.1"
}
}

View File

@@ -0,0 +1 @@
extends @ivuorinen/browserslist-config

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

View File

@@ -0,0 +1,90 @@
# @ivuorinen/browserslist-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link] [![license MIT][license-badge]][license-link] [![ivuorinen's Code Style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`Browserslist`][browserslist-link].
## Table of Contents <!-- omit in toc -->
- [Supported Browsers](#supported-browsers)
- [Desktop Browsers](#desktop-browsers)
- [Mobile Browsers](#mobile-browsers)
- [Installation](#installation)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Supported Browsers
### Desktop Browsers
| [![Chrome][chrome-image]][browsers-badges-link] | [![Edge][edge-image]][browsers-badges-link] | [![Firefox][firefox-image]][browsers-badges-link] | [![Opera][opera-image]][browsers-badges-link] | [![Safari][safari-image]][browsers-badges-link] |
| :---------------------------------------------: | :-----------------------------------------: | :-----------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
| Chrome | Edge | Firefox | Opera | Safari |
| >= 60 | last 2 | >= 60 | last 2 | >= 12 |
### Mobile Browsers
| [![Android WebView][android-webview-image]][browsers-badges-link] | [![Chrome][chrome-image]][browsers-badges-link] | [![Firefox][firefox-image]][browsers-badges-link] | [![Opera Mini][opera-mini-image]][browsers-badges-link] | [![Safari iOS][safari-ios-image]][browsers-badges-link] | [![Samsung Internet][samsung-internet-image]][browsers-badges-link] | [![UC][uc-image]][browsers-badges-link] |
| :---------------------------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------------------: | :-------------------------------------: |
| Android WebView | Chrome | Firefox | Opera Mini | Safari iOS | Samsung Internet | UC |
| last 2 | last 2 | last 2 | last 2 | >= 12 | last 2 | last 2 |
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/browserslist-config --save-dev
# Yarn
yarn add @ivuorinen/browserslist-config --dev
```
After installing it, a _`.browserslistrc`_ file will be created automatically in the project's root folder with the following configuration:
```json
extends @ivuorinen/browserslist-config
```
## Documentations
Read the [Browserslist docs][browserslist-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[browserslist-docs-link]: https://github.com/browserslist/browserslist
[browserslist-link]: https://github.com/browserslist/browserslist
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/browserslist-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/browserslist-config
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs
[browsers-badges-link]: https://github.com/alrra/browser-logos
[android-webview-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/android-webview/android-webview_48x48.png
[chrome-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png
[edge-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png
[firefox-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png
[opera-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png
[opera-mini-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera-mini/opera-mini_48x48.png
[safari-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png
[safari-ios-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari-ios/safari-ios_48x48.png
[samsung-internet-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/samsung-internet/samsung-internet_48x48.png
[uc-image]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/uc/uc_48x48.png

View File

@@ -0,0 +1,13 @@
'use strict'
module.exports = [
'>= 0.5%',
'Chrome >= 60',
'Firefox >= 60',
'Firefox ESR',
'iOS >= 12',
'last 2 major versions',
'not dead',
'not Explorer <= 11',
'Safari >= 12'
]

View File

@@ -0,0 +1,43 @@
{
"name": "@ivuorinen/browserslist-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for Browserslist.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"index.js",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/browserslist-config#readme",
"keywords": [
"browserslist-config",
"browserslist",
"config",
"ivuorinen"
],
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"browserslist": "4.21.4"
}
}

View File

@@ -0,0 +1,12 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.browserslistrc')
const fileConfigObject = 'extends @ivuorinen/browserslist-config'
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, fileConfigObject)
}

View File

@@ -0,0 +1,5 @@
{
"extends": [
"@ivuorinen/commitlint-config"
]
}

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

View File

@@ -0,0 +1,62 @@
# @ivuorinen/commitlint-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link] [![license MIT][license-badge]][license-link] [![ivuorinen's Code Style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`CommitLint`][commitlint-link].
## Table of Contents <!-- omit in toc -->
- [Installation](#installation)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/commitlint-config --save-dev
# Yarn
yarn add @ivuorinen/commitlint-config --dev
```
After installing it, a _`.commitlintrc.json`_ file will be created automatically in the project's root folder with the following configuration:
```json
{
"extends": ["@ivuorinen/commitlint-config"]
}
```
## Documentations
Read the [CommitLint docs][commitlint-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[commitlint-docs-link]: https://commitlint.js.org
[commitlint-link]: https://github.com/conventional-changelog/commitlint
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/commitlint-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/commitlint-config
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs

View File

@@ -0,0 +1,8 @@
'use strict'
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [2, 'always']
}
}

View File

@@ -0,0 +1,43 @@
{
"name": "@ivuorinen/commitlint-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for commitlint.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"index.js",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/commitlint-config#readme",
"keywords": [
"commitlint-config",
"commitlint",
"config"
],
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"@commitlint/cli": "17.3.0",
"@commitlint/config-conventional": "17.3.0"
}
}

View File

@@ -0,0 +1,14 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.commitlintrc.json')
const fileConfigObject = {
extends: ['@ivuorinen/commitlint-config']
}
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
}

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,80 @@
# @ivuorinen/eslint-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link]
[![license MIT][license-badge]][license-link]
[![ivuorinen's Code Style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`ESLint`][eslint-link].
## Table of Contents <!-- omit in toc -->
- [Installation](#installation)
- [Available Configurations](#available-configurations)
- [Jest](#jest)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/eslint-config --save-dev
# Yarn
yarn add @ivuorinen/eslint-config --dev
```
After installing it, a _`.eslintrc.json`_ file will be created automatically in the project's root folder with the following configuration:
```json
{
"extends": ["@ivuorinen"]
}
```
## Available Configurations
### Jest
Adds specific rules for the [`Jest`][jest-link] testing framework.
```json
{
"extends": ["@ivuorinen/eslint-config/jest"]
}
```
## Documentations
Read the [ESLint docs][eslint-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[eslint-docs-link]: https://eslint.org
[eslint-link]: https://github.com/eslint/eslint
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/eslint-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/eslint-config
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs
[jest-link]: https://jestjs.io

View File

@@ -0,0 +1,19 @@
'use strict'
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true
},
extends: [
'plugin:promise/recommended',
'plugin:sonarjs/recommended',
'standard',
'plugin:prettier/recommended'
],
parserOptions: {
ecmaVersion: 12
}
}

View File

@@ -0,0 +1,9 @@
'use strict'
module.exports = {
env: {
'jest/globals': true
},
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
plugins: ['jest']
}

View File

@@ -0,0 +1,51 @@
{
"name": "@ivuorinen/eslint-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for ESLint.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"index.js",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/eslint-config#readme",
"keywords": [
"eslint-config",
"eslint",
"config",
"ivuorinen"
],
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"eslint": "8.29.0",
"eslint-config-prettier": "8.5.0",
"eslint-config-standard": "17.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jest": "27.1.6",
"eslint-plugin-n": "15.6.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-sonarjs": "0.17.0"
}
}

View File

@@ -0,0 +1,14 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.eslintrc.json')
const fileConfigObject = {
extends: ['@ivuorinen']
}
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

View File

@@ -0,0 +1,64 @@
# @ivuorinen/markdownlint-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link]
[![license MIT][license-badge]][license-link]
[![code style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`MarkdownLint`][markdownlint-link].
## Table of Contents <!-- omit in toc -->
- [Installation](#installation)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/markdownlint-config --save-dev
# Yarn
yarn add @ivuorinen/markdownlint-config --dev
```
After installing it, a _`.markdownlint.json`_ file will be created automatically in the project's root folder with the following configuration:
```json
{
"extends": "@ivuorinen/markdownlint-config"
}
```
## Documentations
Read the [MarkdownLint docs][markdownlint-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[markdownlint-docs-link]: https://github.com/DavidAnson/markdownlint
[markdownlint-link]: https://github.com/DavidAnson/markdownlint
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/markdownlint-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/markdownlint-config
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs

View File

@@ -0,0 +1,5 @@
{
"default": true,
"MD013": false,
"MD033": false
}

View File

@@ -0,0 +1,43 @@
{
"name": "@ivuorinen/markdownlint-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for markdownlint.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"index.json",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/markdownlint-config#readme",
"keywords": [
"markdownlint-config",
"markdownlint",
"config",
"ivuorinen"
],
"license": "MIT",
"main": "index.json",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"markdownlint-cli": "0.32.2"
}
}

View File

@@ -0,0 +1,14 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.markdownlint.json')
const fileConfigObject = {
extends: '@ivuorinen/markdownlint-config'
}
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
}

View File

@@ -0,0 +1,186 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
brace-expansion@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
balanced-match "^1.0.0"
commander@~9.4.0:
version "9.4.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd"
integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==
deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
entities@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4"
integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
get-stdin@~9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575"
integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==
glob@~8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e"
integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^5.0.1"
once "^1.3.0"
ignore@~5.2.0:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
ini@~3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/ini/-/ini-3.0.1.tgz#c76ec81007875bc44d544ff7a11a55d12294102d"
integrity sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==
js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
dependencies:
argparse "^2.0.1"
jsonc-parser@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d"
integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==
linkify-it@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec"
integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==
dependencies:
uc.micro "^1.0.1"
markdown-it@13.0.1:
version "13.0.1"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430"
integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==
dependencies:
argparse "^2.0.1"
entities "~3.0.1"
linkify-it "^4.0.1"
mdurl "^1.0.1"
uc.micro "^1.0.5"
markdownlint-cli@0.32.2:
version "0.32.2"
resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.32.2.tgz#b7b5c5808039aef4022aef603efaa607caf8e0de"
integrity sha512-xmJT1rGueUgT4yGNwk6D0oqQr90UJ7nMyakXtqjgswAkEhYYqjHew9RY8wDbOmh2R270IWjuKSeZzHDEGPAUkQ==
dependencies:
commander "~9.4.0"
get-stdin "~9.0.0"
glob "~8.0.3"
ignore "~5.2.0"
js-yaml "^4.1.0"
jsonc-parser "~3.1.0"
markdownlint "~0.26.2"
markdownlint-rule-helpers "~0.17.2"
minimatch "~5.1.0"
run-con "~1.2.11"
markdownlint-rule-helpers@~0.17.2:
version "0.17.2"
resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.17.2.tgz#64d6e8c66e497e631b0e40cf1cef7ca622a0b654"
integrity sha512-XaeoW2NYSlWxMCZM2B3H7YTG6nlaLfkEZWMBhr4hSPlq9MuY2sy83+Xr89jXOqZMZYjvi5nBCGoFh7hHoPKZmA==
markdownlint@~0.26.2:
version "0.26.2"
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.26.2.tgz#11d3d03e7f0dd3c2e239753ee8fd064a861d9237"
integrity sha512-2Am42YX2Ex5SQhRq35HxYWDfz1NLEOZWWN25nqd2h3AHRKsGRE+Qg1gt1++exW792eXTrR4jCNHfShfWk9Nz8w==
dependencies:
markdown-it "13.0.1"
mdurl@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
minimatch@^5.0.1, minimatch@~5.1.0:
version "5.1.6"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
dependencies:
brace-expansion "^2.0.1"
minimist@^1.2.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
dependencies:
wrappy "1"
run-con@~1.2.11:
version "1.2.11"
resolved "https://registry.yarnpkg.com/run-con/-/run-con-1.2.11.tgz#0014ed430bad034a60568dfe7de2235f32e3f3c4"
integrity sha512-NEMGsUT+cglWkzEr4IFK21P4Jca45HqiAbIIZIBdX5+UZTB24Mb/21iNGgz9xZa8tL6vbW7CXmq7MFN42+VjNQ==
dependencies:
deep-extend "^0.6.0"
ini "~3.0.0"
minimist "^1.2.6"
strip-json-comments "~3.1.1"
strip-json-comments@~3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

View File

@@ -0,0 +1,73 @@
# @ivuorinen/prettier-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link]
[![license MIT][license-badge]][license-link]
[![ivuorinen's Code Style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`Prettier`][prettier-link].
## Table of Contents <!-- omit in toc -->
- [Installation](#installation)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/prettier-config --save-dev
# Yarn
yarn add @ivuorinen/prettier-config --dev
```
After installing it, a _`.prettierrc.json`_ file will be created automatically in the project's root folder with the following configuration:
```json
"@ivuorinen/prettier-config"
```
> Note: This method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a _`.prettierrc.js`_ file and export the modifications, e.g:
>
> ```js
> module.exports = {
> ...require('@ivuorinen/prettier-config'),
>
> // Add custom options bellow:
> semi: true
> }
> ```
## Documentations
Read the [Prettier docs][prettier-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[prettier-docs-link]: https://prettier.io
[prettier-link]: https://github.com/prettier/prettier
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/prettier-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/prettier-config
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs

View File

@@ -0,0 +1,17 @@
'use strict'
module.exports = {
arrowParens: 'avoid',
proseWrap: 'never',
semi: false,
singleQuote: true,
trailingComma: 'none',
overrides: [
{
files: ['*.css', '*.scss'],
options: {
singleQuote: false
}
}
]
}

View File

@@ -0,0 +1,43 @@
{
"name": "@ivuorinen/prettier-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for Prettier.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"index.js",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/prettier-config#readme",
"keywords": [
"config",
"ivuorinen",
"prettier-config",
"prettier"
],
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"prettier": "2.8.0"
}
}

View File

@@ -0,0 +1,12 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.prettierrc.json')
const fileConfigObject = '@ivuorinen/prettier-config'
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
}

View File

@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
prettier@2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9"
integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

View File

@@ -0,0 +1,134 @@
# @ivuorinen/semantic-release-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link]
[![license MIT][license-badge]][license-link]
[![ivuorinen's Code Style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`semantic-release`][semantic-release-link].
## Table of Contents <!-- omit in toc -->
- [Plugins](#plugins)
- [Installation](#installation)
- [Configuration](#configuration)
- [GitHub Actions](#github-actions)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Plugins
This shareable configuration use the following plugins:
- [`@semantic-release/commit-analyzer`][sr-commit-analyzer-link]
- [`@semantic-release/release-notes-generator`][sr-release-notes-generator-link]
- [`@semantic-release/changelog`][sr-changelog-link]
- [`@semantic-release/npm`][sr-npm-link]
- [`@semantic-release/github`][sr-github-link]
- [`@semantic-release/git`][sr-git-link]
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/semantic-release-config --save-dev
# Yarn
yarn add @ivuorinen/semantic-release-config --dev
```
After installing it, a _`.releaserc.json`_ file will be created automatically in the project's root folder with the following configuration:
```json
{
"extends": ["@ivuorinen/semantic-release-config"]
}
```
## Configuration
Ensure that your CI configuration has the following **_secret_** environment variables set:
- [`GH_TOKEN`][gh-token-link] with [`public_repo`][gh-scopes-link] access or `GITHUB_TOKEN`.
- [`NPM_TOKEN`][npm-token-link]
See each [plugin](#plugins) documentation for required installation and configuration steps.
## GitHub Actions
```yaml
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@v2.1.5
with:
always-auth: true
node-version: 14
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies with Caching
uses: bahmutov/npm-install@v1.6.0
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run semantic-release
```
## Documentations
Read the [semantic-release docs][semantic-release-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[gh-scopes-link]: https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes
[gh-token-link]: https://github.com/settings/tokens/new?scopes=public_repo
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/semantic-release-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/semantic-release-config
[npm-token-link]: https://docs.npmjs.com/about-access-tokens
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[semantic-release-docs-link]: https://semantic-release.gitbook.io/
[semantic-release-link]: https://github.com/semantic-release/semantic-release
[sr-changelog-link]: https://github.com/semantic-release/changelog
[sr-commit-analyzer-link]: https://github.com/semantic-release/commit-analyzer
[sr-git-link]: https://github.com/semantic-release/git
[sr-github-link]: https://github.com/semantic-release/github
[sr-npm-link]: https://github.com/semantic-release/npm
[sr-release-notes-generator-link]: https://github.com/semantic-release/release-notes-generator
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs

View File

@@ -0,0 +1,19 @@
'use strict'
module.exports = {
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/changelog',
{
changelogTitle:
'# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.'
}
],
'@semantic-release/npm',
'@semantic-release/github',
'@semantic-release/git'
],
preset: 'angular'
}

View File

@@ -0,0 +1,45 @@
{
"name": "@ivuorinen/semantic-release-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for semantic-release.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"index.js",
"scripts/*"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/semantic-release-config#readme",
"keywords": [
"semantic-release-config",
"semantic-release",
"config",
"ivuorinen"
],
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"@semantic-release/changelog": "6.0.2",
"@semantic-release/git": "10.0.1",
"semantic-release": "19.0.5"
}
}

View File

@@ -0,0 +1,14 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.releaserc.json')
const fileConfigObject = {
extends: ['@ivuorinen/semantic-release-config']
}
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ismo Vuorinen
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.

View File

@@ -0,0 +1,107 @@
# @ivuorinen/stylelint-config <!-- omit in toc -->
[![npm package][npm-badge]][npm-link]
[![license MIT][license-badge]][license-link]
[![ivuorinen's Code Style][style-badge]][style-link]
> ivuorinen's shareable configuration for [`stylelint`][stylelint-link].
## Table of Contents <!-- omit in toc -->
- [Installation](#installation)
- [Usage](#usage)
- [CSS <sub><sup>(Default)</sup></sub>](#css-subsupdefaultsupsub)
- [SCSS](#scss)
- [Extending the config](#extending-the-config)
- [Documentations](#documentations)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Installation
Install `this config` as a _`devDependencies`_:
```sh
# npm
npm install @ivuorinen/stylelint-config --save-dev
# Yarn
yarn add @ivuorinen/stylelint-config --dev
```
After installing it, a _`.stylelintrc.json`_ file will be created automatically in the project's root folder with the following configuration:
```json
{
"extends": ["@ivuorinen/stylelint-config/css"]
}
```
## Usage
This package provides configuration for CSS and SCSS, you can choose which one you want to extend:
### CSS <sub><sup>(Default)</sup></sub>
```json
{
"extends": ["@ivuorinen/stylelint-config/css"]
}
```
### SCSS
```json
{
"extends": ["@ivuorinen/stylelint-config/scss"]
}
```
## Extending the config
The defined rules can be modified by adding other configurations, plugins or custom rules:
```json
{
"extends": ["@ivuorinen/stylelint-config/css", "some-other-config-you-use"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["extends", "ignores"]
}
]
}
}
```
## Documentations
Read the [stylelint docs][stylelint-docs-link] for more information.
## Contributing
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
## Changelog
See [CHANGELOG][changelog-link] for a human-readable history of changes.
## License
Distributed under the MIT License. See [LICENSE][license-link] for more information.
[changelog-link]: ./CHANGELOG.md
[stylelint-docs-link]: https://stylelint.io
[stylelint-link]: https://github.com/stylelint/stylelint
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
[issue-link]: https://github.com/ivuorinen/base-configs/issues
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
[license-link]: ./LICENSE
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/stylelint-config?style=flat-square&labelColor=292a44&color=663399
[npm-link]: https://www.npmjs.com/package/@ivuorinen/stylelint-config
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
[style-link]: https://github.com/ivuorinen/base-configs

View File

@@ -0,0 +1,279 @@
/* eslint-disable sonarjs/no-duplicate-string */
/* eslint-disable unicorn/no-null */
'use strict'
module.exports = {
extends: ['stylelint-config-standard'],
plugins: ['stylelint-order'],
rules: {
'at-rule-empty-line-before': [
'always',
{
except: ['blockless-after-same-name-blockless', 'first-nested']
}
],
'at-rule-name-space-after': 'always',
'at-rule-no-vendor-prefix': true,
'at-rule-semicolon-space-before': 'never',
'block-closing-brace-empty-line-before': null,
'block-closing-brace-newline-after': null,
'block-opening-brace-space-before': null,
'color-named': 'never',
'declaration-block-semicolon-newline-before': 'never-multi-line',
'declaration-empty-line-before': 'never',
'font-family-name-quotes': 'always-where-recommended',
'font-weight-notation': [
'numeric',
{
ignore: ['relative']
}
],
'function-url-no-scheme-relative': true,
'function-url-quotes': 'always',
'max-empty-lines': 2,
'max-line-length': null,
'media-feature-name-no-vendor-prefix': true,
'no-descending-specificity': null,
'number-leading-zero': 'never',
'order/properties-order': [
'position',
'top',
'right',
'bottom',
'left',
'z-index',
'box-sizing',
'display',
'flex',
'flex-align',
'flex-basis',
'flex-direction',
'flex-wrap',
'flex-flow',
'flex-shrink',
'flex-grow',
'flex-order',
'flex-pack',
'align-content',
'align-items',
'align-self',
'justify-content',
'order',
'float',
'width',
'min-width',
'max-width',
'height',
'min-height',
'max-height',
'padding',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left',
'margin',
'margin-top',
'margin-right',
'margin-bottom',
'margin-left',
'overflow',
'overflow-x',
'overflow-y',
'-webkit-overflow-scrolling',
'-ms-overflow-x',
'-ms-overflow-y',
'-ms-overflow-style',
'columns',
'column-count',
'column-fill',
'column-gap',
'column-rule',
'column-rule-width',
'column-rule-style',
'column-rule-color',
'column-span',
'column-width',
'orphans',
'widows',
'clip',
'clear',
'font',
'font-family',
'font-size',
'font-style',
'font-weight',
'font-variant',
'font-size-adjust',
'font-stretch',
'font-effect',
'font-emphasize',
'font-emphasize-position',
'font-emphasize-style',
'font-smooth',
'src',
'hyphens',
'line-height',
'color',
'text-align',
'text-align-last',
'text-emphasis',
'text-emphasis-color',
'text-emphasis-style',
'text-emphasis-position',
'text-decoration',
'text-indent',
'text-justify',
'text-outline',
'-ms-text-overflow',
'text-overflow',
'text-overflow-ellipsis',
'text-overflow-mode',
'text-shadow',
'text-transform',
'text-wrap',
'-webkit-text-size-adjust',
'-ms-text-size-adjust',
'letter-spacing',
'-ms-word-break',
'word-break',
'word-spacing',
'-ms-word-wrap',
'word-wrap',
'overflow-wrap',
'tab-size',
'white-space',
'vertical-align',
'direction',
'unicode-bidi',
'list-style',
'list-style-position',
'list-style-type',
'list-style-image',
'pointer-events',
'-ms-touch-action',
'touch-action',
'cursor',
'visibility',
'zoom',
'table-layout',
'empty-cells',
'caption-side',
'border-spacing',
'border-collapse',
'content',
'quotes',
'counter-reset',
'counter-increment',
'resize',
'user-select',
'nav-index',
'nav-up',
'nav-right',
'nav-down',
'nav-left',
'background',
'background-color',
'background-image',
'filter',
'background-repeat',
'background-attachment',
'background-position',
'background-position-x',
'background-position-y',
'background-clip',
'background-origin',
'background-size',
'border',
'border-color',
'border-style',
'border-width',
'border-top',
'border-top-color',
'border-top-style',
'border-top-width',
'border-right',
'border-right-color',
'border-right-style',
'border-right-width',
'border-bottom',
'border-bottom-color',
'border-bottom-style',
'border-bottom-width',
'border-left',
'border-left-color',
'border-left-style',
'border-left-width',
'border-radius',
'border-top-left-radius',
'border-top-right-radius',
'border-bottom-right-radius',
'border-bottom-left-radius',
'border-image',
'border-image-source',
'border-image-slice',
'border-image-width',
'border-image-outset',
'border-image-repeat',
'outline',
'outline-width',
'outline-style',
'outline-color',
'outline-offset',
'box-shadow',
'opacity',
'-ms-interpolation-mode',
'page-break-after',
'page-break-before',
'page-break-inside',
'transition',
'transition-delay',
'transition-timing-function',
'transition-duration',
'transition-property',
'transform',
'transform-origin',
'perspective',
'appearance',
'animation',
'animation-name',
'animation-duration',
'animation-play-state',
'animation-timing-function',
'animation-delay',
'animation-iteration-count',
'animation-direction',
'animation-fill-mode',
'fill',
'stroke'
],
'property-no-vendor-prefix': true,
'rule-empty-line-before': [
'always',
{
except: ['after-single-line-comment', 'first-nested']
}
],
'selector-attribute-quotes': 'always',
'selector-class-pattern': '^[a-z][a-z0-9\\-]*[a-z0-9]$',
'selector-list-comma-newline-before': 'never-multi-line',
'selector-list-comma-space-after': 'always-single-line',
'selector-list-comma-space-before': 'never-single-line',
'selector-max-attribute': 2,
'selector-max-class': 4,
'selector-max-combinators': 4,
'selector-max-compound-selectors': 4,
'selector-max-id': 0,
'selector-max-specificity': null,
'selector-max-type': 2,
'selector-max-universal': 1,
'selector-no-qualifying-type': true,
'selector-no-vendor-prefix': true,
'shorthand-property-no-redundant-values': true,
'string-quotes': 'double',
'unicode-bom': 'never',
'value-list-comma-newline-after': 'never-multi-line',
'value-list-comma-newline-before': 'never-multi-line',
'value-list-comma-space-after': 'always',
'value-no-vendor-prefix': true
}
}

View File

@@ -0,0 +1,48 @@
{
"name": "@ivuorinen/stylelint-config",
"version": "0.1.0",
"description": "ivuorinen's shareable configuration for stylelint.",
"author": {
"name": "Ismo Vuorinen",
"url": "https://github.com/ivuorinen"
},
"bugs": {
"url": "https://github.com/ivuorinen/base-configs/issues"
},
"engines": {
"node": ">= 12",
"npm": ">= 6",
"yarn": ">=1.20.0"
},
"files": [
"css/index.js",
"scripts/*",
"scss/index.js"
],
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/stylelint-config#readme",
"keywords": [
"stylelint-config",
"stylelint",
"config",
"ivuorinen"
],
"license": "MIT",
"main": "css/index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/ivuorinen/base-configs.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"stylelint": "14.16.0",
"stylelint-config-recommended-scss": "8.0.0",
"stylelint-config-standard": "29.0.0",
"stylelint-order": "5.0.0",
"stylelint-scss": "4.3.0"
}
}

View File

@@ -0,0 +1,14 @@
'use strict'
const fs = require('fs')
const path = require('path')
const filePath = path.join(process.env.INIT_CWD, '.stylelintrc.json')
const fileConfigObject = {
extends: ['@ivuorinen/stylelint-config/css']
}
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
}

View File

@@ -0,0 +1,33 @@
/* eslint-disable unicorn/no-null */
'use strict'
module.exports = {
extends: ['stylelint-config-recommended-scss', '../css'],
rules: {
'at-rule-no-unknown': null,
'scss/at-function-named-arguments': 'never',
'scss/at-function-parentheses-space-before': 'never',
'scss/at-function-pattern': '^[a-z][a-z-]*$',
'scss/at-import-no-partial-leading-underscore': true,
'scss/at-import-partial-extension': 'never',
'scss/at-mixin-argumentless-call-parentheses': 'always',
'scss/at-mixin-named-arguments': null,
'scss/at-mixin-parentheses-space-before': 'never',
'scss/at-rule-no-unknown': true,
'scss/dimension-no-non-numeric-values': true,
'scss/dollar-variable-colon-space-after': 'at-least-one-space',
'scss/dollar-variable-colon-space-before': 'never',
'scss/dollar-variable-no-missing-interpolation': true,
'scss/dollar-variable-pattern': '^[a-z][a-z-\\d]*$',
'scss/media-feature-value-dollar-variable': null,
'scss/no-duplicate-dollar-variables': [
null,
{ ignoreInsideAtRules: ['if', 'mixin'] }
],
'scss/no-duplicate-mixins': true,
'scss/operator-no-newline-after': true,
'scss/operator-no-newline-before': true,
'scss/operator-no-unspaced': true,
'scss/selector-no-redundant-nesting-selector': true
}
}

File diff suppressed because it is too large Load Diff

6268
yarn.lock Normal file

File diff suppressed because it is too large Load Diff