-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
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', | ||
}, | ||
}, | ||
], | ||
}; |
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
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. |