Skip to content

Commit 4d50ff5

Browse files
committed
chore: added more infos to the readme
Signed-off-by: prisis <[email protected]>
1 parent 8418946 commit 4d50ff5

File tree

5 files changed

+186
-83
lines changed

5 files changed

+186
-83
lines changed

.github/settings.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,4 @@ repository:
125125

126126
# https://developer.github.com/v3/repos/branches/#remove-branch-protection
127127

128-
topics: "anolilab, typescript, nodejs, javascript, eslint, eslint-plugin, unicorns, eslint-config, linting-rules, eslint-rules, lint, styleguide, stylelint, eslintconfig, config, es2015, es2016, es2017, es2018, es2020, babel, browserslist"
128+
topics: "anolilab, typescript, nodejs, javascript, eslint, eslint-plugin, unicorns, eslint-config, linting-rules, eslint-rules, lint, styleguide, stylelint, eslintconfig, config, es2015, es2016, es2017, es2018, es2020, babel, browserslist, eslint-config. stylelint-config, htmlhint-config, prettier-config, browserslist-config, commitlint-config, postcss-config, lint-staged-config, markdownlint-config, tsconfig-config, secretlint-config"

README.md

+35-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Javascript Style Guide
22

3-
This project is a code style guide of all basic back- and front end project used at Anolilab.
3+
This project is a shareable code style guide of all basic back- and front end project used at Anolilab.
44

55
---
66

@@ -14,28 +14,45 @@ This project is a code style guide of all basic back- and front end project used
1414

1515
---
1616

17-
## Packages:
17+
This is a mono-repository that contains a collection of separate, shareable npm packages that provide various configuration files for commonly used tools in modern web development.
1818

19-
[`@anolilab/babel-preset`](./packages/babel-preset)
20-
- A babel preset for transforming your JavaScript for Anolilab.
19+
## Usage
2120

22-
[`browserslist-config-anolilab`](./packages/browserslist-config-anolilab)
23-
- Shareable browserlist config for Anolilab.
21+
Check the README for each configuration within the `packages` directory for specific usage instructions.
2422

25-
[`@anolilab/eslint-config`](./packages/eslint-config)
26-
- The most comprehensive ESLint code style guide.
2723

28-
[`@anolilab/prettier-config`](./packages/prettier-config)
29-
- Prettier shareable config for Anolilab.
24+
## Featured Packages
3025

31-
[`@anolilab/stylelint-config`](./packages/stylelint-config)
32-
- A stylelint shareable config for Anolilab code style.
26+
| Tool | Package | Version | Description |
27+
|-----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
28+
| [babel](https://github.com/babel/babel) | [babel-preset](https://github.com/anolilab/javascript-style-guide/blob/main/packages/babel-preset/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/babel-preset?style=flat-square&labelColor=292a44&color=663399&label=v) | Babel is a JavaScript compiler to use next generation JavaScript, today |
29+
| [browserslist](https://github.com/browserslist/browserslist) | [browserslist-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/browserslist-config-anolilab/README.md) | ![npm](https://img.shields.io/npm/v/browserslist-config-anolilab?style=flat-square&labelColor=292a44&color=663399&label=v) | Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env |
30+
| [eslint](https://eslint.org) | [eslint-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/eslint-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/eslint-config?style=flat-square&labelColor=292a44&color=663399&label=v) | Statically analyzes your code to quickly find problems. |
31+
| - | [package-json-utils](https://github.com/anolilab/javascript-style-guide/blob/main/packages/package-json-utils/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/package-json-utils?style=flat-square&labelColor=292a44&color=663399&label=v) | Shared utilities for parsing information from a package.json file. |
32+
| [lint-staged](https://github.com/okonet/lint-staged) | [lint-staged-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/lint-staged-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/lint-staged-config?style=flat-square&labelColor=292a44&color=663399&label=v) | Run linters on git staged files. |
33+
| [postcss](https://postcss.org) | [postcss-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/postcss-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/postcss-config?style=flat-square&labelColor=292a44&color=663399&label=v) | Add vendor prefixes to CSS rules using values from [Can I Use](https://caniuse.com). |
34+
| [prettier](https://github.com/prettier/prettier) | [prettier-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/prettier-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/prettier-config?style=flat-square&labelColor=292a44&color=663399&label=v) | Prettier is an opinionated code formatter. |
35+
| [semantic-release](https://github.com/semantic-release/semantic-release) </br></br> [commitlint](https://commitlint.js.org) | [semantic-release-preset](https://github.com/anolilab/javascript-style-guide/blob/main/packages/semantic-release-preset/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/semantic-release-preset?style=flat-square&labelColor=292a44&color=663399&label=v) | semantic-release is a fully automated version management and package publishing library </br></br> Helps your team adhere to a commit convention. |
36+
| [secretlint](https://github.com/secretlint/secretlint) | [secretlint-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/secretlint-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/secretlint-config?style=flat-square&labelColor=292a44&color=663399&label=v) | Pluggable linting tool to prevent committing credential |
37+
| [stylelint](https://stylelint.io) | [stylelint-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/stylelint-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/stylelint-config?style=flat-square&labelColor=292a44&color=663399&label=v) | Linter that helps you avoid errors and enforce conventions in your styles |
38+
| [textlint](https://github.com/textlint/textlint) | [textlint-config](https://github.com/anolilab/javascript-style-guide/blob/main/packages/textlint-config/README.md) | ![npm](https://img.shields.io/npm/v/@anolilab/textlint-config?style=flat-square&labelColor=292a44&color=663399&label=v) | The pluggable natural language linter for text and markdown. |
3339

34-
[`@anolilab/textlint-config`](packages/textlint-config)
35-
- A textlint shareable config for Anolilab code style.
40+
## Badge
3641

37-
[`@anolilab/semantic-release-preset`](packages/semantic-release-preset)
38-
- Anolilab Coding Standard for semantic-release.
42+
Show the world that you are using Anolilab’s code style in your project by including the badge in your readme.
43+
44+
[![Anolilab’s Code Style](https://img.shields.io/badge/code_style-Anolilab%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square)][repository]
45+
46+
```md
47+
[![Anolilab’s Code Style](https://img.shields.io/badge/code_style-Anolilab%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square)](https://github.com/anolilab/javascript-style-guide)
48+
```
49+
50+
## How We Version
51+
52+
We use [SemVer](https://semver.org/) for its versioning providing us an opt-in approach to releases.
53+
This means we add a version number according to the spec, as you see below.
54+
So rather than force developers to consume the latest and greatest, they can choose which version to consume and test any newer ones before upgrading.
55+
Please the read the spec as it goes into further detail.
3956

4057
## Supported Node.js Versions
4158

@@ -60,3 +77,5 @@ License
6077
-------------
6178

6279
The anolilab javascript-style-guide is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)
80+
81+
[repository]: https://github.com/anolilab/javascript-style-guide

packages/browserslist-config-anolilab/README.md

+65-41
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# Browserslist Config
2-
3-
This configuration reflects Growcss’s supported browser policy for their UI library and build tools.
4-
51
<div align="center">
2+
<h1>Shareable Browserslist Config</h1>
63

74
[![npm-image]][npm-url] [![license-image]][license-url]
85

6+
7+
It helps you maintain consistency across different projects and ensures that your projects support the same set of browsers.
98
</div>
109

1110
---
@@ -20,60 +19,46 @@ This configuration reflects Growcss’s supported browser policy for their UI li
2019

2120
---
2221

23-
## What is Browserslist?
22+
## Purpose
2423

25-
[Browserslist](https://github.com/browserslist/browserslist) is a library to share a browsers list between different front end tools, like Autoprefixer, Eslint, and Stylelint.
24+
Our package aims to simplify and streamline the configuration process for your projects, ensuring efficiency and minimizing errors. By implementing the following strategies, we achieve this goal:
2625

27-
- Valid Browserslist query syntax validation [browserl.ist](http://browserl.ist)
28-
- ["Browserslist is a Good Idea"](https://css-tricks.com/browserlist-good-idea/) (blog post by [@chriscoyier](https://github.com/chriscoyier))
26+
- Centralized Browser Targeting: Say goodbye to the hassle of defining target browsers for each individual project. Our package eliminates this need, providing a single, consistent configuration.
2927

30-
## Supported Browsers
28+
- Widely Used Target Browsers: We offer a carefully curated selection of popular target browsers. You can rely on our pre-defined set to cover a wide range of user preferences.
3129

32-
```js
33-
{
34-
"production": [
35-
"> 1%",
36-
"last 2 versions",
37-
"Firefox ESR"
38-
],
39-
"legacyBrowsers": [
40-
"> 1%",
41-
"last 2 versions",
42-
"Firefox ESR"
43-
],
44-
"modernBrowsers": [
45-
"last 2 Chrome versions",
46-
"not Chrome < 60",
47-
"last 2 Safari versions",
48-
"not Safari < 10.1",
49-
"last 2 iOS versions",
50-
"not iOS < 10.3",
51-
"last 2 Firefox versions",
52-
"not Firefox < 54",
53-
"last 2 Edge versions",
54-
"not Edge < 15"
55-
],
56-
"ssr": [
57-
"node 12"
58-
]
59-
}
60-
```
30+
- Effortless Updates: Keeping up with evolving browser requirements is effortless with our package. You can easily update the target browsers across all your projects whenever necessary, saving valuable time and effort.
31+
32+
In summary, our Browserslist Config ensures a superior user experience across various browsers, making it a vital tool for maintaining high-quality standards. Your users will enjoy a seamless browsing experience, regardless of their chosen platform.
6133

6234
## Installation
6335

64-
Install the module
36+
Install the package using your preferred package manager:
6537

6638
```shell
6739
npm install browserslist-config-anolilab --save-dev
6840
```
41+
6942
```sh
70-
yarn add -D browserslist-config-anolilab
43+
pnpm add -D browserslist-config-anolilab
7144
```
7245

7346
```sh
74-
pnpm add -D browserslist-config-anolilab
47+
yarn add -D browserslist-config-anolilab
48+
```
49+
50+
Optionally, you can install `browserslist` to use the `browserslist` CLI.
51+
52+
Adding the following script to your root package.json file makes it easier to run the browserslist command in your mono-repository:
53+
54+
```bash
55+
pnpm pkg set scripts.lint:browsers="browserslist"
7556
```
7657

58+
For `npm` users, replace `pnpm` with npm in the above command.
59+
60+
This script allows you to run the `browserslist` command by simply typing `pnpm run lint:browsers` (or `npm run lint:browsers` for npm users) in the terminal.
61+
7762
## Usage
7863

7964
### Package.json
@@ -107,6 +92,45 @@ Or when using [babel-preset-env](https://github.com/babel/babel/tree/master/expe
10792
}
10893
```
10994

95+
## What is Browserslist?
96+
97+
[Browserslist](https://github.com/browserslist/browserslist) is a library to share a browsers list between different front end tools, like Autoprefixer, Eslint, and Stylelint.
98+
99+
- Valid Browserslist query syntax validation [browserl.ist](http://browserl.ist)
100+
- ["Browserslist is a Good Idea"](https://css-tricks.com/browserlist-good-idea/) (blog post by [@chriscoyier](https://github.com/chriscoyier))
101+
102+
## Supported Browsers
103+
104+
```json
105+
{
106+
"production": [
107+
"> 1%",
108+
"last 2 versions",
109+
"Firefox ESR"
110+
],
111+
"legacyBrowsers": [
112+
"> 1%",
113+
"last 2 versions",
114+
"Firefox ESR"
115+
],
116+
"modernBrowsers": [
117+
"last 2 Chrome versions",
118+
"not Chrome < 60",
119+
"last 2 Safari versions",
120+
"not Safari < 10.1",
121+
"last 2 iOS versions",
122+
"not iOS < 10.3",
123+
"last 2 Firefox versions",
124+
"not Firefox < 54",
125+
"last 2 Edge versions",
126+
"not Edge < 15"
127+
],
128+
"ssr": [
129+
"node 12"
130+
]
131+
}
132+
```
133+
110134
## Supported Node.js Versions
111135

112136
Libraries in this ecosystem make the best effort to track

0 commit comments

Comments
 (0)