-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
1,338 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
extends: './packages/eslint-config', | ||
extends: './packages/eslint-config', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "./packages/markdownlint-config/index.json" | ||
"extends": "./packages/markdownlint-config/index.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<br> | ||
|
||
<div align="center"> | ||
<img width="456" src="https://raw.githubusercontent.com/wayofdev/npm-shareable-configs/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only"> | ||
<img width="456" src="https://raw.githubusercontent.com/wayofdev/npm-shareable-configs/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only"> | ||
</div> | ||
<br> | ||
|
||
<br> | ||
|
||
<div align="center"> | ||
<a href="https://actions-badge.atrox.dev/wayofdev/npm-shareable-configs/goto"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fnpm-shareable-configs%2Fbadge&style=flat-square"/></a> | ||
<a href="https://github.com/wayofdev/npm-shareable-configs/tags"><img src="https://img.shields.io/github/v/tag/wayofdev/npm-shareable-configs?sort=semver&style=flat-square" alt="Latest Version"></a> | ||
<a href="LICENSE.md"><img src="https://img.shields.io/github/license/wayofdev/npm-shareable-configs.svg?style=flat-square&color=blue" alt="Software License"/></a> | ||
<a href="#"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/npm-shareable-configs/latest?style=flat-square"></a> | ||
</div> | ||
|
||
<br> | ||
|
||
# NPM Shareable Configs | ||
|
||
This repository shareable configurations with fully automated package publishing to the `NPM` Registry. | ||
|
||
<br> | ||
|
||
## 🚀 Featured Packages | ||
|
||
* browserslist-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fbrowserslist-config%2Fpackage.json&style=flat-square) | ||
* [browserslist/browserslist](https://github.com/browserslist/browserslist) — share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env | ||
|
||
* commitlint-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fcommitlint-config%2Fpackage.json&style=flat-square) | ||
* [commitlint.js](https://commitlint.js.org/#/) — helps your team adhere to a commit convention. | ||
|
||
* eslint-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Feslint-config%2Fpackage.json&style=flat-square) | ||
* [eslint](https://eslint.org/) — statically analyzes your code to quickly find problems. It is built into most text editors and you can run ESLint as part of your continuous integration pipeline. | ||
|
||
* htmlhint-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fhtmlhint-config%2Fpackage.json&style=flat-square) | ||
* [htmlhint](https://htmlhint.com) — static code analysis tool you need for your HTML | ||
|
||
* lint-staged-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Flint-staged-config%2Fpackage.json&style=flat-square) | ||
* [lint-staged](https://github.com/okonet/lint-staged) — run linters on git staged files | ||
|
||
* markdownlint-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fmarkdownlint-config%2Fpackage.json&style=flat-square) | ||
* [davidanson/markdownlint](https://github.com/DavidAnson/markdownlint) — a Node.js style checker and lint tool for Markdown/CommonMark files | ||
|
||
* postcss-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fpostcss-config%2Fpackage.json&style=flat-square) | ||
* [postcss](https://postcss.org/) — add vendor prefixes to CSS rules using values from Can I Use. [Autoprefixer](https://github.com/postcss/autoprefixer) will use the data based on current browser popularity and property support to apply prefixes for you. | ||
|
||
* prettier-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fprettier-config%2Fpackage.json&style=flat-square) | ||
* [prettier](https://prettier.io/) — an opinionated code formatter, supports many langauges | ||
|
||
* secretlint-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fsecretlint-config%2Fpackage.json&style=flat-square) | ||
* [secretlint/secretlint](https://github.com/secretlint/secretlint) — pluggable linting tool to prevent committing credential | ||
|
||
* stylelint-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Fsecretlint-config%2Fpackage.json&style=flat-square) | ||
* [stylelint](https://stylelint.io) — a mighty, modern linter that helps you avoid errors and enforce conventions in your styles | ||
|
||
* tsconfig-config ![GitHub package.json version (subfolder of monorepo)](https://img.shields.io/github/package-json/v/wayofdev/npm-shareable-configs?filename=packages%2Ftsconfig-config%2Fpackage.json&style=flat-square) | ||
* [tsconfig](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) — typescript configuration for projects | ||
|
||
|
||
<br> | ||
|
||
## 💿 Installation | ||
|
||
Install all configs and associated packages as development dependencies (**excludes** Webpack): | ||
|
||
### → with yarn | ||
|
||
```bash | ||
$ yarn add -D \ | ||
browserslist \ | ||
@commitlint/cli \ | ||
eslint \ | ||
htmlhint \ | ||
lint-staged \ | ||
markdownlint \ | ||
postcss \ | ||
prettier \ | ||
secretlint \ | ||
stylelint \ | ||
typescript \ | ||
@wayofdev/browserslist-config \ | ||
@wayofdev/commitlint-config \ | ||
@wayofdev/eslint-config \ | ||
@wayofdev/htmlhint-config \ | ||
@wayofdev/lint-staged-config \ | ||
@wayofdev/markdownlint-config \ | ||
@wayofdev/postcss-config \ | ||
@wayofdev/prettier-config \ | ||
@wayofdev/secretlint-config \ | ||
@wayofdev/stylelint-config\ | ||
@wayofdev/tsconfig-config | ||
``` | ||
|
||
### → with pnpm in monorepo | ||
|
||
Execute in root dir of project: | ||
|
||
```bash | ||
$ pnpm add -Dw \ | ||
browserslist \ | ||
@commitlint/cli \ | ||
eslint \ | ||
htmlhint \ | ||
lint-staged \ | ||
markdownlint \ | ||
postcss \ | ||
prettier \ | ||
secretlint \ | ||
stylelint \ | ||
typescript \ | ||
@wayofdev/browserslist-config \ | ||
@wayofdev/commitlint-config \ | ||
@wayofdev/eslint-config \ | ||
@wayofdev/htmlhint-config \ | ||
@wayofdev/lint-staged-config \ | ||
@wayofdev/markdownlint-config \ | ||
@wayofdev/postcss-config \ | ||
@wayofdev/prettier-config \ | ||
@wayofdev/secretlint-config \ | ||
@wayofdev/stylelint-config\ | ||
@wayofdev/tsconfig-config | ||
``` | ||
|
||
<br> | ||
|
||
## 💻 Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
extends: ['./packages/commitlint-config'], | ||
extends: ['./packages/commitlint-config'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Matthew Waldron | ||
|
||
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. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Browserslist Config | ||
|
||
My personal shareable browserslist configuration. | ||
|
||
## Install | ||
|
||
```bash | ||
yarn add -D @wayofdev/browserslist-config | ||
``` | ||
|
||
## Usage | ||
|
||
**`.browserslistrc`** | ||
|
||
```bash | ||
extends @wayofdev/browserslist-config | ||
``` | ||
|
||
## Under The Hood | ||
|
||
### `index.js` | ||
|
||
- `browserslist` | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// based on Google's browserslist-config-google/modern | ||
// https://github.com/awkaiser/browserslist-config-google/tree/2.0.0#alternative-configuration | ||
|
||
const desktop = [ | ||
'last 2 Chrome major versions', | ||
'last 2 Firefox major versions', | ||
'last 2 Safari major versions', | ||
'last 2 Edge major versions', | ||
]; | ||
|
||
const mobile = [ | ||
'last 2 Android major versions', | ||
'last 2 ChromeAndroid major versions', | ||
'last 2 iOS major versions', | ||
]; | ||
|
||
const supportedBrowsers = [...desktop, ...mobile]; | ||
|
||
module.exports = supportedBrowsers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "@wayofdev/browserslist-config", | ||
"version": "1.0.0", | ||
"description": "A shareable browserslist configuration for projects.", | ||
"keywords": [ | ||
"browserslist", | ||
"browserslist-config" | ||
], | ||
"author": "lotyp7@gmail.com", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/wayofdev/npm-shareable-configs/issues" | ||
}, | ||
"homepage": "https://github.com/wayofdev/npm-shareable-configs/tree/master/packages/browserslist-config#readme", | ||
"main": "index.js", | ||
"files": [ | ||
"index.js", | ||
"scripts/*" | ||
], | ||
"scripts": { | ||
"test": "echo \"No test specified\"" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/wayofdev/npm-shareable-configs.git", | ||
"directory": "packages/browserslist-config" | ||
}, | ||
"dependencies": { | ||
"browserslist": "^4.21.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* eslint-disable security/detect-non-literal-fs-filename */ | ||
const fs = require('node:fs'); | ||
const path = require('node:path'); | ||
|
||
const filePath = path.join(process.env.INIT_CWD, '.browserslistrc'); | ||
|
||
const fileConfigObject = 'extends @wayofdev/browserslist-config'; | ||
|
||
if (!fs.existsSync(filePath)) { | ||
fs.writeFileSync(filePath, fileConfigObject); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.