Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adhamu/zero
Formatting and linting configurations
https://github.com/adhamu/zero
emotion eslint jest node nvm prettier react stylelint tsconfig typescript vscode yarn
Last synced: 4 days ago
JSON representation
Formatting and linting configurations
- Host: GitHub
- URL: https://github.com/adhamu/zero
- Owner: adhamu
- Created: 2021-12-07T19:38:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-26T08:53:48.000Z (about 1 year ago)
- Last Synced: 2024-10-29T13:51:03.997Z (17 days ago)
- Topics: emotion, eslint, jest, node, nvm, prettier, react, stylelint, tsconfig, typescript, vscode, yarn
- Language: JavaScript
- Homepage:
- Size: 285 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zero
Shared linting and formatting configurations.
[![Build](https://github.com/adhamu/zero/workflows/CI/badge.svg)](https://github.com/adhamu/zero/actions)
## Includes
- [Installation](#installation)
- [Requirements](#requirements)
- [Usage](#usage)
- [Quickstart](#quickstart)
- [Manual](#manual)
- [ESLint](#eslint)
- [Prettier](#prettier)
- [Stylelint](#stylelint)
- [TSConfig](#tsconfig)
- [Jest](#jest)## Installation
```sh
yarn add @adhamu/zero -D
```## Usage
### Setup Wizard
```sh
npx zero
```### Manual
Alternatively, you can selectively install the configurations you need.
#### ESLint
```sh
cat > .eslintrc.json << EOF
{
"extends": ["./node_modules/@adhamu/zero/eslint"]
}
EOF
```- [See configurations](./eslint)
#### Prettier
```sh
cat > .prettierrc.yaml << EOF
"@adhamu/zero/prettier"
EOF
```If you would like to override any Prettier settings, you can instead use a Javascript file:
```shell
cat > .prettierrc.js << EOF
module.exports = {
...require('@adhamu/zero/prettier'),
semi: true,
}
EOF
```- [See configurations](./prettier)
#### Stylelint
```sh
cat > .stylelintrc.json << EOF
{
"extends": ["./node_modules/@adhamu/zero/stylelint"]
}
EOF
```- [See configurations](./stylelint)
#### TSConfig
```sh
cat > tsconfig.json << EOF
{
"extends": "@adhamu/zero/tsconfig/base.json",
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "./dist"
}
}
EOF
```- [See configurations](./tsconfig)
#### Jest
```sh
cat > jest.config.js << EOF
module.exports = {
...require('@adhamu/zero/jest'),
transform: { '^.+\\.ts(x)?$': 'ts-jest' },
}
EOF
```Note: You will need to install your own transformer. Eg. `ts-jest`, `@swc/jest` etc.
- [See configuration](./jest)