Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionad-Morotar committed Jan 19, 2023
1 parent 2c3117f commit 73667e3
Show file tree
Hide file tree
Showing 23 changed files with 619 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dist/
node_modules
node_modules/
patches/
types/
!packages/.vitepress
!/.eslintrc.js
!/rollup.config.js
!.test
.temp

playground
83 changes: 83 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
jsxPragma: 'React',
ecmaFeatures: {
jsx: true,
},
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
],
plugins: ['@typescript-eslint', 'vue'],
rules: {
'vue/multi-word-component-names': 'off',
'react/no-string-refs': 'off',
'react/no-unknown-property': 'off',
'react/display-name': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'no-sparse-arrays': 0,
'no-inner-declarations': 0,
'@typescript-eslint/indent': 0,
'no-constant-condition': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/explicit-member-accessibility': [2, { accessibility: 'no-public' }],
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-use-before-define': [2, { functions: false }],
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-empty-interface': 1,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'no-unused-vars': [
2,
{
vars: 'local',
args: 'none',
},
],
'node/no-callback-literal': 'off',
'import/namespace': 'off',
'import/default': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',

'vue/attributes-order': 'off',
'vue/one-component-per-file': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
'vue/require-default-prop': 'off',
},

overrides: [
{
files: ['**/*.md', '**/*.md/*.*', '**/demo/*.vue', 'scripts/*.ts', '*.test.ts', '*.spec.ts'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-restricted-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-redeclare': 'off',
},
},
],
}
23 changes: 23 additions & 0 deletions .github/COMMIT-zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Commit Styles

使用一个冒号类型将提交类型以及描述分开,中英文皆可。提交类型请遵循以下项目。

* **Commit Types**

- feat:新增功能
- fix:修复问题
- docs:更新文档性质内容如更新代码注释
- lint:格式化如空白字符、格式缩进、补全缺失分号等
- type:类型相关改动
- refactor:重构代码或改善性能
- test:测试用例相关改动
- build:修改代码构建相关如 Gulp、Webpack、Rollup
- chore:杂项,如更改依赖、更改依赖的配置文件、更改 CI 流程等
- revert:代码回滚
- restructure:文件系统相关改动,如批量转移文件目录

* **Examples**

```bash
fix:correct height of y-scrollbar
```
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: '🐞 Bug report'
description: Report an issue with useScrollbar
labels: [pending triage]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: I am doing... What I expect is... What actually happening is...
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Steps to reproduce
description: Please provide any reproduction steps that may need to be described. E.g. if it happens only when running the dev or build script make sure it's clear which one to use.
placeholder: 1. `npm install`;2. `npm run dev`;3. then...
- type: textarea
id: system-info
attributes:
label: Environment Info
description: Environment Info`
render: shell
placeholder: Browsers, System, NodeJS, Dependencies...
validations:
required: true
- type: dropdown
id: package-manager
attributes:
label: Used Package Manager
description: Select the used package manager
options:
- pnpm
- npm
- yarn
- CDN
- other
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Readme](https://github.com/Lionad-Morotar/use-scrollbar).
required: true
- label: Check that there isn't [already an issue](https://github.com/Lionad-Morotar/use-scrollbar/issues) that reports the same bug to avoid creating a duplicate.
required: true
- label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Lionad-Morotar/use-scrollbar/discussions).
required: true
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: '✨ New feature proposal'
description: Propose a new feature to be added to useScrollbar
labels: ['pending triage']
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: textarea
id: feature-description
attributes:
label: Description
description: 'Clear and concise description of the problem. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
placeholder: I want [goal / wish] so that [benefit].
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Readme](https://github.com/Lionad-Morotar/use-scrollbar).
required: true
- label: Check that there isn't [already an issue](https://github.com/Lionad-Morotar/use-scrollbar/issues) that reports the same bug to avoid creating a duplicate.
required: true
- label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Lionad-Morotar/use-scrollbar/discussions).
required: true
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Node CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 7.9.5
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'pnpm'
- name: Install
run: |
pnpm install --frozen-lockfile
- name: Build Module
run: |
pnpm build
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
node_modules
dist
.DS_Store
.cache
.temp
coverage


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

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

# scripts
scripts/git-pr.js
scripts/publishDoc.sh

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

# .vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

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 --no-install commitlint --edit "$1"
8 changes: 8 additions & 0 deletions .husky/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
command_exists () {
command -v "$1" >/dev/null 2>&1
}

if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
7 changes: 7 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

[ -n "$CI" ] && exit 0

npx lint-staged
9 changes: 9 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public-hoist-pattern[]=*@vue/*
public-hoist-pattern[]=*types*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*typescript*
auto-install-peers=true
strict-peer-dependencies=false
shell-emulator=true
registry=https://registry.npmmirror.com
22 changes: 22 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
**/*.svg
**/*.ico
package.json
/dist
.DS_Store
.eslintignore
*.png
*.toml
.editorconfig
.gitignore
.prettierignore
LICENSE
.eslintcache
*.lock
yarn-error.log
/public
**/node_modules/**
.npmrc
components.d.ts
auto-imports.d.ts

playground
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 100,
"semi": false,
"vueIndentScriptAndStyle": true,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "never",
"htmlWhitespaceSensitivity": "strict",
"endOfLine": "auto"
}
45 changes: 45 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Code Of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, political party, or sexual identity and orientation. Note, however, that religion, political party, or other ideological affiliation provide no exemptions for the behavior we outline as unacceptable in this Code of Conduct.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at `[email protected]`. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
Loading

0 comments on commit 73667e3

Please sign in to comment.