Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
csantiago132 committed Sep 25, 2024
1 parent 69fdd42 commit a013f58
Show file tree
Hide file tree
Showing 43 changed files with 14,055 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: ['./src/eslint/eslint.node'],
overrides: [
{
files: ['src/**'],
rules: {
'sort-keys': 'error',
},
},
],
};
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

.idea
.idea.*
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output
coverage.*

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

typings/
lib/*.js
test/*.js
*.map
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/styleguide.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers = true
@@kurocado-studio:registry=https://www.npmjs.com/settings/kurocado-studio/packages
110 changes: 108 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,108 @@
# styleguide
Kurocado Studio's styleguide
# Kurocado Studio Style Guide

This repository contains the style guide for our project, specifically tailored for TypeScript. We
have used the Vercel Style Guide as a base for our TypeScript configurations, and aspire to maintain
the same high standards in our code quality.

## Introduction

This repository houses the configurations for linting and formatting tools, specifically for
TypeScript. The configurations are designed to help maintain consistent code quality and adhere to
best practices throughout the project.

We extend our thanks to [Vercel](https://vercel.com) for providing the foundation for our TypeScript
configurations. We took inspiration from their work to ensure our codebase maintains high standards
similar to those followed at Vercel.

## Prettier

Prettier is a peer dependency and should be installed at the root of your project. It handles code
formatting to ensure consistency across the codebase.

### Installation:

```bash
# If you use npm
npm install --save-dev prettier

# If you use Yarn

yarn add --dev prettier
```

To use our Prettier configuration, add the following to your `package.json`:

```json
{
"prettier": "@kurocado-studio/styleguide/prettier"
}
```

## ESLint

ESLint is also a peer dependency and should be installed at the root of your project. It handles
linting and enforces coding standards.

### Installation:

```bash
# If you use npm
npm install --save-dev eslint

# If you use Yarn
yarn add --dev eslint
```

### Configuring ESLint

Our ESLint setup is designed specifically for TypeScript. To configure ESLint in your project,
extend our TypeScript configuration in your `.eslintrc.js`:

#### Node projects

```javascript
module.exports = {
extends: [require.resolve('@kurocado-studio/styleguide/eslint/eslint.node')],
};
```

This setup ensures that TypeScript rules are enforced, and additional configuration for importing
modules is included to work seamlessly with TypeScript.

## TypeScript

We provide TypeScript configurations specifically for your project. The configuration extends our
base TypeScript settings, ensuring that your TypeScript setup is standardized.

### Installation:

Make sure TypeScript is installed as a dev dependency:

```bash
# If you use npm
npm install --save-dev typescript

# If you use Yarn
yarn add --dev typescript
```

### Using the Configuration

In your `tsconfig.json`, extend our base TypeScript configuration:

```json
{
"extends": "@kurocado-studio/styleguide/typescript/base",
"compilerOptions": {
"outDir": "./dist",
"module": "ESNext",
"target": "ES2021"
}
}
```

This ensures that your TypeScript settings are aligned with our style guide and project standards.

## Credits

#### We’ve taken inspiration and guidance from [Vercel’s Style Guide](https://vercel.com) and used their TypeScript configurations as a base for this project. We aim to match the same high standards they uphold for code quality and consistency.
Loading

0 comments on commit a013f58

Please sign in to comment.