Skip to content

Commit

Permalink
feat: init project
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Mar 15, 2023
1 parent b278db1 commit a5b8ed4
Show file tree
Hide file tree
Showing 13 changed files with 4,166 additions and 200 deletions.
6 changes: 6 additions & 0 deletions .commitlintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* @type {import('@commitlint/types').UserConfig}
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
};
43 changes: 43 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Macos
.DS_Store

# Node
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock

# local env files
.env.local
.env.*.local

# Log files
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
!.vscode/extensions.json

# dist and cache
/dist
/dist-*
/dist_*
.cache

# testing
/coverage

# next.js
.next
/out
/build

# nuxt.js
.nuxt
.nitro
.output
24 changes: 24 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { defineConfig } = require('eslint-define-config');

module.exports = defineConfig({
root: true,

env: {
browser: true,
node: true,
es2022: true,
},

parser: '@typescript-eslint/parser',

extends: [
//
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],

rules: {
'prettier/prettier': 'error',
},
});
4 changes: 4 additions & 0 deletions .husky/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```shell
chmod +x commit-msg
chmod +x pre-commit
```
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'*.ts': 'eslint --fix',
'*': 'prettier --ignore-unknown --write',
};
43 changes: 43 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Macos
.DS_Store

# Node
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock

# local env files
.env.local
.env.*.local

# Log files
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
!.vscode/extensions.json

# dist and cache
/dist
/dist-*
/dist_*
.cache

# testing
/coverage

# next.js
.next
/out
/build

# nuxt.js
.nuxt
.nitro
.output
7 changes: 7 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @type {import('prettier').Config}
*/
module.exports = {
tabWidth: 2,
singleQuote: true,
};
Loading

0 comments on commit a5b8ed4

Please sign in to comment.